; ======================================================================= ; FILENAME: augur.demo ; DATE: 4/15/2004 ; PROGRAMMER: Chris Becker ;; this template version: template.demo.2003.11.17.txt ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; All other lines are SNePS commands. ; ; To use this file: run SNePS; at the SNePS prompt (*), type: ; ; (demo "augur.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; ;^(setq snip:*infertrace* nil) ; Load the verb definition algorithm: ^(load "/projects/rapaport/CVA/verbalgorithm3.0/defun_verb.cl") ;; load Dmitriy Dligach's show utility ;; NOTE: uncomment "show" lines to use this ;; ^(load "show.lisp") ; Clear the SNePS network: (resetnet t) ;turn on full forward inferencing: ^(setq snip:*infertrace* nil) ; ;enter the "snip" package: ^(in-package snip) ^(defun broadcast-one-report (rep) (let (anysent) (do.chset (ch *OUTGOING-CHANNELS* anysent) (when (isopen.ch ch) (setq anysent (or (try-to-send-report rep ch) anysent))))) nil) ;^(in-package sneps) ; load all pre-defined relations: (intext "/projects/rapaport/CVA/STN2/demos/rels") ; define new relations: (define similar) ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/STN2/demos/paths") ;;---------------------------------------------------------------- ;;---------------------------------------------------------------- ; THE CONTEXT: ; ============ ; Suddenly the tempest redoubled. The poor young woman could augur ; nothing favorable as she listened to the threatening heavens, the ; changes of which were interpreted in those credulous days according to ; the ideas or the habits of individuals. ; ; from: http://www.gutenberg.net/etext98/htdsn10.txt ; ;;---------------------------------------------------------------- () ; PARAPHRASED: ; ; The tempest redoubled. ; (ant:) The woman listened to the heavens. ; (cq:) The woman augured a thing that was not favorable. ; In those days, people interpreted a change in the heavens. ; In credulous days, people are credulous. ; The act of interpretation, in those (credulous) days, ; is done by the relation of "manner" ; with respect to "ideas" and "habits" possessed by the agent, ;;---------------------------------------------------------------- ; () ; ; ; OBJECTS: ; tempest ; woman ; (no)thing ; heavens ; change ; days ; individuals ;;----------------------------- () ; PROPERTIES OF OBJECTS ; tempest ; act: redouble ; equiv: heavens ; ; woman ; property: young ; property: poor ; act: augur ; act: listen(heavens) ; ; thing ; property: not favorable ; heavens ; equiv: tempest ; property: threatening ; possesses: change ; change ; ; individuals ; act: interpret change ;;----------------------------- () ; BACKGROUND KNOWLEDGE: ; ===================== ;;---------------------------------------------------------- ; General rules: ; ; If action A is performed by agent Y on object Z, ; and action B is performed by agent Y on object Z, ; then A and B are similar. ; ; If action A and action B are similar, and A causes C, ; then B causes C as well. ; ; If X and Y are equiv, and X has property A, then Y has property A. ; If X and Y are equiv, and X does act A, then Y does act A. ; If X and Y are equiv, and X is a member of class A, ; then Y is a member of class A. ; If X and Y are equiv, and X is a subclass of A, then Y is a subclass of A. ;;---------------------------------------------------------- () ;;---------------------------------------------------------- ;;; If action A is performed by agent Y on object Z, ;;; and action B is performed by agent Y on object Z, ;;; then A and B are similar. ;;---------------------------------------------------------- ;(show (describe (add forall ($A $B $Y $Z) &ant ( (build agent *Y act (build action *A object *Z) ) (build agent *Y act (build action *B object *Z) ) ) cq (build similar *A similar *B) )) ;) ;;---------------------------------------------------------- ;;; If action I and action J are similar, and the act containing ;;; action I causes K, then the act containing action J causes K as well. ;;; ;;; Note: the actions do not need to have the same agent or object. ;;---------------------------------------------------------- ;; $I and $J are actions ;; $W and $V are agents ;; $U and $T are objects ;(show (describe (add forall ($I $J $K $W $V $U $T) &ant ( (build similar *I similar *J) (build cause (build agent *W act (build action *I object *U)) effect *K) ) cq (build cause (build agent *V act (build action *J object *T)) effect *K) )) ;) ;;; GENERIC RULES FOR "EQUIV" CASE FRAME ;;---------------------------------------------------------- ;;; These rules add some meaning to what it means for ;;; two things to be equiv. ;;---------------------------------------------------------- ;;; Equivalent things will share the same properties ;;; ;;; If X and Y are equiv, and X has property A, ;;; then Y also has property A. ;;---------------------------------------------------------- ;(show (describe (add forall ($x1 $y1 $a1) &ant ( (build equiv *x1 equiv *y1) (build object *x1 property *a1) ) cq (build object *y1 property *a1) )) ;) ;;---------------------------------------------------------- ;;; Equivalent things will do the same actions ;;; ;;; If X and Y are equiv, and X does act A, ;;; then Y also does act A. ;;; Note, this is for an intransitive act ;;---------------------------------------------------------- (describe (add forall ($x2 $y2 $a2) &ant ( (build equiv *x2 equiv *y2) (build agent *x2 act (build action *a2)) ) cq (build agent *y2 act (build action *a2)) )) ;;---------------------------------------------------------- ;;; Equivalent things will share the same class membership ;;; ;;; If X and Y are equiv, and X is a member of class A, ;;; then Y is also a member of class A. ;;---------------------------------------------------------- (describe (add forall ($x3 $y3 $a3) &ant ( (build equiv *x3 equiv *y3) (build member *x3 class *a3) ) cq (build member *y3 class *a3) )) ;;---------------------------------------------------------- ;;; ;;; Equivalent things will share the same superclass ;;; ;;; If X and Y are equiv, and X is a subclass of A, ;;; then Y is also a subclass of A. ;;---------------------------------------------------------- (describe (add forall ($x4 $y4 $a4) &ant ( (build equiv *x4 equiv *y4) (build subclass *x4 superclass *a4) ) cq (build subclass *y4 superclass *a4) )) ;;---------------------------------------------------------- ; BACKGROUND KNOWLEDGE AND RULES PROVIDED IN THE CONTEXT ;;---------------------------------------------------------- () ;;---------------------------------------------------------- ;;; Tempest and heavens refer to the same thing. ;;; We can therefore say that tempest is equiv to heavens ;;---------------------------------------------------------- (describe (add equiv (build lex "tempest") = tempest equiv (build lex "heavens") = heavens ) ) ;;---------------------------------------------------------- ;;; The tempest redoubled. ;;---------------------------------------------------------- (describe (add agent *tempest act (build action (build lex "redouble") = redouble) ) ) ;;---------------------------------------------------------- ;;; The woman is young ;;---------------------------------------------------------- (describe (add object (build lex "the woman") = theWoman property (build lex "young") ) ) ;;---------------------------------------------------------- ;;; The woman is poor ;;---------------------------------------------------------- (describe (add object *theWoman property (build lex "poor") ) ) ;;---------------------------------------------------------- ;;; The woman is a member of the class human ;;---------------------------------------------------------- (describe (assert member *theWoman class (build lex "human") = human)) ;;---------------------------------------------------------- ;;; The object of "augur" is "nothing favorable". ;;; ;;; However, since it would be silly to create an object ;;; called "nothing" with the property "favorable". ;;; ;;; Other possibilities could have been to represent it as ;;; "A thing that is not favorable". ;;; ;;; However, I settled on creating an object that is just the ;;; concept "nothing favorable" with the property "not favorable" ;;; (or just "unfavorable") ;;---------------------------------------------------------- (describe (add object (build lex "nothing favorable") = nothingFavorable property (build lex "not favorable") = unfavorable ) ) ;;---------------------------------------------------------- ;;; The heavens are threatening ;;---------------------------------------------------------- (describe (add object *heavens property (build lex "threatening") = threatening ) ) ;;---------------------------------------------------------- ;;; "days" are credulous ;;; ;;; Later there is a rule that asserts that "days" being credulous ;;; means that people are credulous. ;;---------------------------------------------------------- (describe (assert object (build lex "days") = days property (build lex "credulous") = credulous)) ;;---------------------------------------------------------- ;;; I will define superordinates for the objects represented above. ;;; ;;; If we create a generic knowledge base, this might be imported ;;; directly into it. ;;---------------------------------------------------------- ;;; ;;; The ontologies used here come from WordNet 2.0: ;;; ;;; http://www.cogsci.princeton.edu/~wn/ ;;; ;;; ;;---------------------------------------------------------- ;;---------------------------------------------------------- ;;; TEMPEST ;;; is a kind of: ;;; tempest => windstorm => storm, violent storm => atmospheric phenomenon => ;;; physical phenomenon => natural phenomenon => phenomenon. ;;---------------------------------------------------------- (describe (assert subclass *tempest superclass (build lex "windstorm") = windstorm)) (describe (assert subclass *windstorm superclass (build lex "storm") = storm)) (describe (assert subclass *storm superclass (build lex "atmospheric phenomenon") = atmosphericPhenomenon)) (describe (assert subclass *atmosphericPhenomenon superclass (build lex "physical phenomenon") = physicalPhenomenon)) (describe (assert subclass *physicalPhenomenon superclass (build lex "phenomenon") = Phenomenon)) ;;---------------------------------------------------------- ;;; WOMAN ;;; is a kind of: ;;; human => animate thing => physical object => entity ;;---------------------------------------------------------- (describe (assert subclass *human superclass (build lex "animate thing") = animateThing)) (describe (assert subclass *animateThing superclass (build lex "physical object") = physicalObject)) (describe (assert subclass *physicalObject superclass (build lex "entity") = entity)) ;;---------------------------------------------------------- ;;; DAYS ;;; is a kind of: ;;; days => time period => fundamental quantity => amount => abstraction ;;---------------------------------------------------------- (describe (assert subclass *days superclass (build lex "time period") = timePeriod)) (describe (assert subclass *timePeriod superclass (build lex "fundamental quantity") = fundamentalQuantity)) (describe (assert subclass *fundamentalQuantity superclass (build lex "amount") = amount)) (describe (assert subclass *amount superclass (build lex "abstraction") = abstraction)) ;;---------------------------------------------------------- ;;; NOTHING FAVORABLE ;;; e.g unfavorable ;;; is a kind of: ;;; quality => attribute => abstraction ;;---------------------------------------------------------- (describe (assert subclass *nothingFavorable superclass (build lex "quality") = quality)) (describe (assert subclass *quality superclass *abstraction)) ;;---------------------------------------------------------- ;;; CREDULOUS ;;; is a measure of(?): ;;; credibility => quality => attribute => abstraction ;;; ;;---------------------------------------------------------- ;;; Question for future work: ;;; How can this best be represented? () ;;---------------------------------------------------------- ;;; INTERPRET ;;; is one way to: ;;; explicate => inform => communicate => interact => act ;;---------------------------------------------------------- (describe (assert subclass (build lex "interpret") = interpret superclass (build lex "explicate") = explicate)) (describe (assert subclass *explicate superclass (build lex "inform") = inform)) (describe (assert subclass *inform superclass (build lex "communicate") = communicate)) (describe (assert subclass *communicate superclass (build lex "interact") = interact)) (describe (assert subclass *interact superclass (build lex "act") = act)) ;;---------------------------------------------------------- ;;; LISTEN ;;; is one way to: ;;; perceive ;;; concentrate => think ;;---------------------------------------------------------- (describe (assert subclass (build lex "listen") = listen superclass (build lex "perceive") = perceive)) (describe (assert subclass *listen superclass (build lex "concentrate") = concentrate)) (describe (assert subclass *concentrate superclass (build lex "think") = concentrate)) ;;---------------------------------------------------------- ;;; REDOUBLE ;;; is one way to: ;;; escalate => increase => change ;;---------------------------------------------------------- (describe (assert subclass *redouble superclass (build lex "escalate") = escalate)) (describe (assert subclass *escalate superclass (build lex "increase") = increase)) (describe (assert subclass *increase superclass (build lex "change") = change)) ;;---------------------------------------------------------- ;;; Representing parts of the passage: ;;---------------------------------------------------------- () ;;; RULES INFERED FROM THE PASSAGE ;;---------------------------------------------------------- ;;; ;;; "People interpret a change in the heavens." ;;; ;;; This can be rephrased as "for all x, if X is a person ;;; then X interprets a change [in the heavens]. ;;; ;;; This gives us a representation for: ;;; ;;; If people do X, then the woman does X ;;; ;;---------------------------------------------------------- ;;; "change is represented as an instance of "change" (i.e. a member of ;;; the class "change"); this instance would be the ;;; change relating to the "heavens". This would separate it from ;;; the sense of "change" used previously, and a superclass of the ;;; heirarchy "redouble => escalate => increase => change". ;;; ;;; The only issue that could arise is whether we should have ;;; multiple instances of change for each rule that refers to ;;; some sort of "change", and then have a rule that allows the ;;; relations coming off one instance of change to refer to the ;;; others as well. ;;---------------------------------------------------------- ;(show (describe (add forall $person ant (build member *person class *human) cq (build agent *person act (build action *interpret object (build lex "instance of change") = instChange)) )) ;) ;;---------------------------------------------------------- ;; define what an instance of "change" is ;;---------------------------------------------------------- (describe (add member *instChange class *change )) ;;---------------------------------------------------------- ;;; If the days are credulous, then all people are credulous ;;; ;;---------------------------------------------------------- (describe (add forall *person &ant ( (build member *person class *human) (build object *days property *credulous) ) cq (build object *person property *credulous) )) ;;---------------------------------------------------------- ;;; If a person is credulous, they are ;;; "disposed to believe on little evidence" ;;; ;;; This just summarizes the meaning of credulous into ;;; one node that can be accessed from the verb algorithm. ;;---------------------------------------------------------- (describe (add forall *person &ant ( (build member *person class *human) (build object *person property *credulous) ) cq (build object *person property (build lex "disposed to believe on little evidence") ) )) ;;---------------------------------------------------------- ;;; If X does the act of "redouble" then X possesses ;;; and instance of "change". ;;; ;;; Note: In the background knowledge represented above, ;;; "change" is the highest superordinate category of "redouble" ;;---------------------------------------------------------- ;(show (describe (add forall $h ant (build agent *h act (build action *redouble) ) ;cq (build possessor *h object *change) cq (build possessor *h object *instChange) )) ;:format ps) ;;---------------------------------------------------------- ;;; ;;; "The poor young woman could augur nothing favorable ;;; as she listened to the threatening heavens..." ;;; ;;---------------------------------------------------------- ;;; The main part of the passage consists of two clauses that ;;; are the antecedent - consequent of each other. ;;; ;;; ;;; ANT: The woman listens to change [in the heavens]. ;;; CQ: The woman augurs a nothing favorable. ;;; ;;---------------------------------------------------------- ;;; (possible problem: what is the woman actually listening to?) ;;; the "heavens", the "threatening" heavens, or the "changes" of it? ;;; ;;; I decided to have her listen to the "change" in the heavens. ;;; ;;---------------------------------------------------------- ;;; the first clause: ;;; The woman listens to change [in the heavens]. ;;---------------------------------------------------------- ;(show (describe (add agent *theWoman act (build action *listen object *instChange) ) = Woman_listens_To_Heavens ) ;) ;;---------------------------------------------------------- ;;; the second clause: ;;; The woman augurs nothing favorable. ;;---------------------------------------------------------- ;(show (describe (add agent *theWoman act (build action (build lex "augur") = augur object *nothingFavorable ) ) = Woman_augurs_Nothing ) ;) ;;---------------------------------------------------------- ;;; mark the word "augur" as "unknown" ;;---------------------------------------------------------- (describe (assert object *augur property (build lex "unknown"))) ;;---------------------------------------------------------- ;;; combine both of the above clauses into cause - effect ;;; ;;; CAUSE: The woman listens to change [in the heavens]. ;;; EFFECT: The woman augurs a nothing favorable. ;;---------------------------------------------------------- ;(show (describe (add cause *Woman_listens_To_Heavens effect *Woman_augurs_Nothing)) ;:format ps) ;;---------------------------------------------------------- ;;; INFORMATION FROM PROTOCOLS ;;; ;;; I took protocols on this context from myself before I ;;; knew what "augur" meant. I will represent some of the ;;; inferences I made here. ;; ;;---------------------------------------------------------- ;;; if: a person interprets a change, ;;; and the days are credulous, ;;; then: the change is interpreted to be a "bad omen" ;;; ;;---------------------------------------------------------- ;(show (describe (add forall *person ant ( (build agent *person act (build action *interpret object *instChange)) (build object *days property *credulous) ) cq (build equiv *instChange equiv (build lex "bad omen") = badOmen) )) ;:format ps) ;;---------------------------------------------------------- ;;; If the act of "interpreting change" caused some act Y, ;;; and "change" is equiv to Z, then Z causes Y as well. ;;; ;;; ;;; *this should make "bad omen" a cause of the augur act. ;;; ;;---------------------------------------------------------- ;(show (describe (add forall (*person $x6 $y6 $z6 $a6 $b6) &ant ( (build cause (build agent *person act (build action *interpret object *instChange)) effect (build agent *person act (build action *a6 object *b6)) = aact ) (build equiv *x6 equiv *z6) ) cq (build cause *z6 effect *aact) )) ;:format ps) ;;---------------------------------------------------------- ;;; A "bad omen" is related to "nothing favorable" ;;; ;;; *This is another thing I came up with when I took ;;; protocols on this passage myself. I don't know if it actually ;;; adds anything important to this representation. ;;---------------------------------------------------------- (describe (add object *badOmen property *nothingFavorable)) ;;; End of representations ;;; Ask Cassie what "augur" means: ;;---------------------------------------------------------- ^(defineVerb 'augur)