;Detritus Demo ;Charlotte Devensky ;CSE 740 CVA Seminar ;This demo is organized by first presenting inference rules, then ;background knowledge, then the actual passage. (resetnet t) ;This clears the network. ;this loads up the noun definition algorithm ^ (load "/projects/stn2/CVA/defun_noun.cl") ;This defines the labels that the case frames use in this program. (define agent act action object lex member class superclass subclass property mod head build mode) ;Inference rule 1 ;If x and other y do action z, then x is a kind of y (describe (add forall ($x $y $w $z) &ant ((build agent *x act (build action *z object *w)) (build agent (build head *y mod (build lex "other")) act(build action *z object *w))) cq (build subclass *x superclass *y))) ;Inference Rule 2 ;If x is a subclass of z and x is a subclass of y, and z has the ;property unknown, and y is a subclass of w, then presumbaly, z is a ;subclass of y, and z is a subclass of w. (describe (add forall ($x $y $z $w) &ant ((build subclass *x superclass *z) (build subclass *x superclass *y ) (build object *z property (build lex "unknown")) (build subclass *y superclass *w)) cq ((build mode (build lex "presumably") object (build subclass *z superclass *y)) (build subclass *z superclass *w)))) ;These paths are defined so that Cassie can do path based reasoning. ;Superclass path (define-path superclass (compose superclass (kstar (compose subclass- ! superclass)))) ;Subclass path (define-path subclass (compose subclass (kstar (compose superclass-! subclass)))) ;This is the background knowledge proposed by Jeff Galko based on ;evidence from human protocols. ;Soaked leaf litter is a subclass of dirt or foliage. (describe (add subclass (build lex "soaked\ leaf\ litter") superclass (build lex "dirt\ or\ foliage"))) ;Dirt or foliage is a subclass of miscellaneous stuff. (describe (add subclass (build lex "dirt\ or\ foliage") superclass (build lex "miscellaneous\ stuff"))) ;The passage. ;This is a modified version of the passage "Soaked leaf litter and ;other detritus yielded tannin-rich tea." The passage ;was split into two sentences. ;Soaked leaf litter yieled tannin rich tea. (describe (add agent (build lex "soaked\ leaf\ litter") act (build action (build lex "yield") object (build lex "tannin\ rich\ tea")))) ;Other detritus yielded tannin rich tea. (describe (add agent (build head (build lex "detritus") mod (build lex "other")) act (build action (build lex "yield") object (build lex "tannin\ rich\ tea")))) ;Detritus has the property unknown (describe (add object (build lex "detritus") property (build lex "unknown"))) ;now to define the noun ^ (defineNoun "detritus")