;;;======================================================================= ;;; FILENAME: ceilidh.demo ;;; ;;; DATE: March, 2004 ;;; PROGRAMMER: Jun Xu ;;; modified, 17 june 2004, by wjr ;;;======================================================================= ;;; Two ill-dressed people... sat around a fire where the common meal was ;;; almost ready. The mother... peered at her son through the oam of the ;;; bubbling stew. It had been a long time since his last ceilidh and Tobar ;;; had changed greatly. ... AS they ate, Tobar told his past year... Then ;;; all too soon, their breif ceilidh over, Tobar walked over to touch his ;;; mother's arm and quickly left. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Turn off inference tracing. ;; This is optional; if tracing is desired, then delete this. ^ (setq snip:*infertrace* nil) ;; Load the appropriate definition algorithm: ^ (load "/projects/rapaport/CVA/STN2/defun_noun.cl") ;; Clear the SNePS network: (resetnet) ;; enter the "snip" package: ^ (in-package snip) ;; turn on full forward inferencing: ^ (defun broadcast-one-report (represent) (let (anysent) (do.chset (ch *OUTGOING-CHANNELS* anysent) (when (isopen.ch ch) (setq anysent (or (try-to-send-report represent ch) anysent))))) t) ;;re-enter the "sneps" package: ^ (in-package sneps) ;;load all pre-defined relations: (intext "/web/faculty/rapaport/CVA/Ceilidh/rels") ;;load all pre-defined path definitions: (intext "/web/faculty/rapaport/CVA/Ceilidh/paths") ;;load background knowledge (demo "/web/faculty/rapaport/CVA/Ceilidh/ceilidh.base") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;CASSIE READS THE PASSAGE: ;;Two ill-dressed people ... sat around a fire where the commom meal was almost ready. ;There is an ill-dressed person. (describe (add member #people1 class (build mod (build lex ill-dressed) head (build lex people)))) ;; Newly inferred information: ;; ;; The ill-dressed person is a person. ;; ;His name is Tobar. (describe (add object *people1 proper-name (build lex Tobar))) ;There is another ill-dresses person. (describe (add member #people2 class (build mod (build lex ill-dressed) head (build lex people)))) ;; Newly inferred information: ;; ;; This ill-dressed person is a person. ;; ;The other person is Tobar's mother. (describe (add possessor *people1 rel (build lex mother) object *people2)) ;There is a fire. (describe (add member #fire class (build lex fire))) ;; Newly inferred information: ;; ;; The fire is probably outdoor. ;; ; There is a place around the fire. (describe (add object1 #aroundfire rel (build lex around) object2 *fire)) ;; Newly inferred information: ;; ;; The place is probably outdoor. ;; ;There is a time when Tobar sat at the place around the fire. (describe (add agent *people1 act (build action (build lex sit)) location *aroundfire time #sittime)) ;; Newly inferred information: ;; ;; At this time Tobar is probably outdoor. ;; ;At the same time mother sat at the place around the fire. (describe (add agent *people2 act (build action (build lex sit)) location *aroundfire time *sittime)) ;; Newly inferred information: ;; ;; At this time mother is probably outdoor. ;; ;There is a current time (now1) that is the subinterval of the time when they sat. (describe (add superinterval *sittime subinterval #now)) ;There is a common meal (describe (add member #commonmeal class (build mod (build lex common) head (build lex meal)))) ;;Newly inferred information: ;; ;; The common meal is a meal. ;; The common meal is food. ;; ;There is a time when the common meal was almost ready. (describe (add object *commonmeal property (build mod (build lex almost) head (build lex ready)) time #mealtime)) ;current time is also the subinterval of the time when the meal was almost ready. (describe (add superinterval *mealtime subinterval *now)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;The mother ... peared at her son through the oam of the bubbling stew. ;;It had been a long time since his last ceilidh and Tobar had changed greatly. ;There is last ceilidh (describe (add member #lastceilidh class (build lex ceilidh))) ;Ceilidh is an unknown word. (describe (add object (build lex ceilidh) property (build lex unknown))) ;It was Tobar's last ceilidh. (describe (add possessor *people1 rel (build lex "last ceilidh") object *lastceilidh)) ;There is a time for the last ceilidh. (describe (add object *lastceilidh time #lasttime)) ;There is a finish time of last ceilidh, and the finish time is the final subinterval of the last ceilidh. (describe (add superinterval *lasttime final-subinterval #lastfinishtime)) ;; Newly inferred information: ;; ;; There is an initial time of last ceilidh. ;; The initial time of last ceilidh is before the finish time. ;; Last ceilidh is an event. ;; Probably ceilidh is subclass of event. ;; ;It has been a long time since last time. (describe (add before *lastfinishtime after *now duration (build lex long\ time))) ;; Newly inferred information: ;; ;; The initial time of last ceilidh is before current time. ;; ;At a time, mother found that Tobar had changed greatly in a period of time. (describe (add agent *people2 act (build action (build lex find) object (build agent *people1 act (build action (build mode (build lex greatly) head (build lex change))) time #changetime)) time #findtime)) ;The time when mother found Tobar had changed is a superinterval of current time. (describe (add subinterval *now superinterval *findtime)) ;The time period When Tobar changed began at the final subinterval of las ceilidh. (describe (add initial-subinterval *lastfinishtime superinterval *changetime)) ;; Newly inferred information: ;; ;; At the time when mother found Tobar changed, Tobar and mother had a meeting. ;; The current time is the subinterval of this meeting time. ;; There is another meeting which is Tobar and mother's last meeting. ;; The last meeting had a time, and this time ended at the inital time of Tobar's change. ;; The end time of last meeting is long time before current time. ;; ;The period of time when Tobar changed ended at current time. (describe (add final-subinterval *now superinterval *changetime)) ;There is this ceilidh. (describe (add member #thisceilidh class (build lex ceilidh))) ;This ceilidh is the next one of last ceilidh. (describe (add last *lastceilidh next *thisceilidh)) ;There is a time for time ceilidh. (describe (add object *thisceilidh time #thistime)) ;Current time is a subinterval of the time of this ceilidh. (describe (add subinterval *now superinterval *thistime)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;As they ate, Tobar told of his past year. ;There is a new current time (now2) after the previous time (now1). (describe (add before *now after #now)) ;; Newly inferred information: ;; ;; Current time (now2) is long time after the final time of last ceilidh. ;; Current time is after the initial time of last ceilidh. ;; ;At a time, they eat meal. (describe (add agent *people1 act (build action (build lex eat) object *commonmeal) time #eattime)) (describe (add agent *people2 act (build action (build lex eat) object *commonmeal) time *eattime)) ;At the same time, Tobar told of his past year to his mother. (describe (add agent *people1 act (build action (build lex tell) object (build skf "past-year-of" arg2 *people1)) to *people2 time *eattime)) ;; Newly inferred information: ;; ;; Tobar told story. ;; ;The current time is a subinterval of their eating time. (describe (add subinterval *now superinterval *eattime)) ;; Newly inferred information: ;; ;; Current time (now2) is shortly after previous time (now1). ;; Tobar and mother had this meeting at a time. ;; Current time (now2) is the subinterval of this meeting time. ;; Tobar and mother had last meeting at a time. ;; The final time of last meeting is one year before current time. ;; THe final time of last meeting is one year before previous time (now1). ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;Then all too soon, their breif ceilidh over. ;There is a new current time (now3) shortly after previous time (now2). (describe (add before *now after #now duration (build lex short))) ;; Newly inferred information: ;; ;; This new current time (now3) is after the first current time (now1). ;; This new current time is long time after the final time of last ceilidh. ;; This new current time is after the initial time of last ceilidh. ;; This new current time is after the final time of last meeting. ;; ;This ceilidh is Tobar's this ceilidh. (describe (add possessor *people1 rel (build lex "this ceilidh") object *thisceilidh)) ;This ceilidh is mother's this ceilidh. (describe (add possessor *people2 rel (build lex "this ceilidh") object *thisceilidh)) ;This ceilidh is over at current time. (describe (add agent *thisceilidh act (build action (build lex finish)) time *now)) ;; Newly inferred information: ;; ;; Current time is the final time of this ceilidh. ;; There is an initial time of this ceilidh. ;; The initial time is before the current time. ;; The initial time is before the first previous time (now1). ;; The initial time is beofore the second previous time (now2). ;; The second previous time is a subinterval of this ceilidh. ;; This ceilidh is an event. ;; This ceilidh is a gathering. ;; Ceilidh is probably a subclass of gathering. ;; ;This ceilidh is brief. (describe (add object *thisceilidh property (build lex brief))) ;; Newly inferred information: ;; ;; The time between the inital and the final time of this ceilidh is short. ;; The initial time of this ceilidh is short after the first previous time (now1). ;; The initial time of this ceilidh is short after the second previous time (now2). ;; Current time is short after the first previous time (now1). ;; The initial time of this ceilidh is long after the final time of last one. ;; The initial time of this ceilidh is after the initial time of last one. ;; The initial time of this ceilidh is one year after the final time of last meeting. ;; The initial time of this ceilidh is a subinterval of Tobar's change time. ;; The initial time of this ceilidh is after the inital time of last ceilidh. ;; ;; Ask Cassie what "ceilidh" means: ^ (defineNoun "ceilidh") ;Cassie didn't get the frequency of one year, because SNePS didn't infer that the two "next meeting" are the same meeting from Rule 25. But all the antecedant of Rule 25 are satisfied. For example: (describe m145) (describe m174) ;Add these information again. (describe (add agent b1 act m142 time m138)) (describe (add last m173 next m174)) ;; Newly inferred information: ;; ;; The two "last meeting" are same meeting. ;; ;Add the newly inferred information again. (describe (add equiv m143 equiv m173)) ;; Newly inferred information: ;; ;; The final time of the two "last meeting" are same. ;; The final time of last ceilidh is one year before the inital time of this one. ;; The final time of last ceilidh is one year before the first previous time (now1). ;; The final time of last ceilidh is one year before the second previous time (now2). ;; The final time of last meeting is long time before the inital time of this ceilidh. ;; The final time of last meeting is long time before the current time. ;; The final time of last meeting is long time before the second previous time (now2). ;; The final time of last meeting is long time before the first previous time (now1). ;; ;; Ask Cassie what "ceilidh" means: ^ (defineNoun "ceilidh")