;;; Demo file for NLP brachet ;;; Prepared by Vikranth B. Rao ;;; Fall 2003 ;;; Modified by Yana Petrova ;;; Fall 2007 ;;====added by Yana Petrova================ ;; turn off singular path inference ^(in-package snip) ;turn on full forward inferencing: ^(defun broadcast-one-report (represent) (let (anysent) (do.chset (ch *OUTGOING-CHANNELS* anysent) (when (isopen.ch ch) (setq anysent (or (try-to-send-report represent ch) anysent))))) nil) ;re-enter the "sneps" package: ^(in-package sneps) ;;===added by Yana Petrova================= (resetnet t) ;;; ;;; Load requisite files ;;; ^^ (load "pmla.cl") (load "/projects/robot/Ygdrasil/Princess/newachieve") (load "/projects/robot/Ygdrasil/Princess/newact") ^^ ;;;commented out by Yana Petrova: the file was giving error messages ;;;content of the file is added below ;;;(intext "/projects/stn2/CVA/demos/rels") (define a1 a2 a3 a4 after agent against antonym associated before cause class direction equiv etime event from in indobj instr into lex location manner member mode object on onto part place possessor proper-name property rel skf sp-rel stime subclass superclass subset superset synonym time to whole kn_cat) (demo "/projects/stn2/CVA/demos/paths") (demo "/projects/stn2/CVA/demos/brachet.base") ^^ ;;;(sneps::sneps-setup) ;;;(atnin "Falltempgram.lisp") ;original grammar ;;;(atnin "grammar.lisp") ;modified by Yana Petrova (10/29/07): the parser gets inference, ;but 'define brachet' throws an error message (atnin "grammar2.lisp") ;added by Yana Petrova; 'define brachet' gets response in this grammar: ;it adds 'vaulable' and 'small' to its definition (lexin "Klexicon.lisp") ;;; ;;; Declare the primitive actions ;;; (attach-primaction believe believe (= (build lex "defnoun") defnoun) defN) ^^ (describe (assert whenever (build agent *I act (build action (build lex "definingnoun"))) do (build action *defnoun object1 "brachet"))) ^^(parse ) A hart runs. A white brachet is nextto the hart. A black hound runs. The hound is behind the hart. The hart is nextto Round Table. A knight arises. The knight picksup the brachet. The knight carries the brachet. Sir Tor goes to a pavilion. A lady says that the knight takes the brachet. The lady sleeps in the pavilion. Sir Tor finds the lady in the pavilion. Sir Tor finds the brachet in the pavilion. The brachet bays at Sir Tor. Sir Tor spies the brachet. Sir Tor takes the brachet. A dwarf says that he knows that Sir Tor seeks the knight. Sir Tor gives the brachet to the dwarf. The hart runs into King Arthur's hall. The brachet bites a hart's buttock. The knight mounts a horse. The knight rides the horse. Sir Tor mounts a horse. The lady says that the brachet belongs to her. The lady says that she wants the brachet. Merlin says that Sir Gawain must bring the hart to the hall. Merlin says that Sir Tor must bring the brachet to the hall. An elder says that a white hart comes to a place. The elder says that a hound chases the hart. The elder says that a white brachet is nextto the hart.