; ===================================================================== ; FILENAME: PERAMBULATE-demo.txt ; DATE: 4/4/11 ; PROGRAMMER: DOUGLAS CALDERON ;; this template version: snepsul-template.demo-20061005.txt ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; All other lines are SNePSUL commands. ; ; To use this file: run SNePS; at the SNePS prompt (*), type: ; ; (demo "PERAMBULATE-demo.txt" :av) ; ; Make sure all necessary files are in the current working directory ; or else use full path names. ; ======================================================================= ; Turn off inference tracing. ; This is optional; if tracing is desired, then delete this. ^(setq snip:*infertrace* nil) ; Load the appropriate definition algorithm: ^(load "/projects/rapaport/CVA/STN2/defun_verb.cl") ; Clear the SNePS network: (resetnet t) ; OPTIONAL: ; UNCOMMENT THE FOLLOWING CODE TO TURN FULL FORWARD INFERENCING ON: ; ; ;enter the "snip" package: ^(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) ; load all pre-defined relations: ; NB: If "intext" causes a "nil not of expected type" error, ; then comment-out the "intext" command and then ; uncomment & use the load command below, instead ;^(load "/projects/rapaport/CVA/STN2/demos/rels") (intext "/projects/rapaport/CVA/STN2/demos/rels") ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ; BACKGROUND KNOWLEDGE: ; ===================== ; (put annotated SNePSUL code of your background knowledge here) ;;The Big Rule. Translated to If she(a) perambulates(b), and perambulate(b) is unknown ;;and she(a) is moving(c) ;;then perambulate(b) is a subclass of moving(c) (describe (assert forall ($a $b $c) &ant ((build agent *a act (build action *b)) (build member *b class (build lex "unknown")) (build agent *a act (build action *c))) cq (build superclass *c subclass *b))) ;;If the right phrase presents itself to something else(e), ;;then e gets an idea (describe (assert forall ($e) ant (build agent (build lex "right phrase") act (build action (build lex "presents itself")) object *e) cq (build object1 *e rel (build lex "gets") object2 (build lex "idea")))) ; CASSIE READS THE PASSAGE: ; ========================= ; (put annotated SNePSUL code of the passage here) ;Katharine... (describe (add object #k proper-name (build lex "Katharine"))) ;If Katharine got an idea, then she was moving (describe (add forall $x &ant ((build object1 *x rel (build lex "gets") object2 (build lex "idea")) (build object *x proper-name (build lex "Katharine"))) cq (build agent *x act (build action (build lex "moving"))))) ;express that perambulate is a member of the class of unknonwn things (describe (add member (build lex "perambulate") class (build lex "unknown"))) ;Katharine perambulates (describe (add agent *k act (build action (build lex "perambulate")))) ;The right phrase presents itself to Katharine (describe (add agent (build lex "right phrase") act (build action (build lex "presents itself")) object *k)) ; Ask Cassie what "PERAMBULATE" means: ^(defineVerb "perambulate")