;;; Reset the network (resetnet t) ;;; Don't trace infer ^(setq snip:*infertrace* nil) ;;; Load all valid relations (intext "/projects/stn2/CVA/demos/rels") ;;; Compose paths ;;;(intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ;;; Load Ehrlich Algorithm ;;;^(load "/projects/rapaport/CVA/mkb3.CVA/src/defn3") ;;;^(load "../src/synfn") ;;;^(load "/projects/rapaport/CVA/mkb3.CVA/src/fast.code") ;;; Load Background Knowledge (intext "/projects/stn2/CVA/demos/cat.base") ;;; Begin Reading Story ;;; Pyewacket is a cat (describe (add object1 #Pye rel "ISA" object2 (build lex "cat"))) (describe (assert object *Pye proper-name (build lex "Pyewacket"))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Evelyn is a person (describe (add member #Evelyn class (build lex "person"))) (describe (assert object *Evelyn proper-name (build lex "Evelyn"))) ;;; Pyewacket is Evelyn's cat (describe (add object *Pye possessor *Evelyn rel (build lex "cat"))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Pyewacket bears kittens (describe (add agent *Pye act (build action (build lex "bear") object #kittens1))) (describe (add object1 *kittens1 rel "ISA" object2 (build lex "kitten"))) ;;; Kittens are young cats (describe (add subclass (build lex "kitten") superclass (build lex "cat"))) (describe (add forall $kitty ant (build object1 *kitty rel "ISA" object2 (build lex "kitten")) cq (build object *kitty property (build lex "young")))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Frisky is a cat (describe (add object1 #Frisk rel "ISA" object2 (build lex "cat"))) (describe (assert proper-name (build lex "Frisky") object *Frisk )) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Frisky sleeps in an armchair (describe (add agent *Frisk act (build lex "sleep") place #armch )) (describe (assert member *armch class (build lex "chair"))) (describe (assert object1 *armch rel "ISA" object2 (build lex "armchair"))) (describe (assert subclass (build lex "armchair") superclass (build lex "chair"))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Presumably, cats purr (describe (add forall $cat ant (build object1 *cat rel "ISA" object2 (build lex "cat")) cq (build mode (build lex "presumably") object (build agent *cat act (build lex "purr"))))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Presumably, cats hunt (describe (add forall *cat ant (build object *cat rel "ISA" object2 (build lex "cat")) cq (build mode (build lex "presumably") object (build agent *cat act (build lex "hunt"))))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Cats are mammals (describe (add subclass (build lex "cat") superclass (build lex "mammal"))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Cats are predators (describe (add subclass (build lex "cat") superclass (build lex "predator"))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Cats are quadrupeds (describe (add subclass (build lex "cat") superclass (build lex "quadruped"))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; Presumably, cats have whiskers (describe (add forall *cat ant (build object1 *cat rel "ISA" object2 (build lex "cat")) cq ((build mode (build lex "presumably") object (build part (build skf "whisker-of" a1 *cat) = whisker1 whole *cat)) (build object1 *whisker1 rel "ISA" object2 (build lex "whisker"))))) ;;; What is the meaning of cat? ^(defineNoun "cat") ;;; End Reading Story