; ======================================================================= ; FILENAME: zhaomo-comport-demo.txt ; DATE: March 2 ; PROGRAMMER: Zhaomo Yang ;; this template version: ;; http://www.cse.buffalo.edu/~rapaport/CVA/snepslog-template-2006114.demo ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; Lines beginning with "%" are SNePSUL commands. ; All other lines are SNePSLOG commands. ; ; To use this file: run SNePSLOG; at the SNePSLOG prompt (:), type: ; ; demo "WORD-demo.txt" av ; ; Make sure all necessary files are in the current working directory ; or else use full path names. ; ======================================================================= ; Set SNePSLOG mode = 3 set-mode-3 ; Turn off inference tracing; this is optional. ; If tracing is desired, enter "trace" instead of "untrace": untrace inference ; Load the appropriate definition algorithm: ;^(cl:load "/projects/rapaport/CVA/STN2/defun_verb") ^(cl:load "/home/unmdue/zhaomoya/defun_verb_my") ; Clear the SNePS network: clearkb ; OPTIONAL: ; UNCOMMENT THE FOLLOWING CODE TO TURN FULL FORWARD INFERENCING ON: ; ;^(cl:load "/projects/rapaport/CVA/STN2/ff.cl") ;+++++++++++++++++++++++++++++++ ; Load all pre-defined relations: ^(sneps:intext "/projects/rapaport/CVA/STN2/demos/rels") ; Load all pre-defined path definitions: ^(sneps:intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ;+++++++++++++++++++++++++++++++ ; define frames here: ; ===================== ; (put annotated SNePSLOG code of your defined frames here; ; be sure to include both syntax and semantics) ; (also: be sure to define frames for any paths that you ; will need below!) ; (1) thing-called define-frame thing-called (nil lex) "[lex] is the word of the name of the node" ; (2) Named define-frame Named (nil proper-name object) "[proper-name] is the name of [object]" ; (3) act-wrt define-frame act-wrt (nil action object) "it is an act whose action is [action] and whose object is [object]" ; (4) Does define-frame Does (nil act agent) "[agent] does [act]" ; (5) Isa-Part-Of define-frame Isa-Part-Of (nil part whole) "[part] is a part of [whole]" ; (6) AKO define-frame AKO (nil subclass superclass) "[subclass] is a kind of [superclass]" ; (7) Isa define-frame Isa (nil member class) "[member] is a member of [class]" ; (8) Is define-frame Is (nil property object) "[object] is [property]" ; (9) skolem define-frame skolem (func argument) "[argument] is the argument of [func]" ; define paths here: ; ===================== ; (put annotated SNePSLOG code for your paths here; ; be sure to include both syntax and semantics; ; consult "/projects/rapaport/CVA/mkb3.CVA/paths/snepslog-paths" ; for the proper syntax and some suggested paths; ; be sure to define frames above for any paths that you need here!) ; BACKGROUND KNOWLEDGE: ; ===================== ; (1) If sb. kills himself, then he does harm to himself. AKO(thing-called(kill), thing-called("do harm")). ; (2) If sb. blows his brains out, then he kills himself. ;;AKO(thing-called("blow out"), thing-called(kill)). all(p, a1, b)({Does(act-wrt(a1, b), p), Isa(a1, thing-called("blow out")), Isa(b, thing-called(brain)), Isa-Part-Of(b, p)} &=> {Does(act-wrt(skolem(a1), p), p), Isa(skolem(a1), thing-called("kill"))}). ; (3) If sb. does act1 to himself and he also does act2 to himself, then a1 is a kind of a2 or a2 is a kind of a1. all(p,a1,a2, v1, v2)({Does(act-wrt(a1, p), p), Does(act-wrt(a2, p), p), Isa(a1, v1), Isa(a2, v2), Is(thing-called(unknown), v1)} &=> AKO(v1, v2)). ; CASSIE READS THE PASSAGE: ; ========================= ; (1) Bellew comports himself under his disappointment. Named(Bellew, bellew)! Does(act-wrt(a1, bellew), bellew)! Isa(a1, thing-called(comport))! Is(thing-called(unknown), thing-called(comport))! ; (2) Bellew blows his brains out. Isa(b, thing-called(brain))! Isa-Part-Of(b, bellew)! Does(act-wrt(a2, b), bellew)! Isa(a2, thing-called("blow out"))! ; Ask Cassie what "comport" means: ^(defineVerb 'comport)