; ======================================================================= ; FILENAME: oamDEMOfile.txt ; DATE: 20-APR-2011 ; PROGRAMMER: DIVAKAR_DEV_SINGH ;; 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 "oamDEMOfile.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_noun.cl") ; Clear the SNePS network: ^(resetnet) ; 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") (define Skf) ;^(intext "/projects/rapaport/CVA/STN2/demos/rels") ;^load all pre-defined path definitions: ^(intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ; BACKGROUND KNOWLEDGE: ; ===================== ;Rule 1: Steam is transparent ; ;For all x and y [if x is steam of y -> x is transparent] (describe (assert forall ($x $y) ant(build object *x rel (build lex "steam") possessor *y) cq (build object *x property (build lex "transparent")))) ;Rule 2: ;The rule in general states that there is a stew that has some oam and that oam has the properties of ;steam i.e. being transparent. But the rule is quiet general and says that anything that is the steam of something ;has the property of being transparent. ; ;x "has steam" z ( pos rel obj) ;z has prop transparent ;x "has oam" v ;v is transparent ;u in oam and is unknown. (describe (assert forall ($x $y $z $u $v $w) &ant (build possessor *x rel *y object *z) &ant (build object *z property *w) &ant (build possessor *x rel *u object *v) &ant (build object *v property *w) &ant (build object *u property (build lex "unknown")) cq (build superclass *y subclass *u))) ;Rule 3: Stew has steam ;this is where I have to use the skolem function as we have encountered an existential quantifier. ;the rule says forall (describe (assert forall $x ant (build member *x class (build lex "stew")) cq (build possessor *x rel (build lex "steam") object (build Skf steamof a1 *x)))) ; CASSIE READS THE PASSAGE: ; ========================= ; (put annotated SNePSUL code of the passage here) ;There is a stew that is being cooked by the mother.( cooking not represented ) ;The unknown in this context is the word oam. ;The stew has some oam. ;The oam has the property of being transparent. (describe (add member #mothersstew class (build lex "stew"))) (describe (add member #oamofstew class (build lex "oam"))) (describe (add object (build lex "oam") property (build lex "unknown"))) (describe (add object *oamofstew property (build lex "transparent"))) ;(describe (add object *mothersstew possessor *oamofstew rel steamof)) (describe (add object *oamofstew possessor *motersstew rel (lex "oam"))) (describe (add object *oamofstew rel (build lex oam) possessor *mothersstew)) ;Describing all the nodes (describe *nodes) ; Ask Cassie what "oam" means: ^(defineNoun 'oam)