; ======================================================================== ; SNePS representation of: ; ; (1) Pat knows Mike's telephone number. ; (2) He dialed it. ; (3) Pat doesn't know Mary's telephone number, ... ; (4) ...but Mary's number is the same as Mike's number. ; (5) [a node-based rule that allows SNePS/Cassie to infer that Pat ; *dialed* Mary's telephone number but that will *not* allow ; SNePS/Cassie to infer that Pat *knows* Mary's telephone number.] ; ======================================================================== ; First, we define some SNePS relations: (define agent act action object member class lex propername mod head rel possessor equiv) ; 1. Pat knows Mike's telephone number. ; 1a. Something has the proper name "Pat" (describe (assert object #pat propername "Pat")) ; unrepresented background knowledge (UBK): ; - "John" is typically the name of a human (of unknown sex!) ; 1b. Something has the proper name "Mike" (describe (assert object #mike propername "Mike")) ; UBK: "Mike" is typically the name of a *male* human ; 1c. Something is Mike's telephone number. (describe (assert object #MIKEtelnum rel (build lex "telephone\ number") = istelnumof possessor *mike)) ; Note: "istelnumof" will be a SNePSUL variable containing the node ; that represents the relation "is a telephone number of"; ; we'll need to point to this node later, so storing it in a ; SNePSUL variable now renders it unnecessary to re-build it later. ; ; UBK: information about telephones, their numbers ; more detailed representation of "telephone number" ; 1d. Pat knows Mike's telephone number. (describe (assert agent *pat act (build action (build lex "know") = know-action object *MIKEtelnum))) ; 2. He dialed it. (describe (assert agent *pat act (build action (build lex "dial") = dial-action object *MIKEtelnum))) ; UBK: temporal information (past tense) ; ; Notes: ; (a) Inference is needed to determine that "he" is "Pat" ; and that "it" is Mike's telephone number; this can ; be supplied by our pronoun-resolution algorithm: ; See: Li, Naicong (1986), "Pronoun Resolution in SNePS", ; SNeRG Technical Note 18, (Buffalo: UB Department of Computer Science), ; ; (b) This inference also tells us that Pat is male. ; 3. Pat doesn't know Mary's telephone number, ... ; 3a. Something has the proper name "Mary". (describe (assert object #mary propername "Mary")) ; 3b. Something is Mary's telephone number. (describe (assert object #MARYtelnum rel *istelnumof possessor *mary)) ; 3c. Pat doesn't know Mary's telephone number. ; i.e., it is not the case that Pat knows Mary's telephone number. (describe (assert min 0 max 0 arg (build agent *pat act (build action *know-action object *MARYtelnum)))) ; 4. ...but Mary's number is the same as Mike's number. ; All of Cassie's beliefs are implicitly conjoined, ; so there's no need to represent "but". ; If necessary, that can be done using "andor" ; (Recall that, from a logical point of view, "and" and "but" ; are synonymous; i.e., they have the same truth table. ; They are *pragmatically* different, of course; for some ; discussion, see Segal et al. 19xx.) (describe (assert equiv *MARYtelnum equiv *MIKEtelnum)) ; 5. Rule allowing inference that Pat dialed *MARYtelnum ; but blocking inference that Pat knows *MARYtelnum ; One way to allow the inference that Pat dialed Mary's ; number even though he doesn't know it in such a way ; that we also don't infer that Pat knows it is to categorize ; verbs as "transparent" (allowing the inference; these will ; usually be physical-action verbs) and "opaque" (not allowing ; the inference; these will usually be mental-action verbs). ; For discussion, see the "SNePS and Intensionality" website, ; . ; First, let's categorize "dial" as a transparent verb: (describe (assert member *dial-action class (build mod (build lex "transparent") head (build lex "verb")) = transparent-class ) ) ; Notes: ; (a) I didn't need to introduce the "mod-head" case frame ; (I could have just used an expression "transparent\ verb", ; leaving its analysis for another time [this is good top-down ; design/stepwise analysis technique, also known as "procrastination"], ; but I wanted to introduce that case frame, since I think you'll ; find it useful. ; ; (b) Arguably, this information should be stored in the lexicon entry ; for "dial". This is a matter for future research, when we have ; a working grammar. ; Now for the rule: ; If an agent performs an action w.r.t. some object, ; & that action is transparent ; & and some other (i.e., intensionally distinct) ; object is (extensionally) equivalent to the ; first object, ; then the agent performs the action w.r.t. that other object, too. (describe (assert forall ($agt $actn $obj1 $obj2) &ant (build agent *agt act (build action *actn object *obj1)) &ant (build member *actn class *transparent-class) &ant (build equiv *obj1 equiv *obj2) cq (build agent *agt act (build action *actn object *obj2)))) ; To test this rule, we can ask Cassie if Pat dials Mary's number ; and if Pat knows Mary's number. She should infer that Pat dials ; it, but she should not infer that Pat knows it; the latter will ; be shown by Cassie being silent, which is her way of indicating ; that she does not know whether Pat knows it. ; Who dials what? (describe (deduce agent $who act (build action *dial-action object $what))) ; Who knows what? (describe (deduce agent $who2 act (build action *know-action object $what2))) ; Syntax & Semantics of New Case Frame: ; -------------------------------------- ; m: mod x head y ; [[m]] = a structured individual that is a [[y]] modified by [[x]] ; ; UBK for the obj-rel-poss case frame: ; - if x is y's z, then x is a z