* ; ======================================================================= ; FILENAME: foist.demo ; DATE: 04/09/07 ; PROGRAMMER: John White ;; 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 "WORD.demo" :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: ^( --- pause --- --> load "/projects/rapaport/CVA/STN2/defun_verb.cl") --- pause --- ; Loading /projects/rapaport/CVA/STN2/defun_verb.cl t CPU time : 0.18 * ; Clear the SNePS network: (resetnet) --- pause --- Net reset - Relations and paths are still defined CPU time : 0.00 * ; 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: (intext "/projects/rapaport/CVA/STN2/demos/rels") --- pause --- Loading file /projects/rapaport/CVA/STN2/demos/rels. ; Fast loading /util/acl80/code/streamc.001 ;;; Installing foreign patch, version 1 ; Fast loading from bundle code/efft-euc-base.fasl. ; Fast loading from bundle code/efft-utf8-base.fasl. ; Fast loading from bundle code/efft-void.fasl. ; Fast loading from bundle code/efft-latin1-base.fasl. CPU time : 0.72 * ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") --- pause --- Loading file /projects/rapaport/CVA/mkb3.CVA/paths/paths. before implied by the path (compose before (kstar (compose after- ! before))) before- implied by the path (compose (kstar (compose before- ! after)) before-) after implied by the path (compose after (kstar (compose before- ! after))) after- implied by the path (compose (kstar (compose after- ! before)) after-) sub1 implied by the path (compose object1- superclass- ! subclass superclass- ! subclass) sub1- implied by the path (compose subclass- ! superclass subclass- ! superclass object1) super1 implied by the path (compose superclass subclass- ! superclass object1- ! object2) super1- implied by the path (compose object2- ! object1 superclass- ! subclass superclass-) superclass implied by the path (or superclass super1) superclass- implied by the path (or superclass- super1-) CPU time : 0.02 * ; BACKGROUND KNOWLEDGE: ; ===================== ; (put annotated SNePSUL code of your background knowledge here) ;If someone learns something, and that something is truenames of something ;else, then someone has power over that something else. (describe (assert forall ($p $t $f) &ant (build agent *p act (build action (build lex "learn") object *t)) &ant (build object *t rel (build lex "truenames") possessor *f) cq (build object1 *p rel (build lex "has power over") object2 *f))) --- pause --- (m4! (forall v3 v2 v1) (&ant (p3 (object v2) (possessor v3) (rel (m2 (lex truenames)))) (p2 (act (p1 (action (m1 (lex learn))) (object v2))) (agent v1))) (cq (p4 (object1 v1) (object2 v3) (rel (m3 (lex has power over)))))) (m4!) CPU time : 0.00 * ;If some agent performs some act consisting of some action ;and some object, and the same agent performs some other act ;consisting of some other action (which is considered "unknown") ;on the same object, then we can consider the unknown action as ;the subclass of the known superclass action. (describe (assert forall ($u $v $x $y $z) &ant (build agent *x act (build action *u object *z)) &ant (build agent *x act (build action *v object *z)) &ant (build object *u property (build lex "unknown")) cq (build superclass *v subclass *u))) --- pause --- (m6! (forall v8 v7 v6 v5 v4) (&ant (p9 (object v4) (property (m5 (lex unknown)))) (p8 (act (p7 (action v5) (object v8))) (agent v6)) (p6 (act (p5 (action v4) (object v8))) (agent v6))) (cq (p10 (subclass v4) (superclass v5)))) (m6!) CPU time : 0.10 * ;If some agent performs some act consisting of some action ;on some object, and that same agent is considered ;to have power over that object, then it can be said that ;that agent imposes its will on the above object. (describe (assert forall ($p $u $w $f) &ant (build agent *p act (build action *u object *f)) &ant (build object1 *p rel (build lex "has power over") object2 *f) cq (build agent *p act (build action (build lex "impose your will") object *f)))) --- pause --- (m8! (forall v12 v11 v10 v9) (&ant (p13 (object1 v9) (object2 v12) (rel (m3 (lex has power over)))) (p12 (act (p11 (action v10) (object v12))) (agent v9))) (cq (p15 (act (p14 (action (m7 (lex impose your will))) (object v12))) (agent v9)))) (m8!) CPU time : 0.00 * ;If "impose your will" is a superclass of "foist your will" ;then it is also the case that "impose" is the superclass of "foist" (describe (assert &ant (build superclass (build lex "impose your will") subclass (build lex "foist your will")) cq (build superclass (build lex "impose") subclass (build lex "foist")))) --- pause --- (m14! (ant (m10 (subclass (m9 (lex foist your will))) (superclass (m7 (lex impose your will))))) (cq (m13 (subclass (m12 (lex foist))) (superclass (m11 (lex impose)))))) (m14!) CPU time : 0.01 * ;There is something refered to as a player. (describe (assert member #player class (build lex "player"))) --- pause --- (m16! (class (m15 (lex player))) (member b1)) (m16!) CPU time : 0.01 * ;There is something refered to as fiends. (describe (assert member #fiends class (build lex "fiends"))) --- pause --- (m18! (class (m17 (lex fiends))) (member b2)) (m18!) CPU time : 0.01 * ;There is something refered to as truenames. (describe (assert member #truenames class (build lex "truenames"))) --- pause --- (m19! (class (m2 (lex truenames))) (member b3)) (m19!) CPU time : 0.00 * ;There is something refered to as rituals. (describe (assert member #rituals class (build lex "rituals"))) --- pause --- (m21! (class (m20 (lex rituals))) (member b4)) (m21!) CPU time : 0.00 * ;The rituals are considered to be complex. (describe (assert object *rituals property (build lex "complex"))) --- pause --- (m23! (object b4) (property (m22 (lex complex)))) (m23!) CPU time : 0.00 * ;The truenames are the truenames of the fiends. (describe (assert object *truenames rel (build lex "truenames") possessor *fiends)) --- pause --- (m24! (object b3) (possessor b2) (rel (m2 (lex truenames)))) (m24!) CPU time : 0.00 * ;The player researches the truenames. (describe (assert agent *player act (build action (build lex "research") object *truenames))) --- pause --- (m27! (act (m26 (action (m25 (lex research))) (object b3))) (agent b1)) (m27!) CPU time : 0.00 * ;The player learns the truenames. (describe (assert agent *player act (build action (build lex "learn") object *truenames))) --- pause --- (m29! (act (m28 (action (m1 (lex learn))) (object b3))) (agent b1)) (m29!) CPU time : 0.01 * ;The player researches the rituals. (describe (assert agent *player act (build action (build lex "research") object *rituals))) --- pause --- (m31! (act (m30 (action (m25 (lex research))) (object b4))) (agent b1)) (m31!) CPU time : 0.00 * ;The player learns the rituals. (describe (assert agent *player act (build action (build lex "learn") object *rituals))) --- pause --- (m33! (act (m32 (action (m1 (lex learn))) (object b4))) (agent b1)) (m33!) CPU time : 0.00 * ; CASSIE READS THE PASSAGE: ; ============================================== ;If p is a player, f is a fiend, t is a truename, c is a ritual, c is complex, ;t is the truename of f, p researches and learns t, and p researches and ;learns c, then p foists its will on f. (describe (add forall ($f $t $c $p) &ant (build member *p class (build lex "player")) &ant (build member *f class (build lex "fiends")) &ant (build member *t class (build lex "truenames")) &ant (build member *c class (build lex "rituals")) &ant (build object *c property (build lex "complex")) &ant (build object *t rel (build lex "truenames") possessor *f) &ant (build agent *p act (build action (build lex "research") object *t)) &ant (build agent *p act (build action (build lex "learn") object *t)) &ant (build agent *p act (build action (build lex "research") object *c)) &ant (build agent *p act (build action (build lex "learn") object *c)) cq (build agent *p act (build action (build lex "foist your will") object *f)))) --- pause --- (m47! (object1 b1) (object2 b2) (rel (m3 (lex has power over)))) (m42! (act (m41 (action (m7 (lex impose your will))) (object b2))) (agent b1)) (m36! (act (m35 (action (m9 (lex foist your will))) (object b2))) (agent b1)) (m34! (forall v16 v15 v14 v13) (&ant (p29 (act (p28 (action (m1 (lex learn))) (object v15))) (agent v16)) (p27 (act (p26 (action (m25 (lex research))) (object v15))) (agent v16)) (p25 (act (p24 (action (m1)) (object v14))) (agent v16)) (p23 (act (p22 (action (m25)) (object v14))) (agent v16)) (p21 (object v14) (possessor v13) (rel (m2 (lex truenames)))) (p20 (object v15) (property (m22 (lex complex)))) (p19 (class (m20 (lex rituals))) (member v15)) (p18 (class (m2)) (member v14)) (p17 (class (m17 (lex fiends))) (member v13)) (p16 (class (m15 (lex player))) (member v16))) (cq (p31 (act (p30 (action (m9)) (object v13))) (agent v16)))) (m33! (act (m32 (action (m1)) (object b4))) (agent b1)) (m31! (act (m30 (action (m25)) (object b4))) (agent b1)) (m29! (act (m28 (action (m1)) (object b3))) (agent b1)) (m27! (act (m26 (action (m25)) (object b3))) (agent b1)) (m24! (object b3) (possessor b2) (rel (m2))) (m23! (object b4) (property (m22))) (m21! (class (m20)) (member b4)) (m19! (class (m2)) (member b3)) (m18! (class (m17)) (member b2)) (m16! (class (m15)) (member b1)) (m47! m42! m36! m34! m33! m31! m29! m27! m24! m23! m21! m19! m18! m16!) CPU time : 0.40 * ;Foist your will is unknown (describe (add object (build lex "foist your will") property (build lex "unknown"))) --- pause --- (m37! (object (m9 (lex foist your will))) (property (m5 (lex unknown)))) (m13! (subclass (m12 (lex foist))) (superclass (m11 (lex impose)))) (m10! (subclass (m9)) (superclass (m7 (lex impose your will)))) (m37! m13! m10!) CPU time : 0.13 * ; Ask Cassie what "foist" means: ^( --- pause --- --> defineVerb "foist") --- pause --- "You want me to define the verb 'foist'. I'll start by looking at the predicate stucture of the sentences I know that use 'foist'. Here is what I know: The most common type of sentences I know of that use 'foist' are of the form: 'A something can foist.' 'A something can foist something.' 'A something can foist something to something.' The verbs superclasses are: impose : Sorting from the most common predicate case to the least common here is what I know. I will first attempt to unify the components of the sentences that use the verb giving a generalizaiton based on my background knowledge: Now, looking from the bottom up I want to get a sense of the categories that most of the agents, objects and indirect objects belong to. This is different from looking for the most unified case. Instead I am looking for the classes that contain approximately half of the agents, objects and indirect objects. This is an attempt at generalization but from another approach. " CPU time : 0.03 * End of /home/unmdue/jcwhite2/foist.demo demonstration. CPU time : 1.69