; ======================================================================= ; FILENAME: acap.demo ; DATE: 02/15/2004 ; PROGRAMMER: Dmitriy Dligach ; To use this file: run SNePS; at the SNePS prompt (*), type: ; (demo "WORD.demo" :av) ; ======================================================================= ; Turn off inference tracing. ^(setq snip:*infertrace* nil) ; Load the appropriate definition algorithm: ^(load "/projects/rapaport/CVA/STN2/defun_noun.cl") ; Clear the SNePS network: (resetnet t) ; load all pre-defined relations: (intext "/projects/rapaport/CVA/STN2/demos/rels") (define prefix proposition cause effect) ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ; BACKGROUND KNOWLEDGE: ; ===================== ; if x dislikes y's smoking then x does not smoke himself (add forall ($x $y) ant (build agent *x act (build action (build lex "dislike") object (build agent *y act (build action (build lex "smoke"))))) cq (build member *x class (build lex "non-smoker"))) ; if x dislikes y's smoking then x intolerant of smoking (add forall (*x *y) ant (build agent *x act (build action (build lex "dislike") object (build agent *y act (build action (build lex "smoke"))))) cq (build member *x class (build lex "smoking-intolerant"))) ; if x dislikes y's smoking then x intolerant of smoke (add forall (*x *y) ant (build agent *x act (build action (build lex "dislike") object (build agent *y act (build action (build lex "smoke"))))) cq (build member *x class (build lex "smoke-intolerant"))) ; if x is smoke-intolerant then x is allergic to smoke (add forall (*x) ant (build member *x class (build lex "smoke-intolerant")) cq (build member *x class (build lex "allergic\ to\ smoke"))) ; if there's a sentence of the structure: prefix, propositon ; then prefix is the cause and proposition is the effect (add forall ($pref $prop) ant (build prefix *pref proposition *prop) cq (build cause *pref effect *prop)) ; CASSIE READS THE PASSAGE: ; ========================= ; ; An acapnotic, he disliked her smoking; ; #he is known as "Henri" (add object #he proper-name (build lex "Henri")) ; #she is known as "Shelly" (add object #she proper-name (build lex "Shelly")) ; he is an acapnotic (add member *he class (build lex "acapnotic")) = pre ; he disliked her smoking (add agent *he act (build action (build lex "dislike") object (build agent *she act (build action (build lex "smoke"))))) = pro ; causal reading of the sentence ; i.e. because henri was an acapnotic he disliked smoking ; that "he is an acapnotic" is the prefix ; that "he disliked her smoking" is the proposition (add prefix *pre proposition *pro) ; Ask Cassie what "WORD" means: ^(defineNoun "acapnotic")