; ======================================================================= ; FILENAME: phcr.demo ; DATE: 03/15/2004 ; PROGRAMMER: Dmitriy Dligach ; ======================================================================= ; 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") ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ; BACKGROUND KNOWLEDGE: ; ===================== ; if A1 removes his hat and A2 eyes something ; then A2 is seeing A1's scalp (add forall ($a1 $a2 $h $s) &ant ( (build agent *a1 act (build action (build lex "remove") object *h)) (build object *h rel (build lex "hat") possessor *a1) (build agent *a2 act (build action (build lex "eye") object *s)) ) cq (build min 2 max 2 arg ((build agent *a2 act (build action (build lex "see") object *s)) (build object *s rel (build lex "scalp") possessor *a1)))) ; if A2 (who prefers "ageless" men) is seeing A1's scalp ; and A2 grimaces, then A2 is looking at baldness (add forall (*a1 *a2 *s) &ant ( (build agent *a2 act (build action (build lex "see") object *s)) (build object *s rel (build lex "scalp") possessor *a1) (build agent *a2 act (build action (build lex "grimace"))) (build agent *a2 act (build action (build lex "prefer") object (build lex "ageless men"))) ) cq (build agent *a2 act (build action (build lex "eye") object (build lex "baldness")))) ; if A2 is looking at two things at the same time, ; these things are equivalent (add forall (*a2 $x $y) &ant ( (build agent *a2 act (build action (build lex "eye") object *x)) (build agent *a2 act (build action (build lex "eye") object *y)) ) cq (build member *x class *y)) ; CASSIE READS THE PASSAGE: ; ========================= ; when he removed his hat, she, who preferred "ageless" men, ; eyed his increasing phalacrosis and grimaced. ; phalacrosis ; n: the condition of having no hair (especially on the top of the head) ; [syn: baldness, hairlessness] ; #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")) ; object *hat is a member of class hat (add member #hat class (build lex "hat")) ; object *head is a member of class head (add object #head class (build lex "head")) ; object *phalacrosis is a member of class phalacrosis (add member #phalacrosis class (build lex "phalacrosis")) ; Henry removed his hat (add agent *he act (build action (build lex "remove") object *hat)) ; the hat belonged to Henry (add object *hat rel (build lex "hat") possessor *he) ; the hat was on his head (add object *hat location *head) ; the head belonged to Henry (add object *head rel (build lex head) possessor *he) ; she preferred "ageless" men (add agent *she act (build action (build lex "prefer") object (build lex "ageless men"))) ; she eyed his phalacrosis (add agent *she act (build action (build lex "eye") object *phalacrosis)) ; phalacrosis is Henry's (add object *phalacrosis rel (build lex "phalacrosis") possessor *he) ; she grimaced (add agent *she act (build action (build lex "grimace"))) ; Ask Cassie what "WORD" means: ^(defineNoun "phalacrosis")