; ======================================================================= ; FILENAME: emvasally.demo ; DATE: Nov 13, 2006 ; PROGRAMMER: TJ Burns ; ; ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; Lines beginning with "%" are SNePSUL commands. ; All other lines are SNePSLOG commands. ; ; To use this file: run SNePSLOG; at the SNePSLOG prompt (:), type: ; ; demo "emvasally.demo" av ; ; Make sure all necessary files are in the current working directory ; or else use full path names. ; ======================================================================= ; Set SNePSLOG mode = 3 set-mode-3 ; Turn off inference tracing; this is optional. ; If tracing is desired, enter "trace" instead of "untrace": untrace inference ; Clear the SNePS network: clearkb ; OPTIONAL: ; UNCOMMENT THE FOLLOWING CODE TO TURN FULL FORWARD INFERENCING ON: ; ; ^(cl:load "/projects/rapaport/CVA/STN2/ff") ; Case Frames: ; ===================== ;[[Does(x,y,z)]] = The proposition that agent [[z]] performs the act ; [[y]] in the way given by [[w]]. define-frame Does(nil act way agent) ;[[degree-to-which(x,y)]] = The concept of the degree [[y]] to which ; the manner given by [[x]] is specified. define-frame degree-to-which(nil manner degree) ;[[MeaningUnknown(x)]] = The proposition that the word [[x]] has an unknown ; meaning. define-frame MeaningUnknown(nil word) ;[[HasProperty(x,y)]] = The proposition that object [[y]] has the ; property [[x]] at time. define-frame HasProperty(nil property object) ;[[amt-in-units(x,y)]] = The concept of the amount [[x]] given in the ; units of [[y]]. define-frame amt-in-units(nil amount unit) ;[[concept-called(x)]] = The concept given by [[x]]. define-frame concept-called(nil lex) ;[[Isa(x,y)]] = The proposition that [[x]] is a member of the class [[y]]. define-frame Isa(nil member class) ;[[action-wrt(x,y)]] = The act of performing action [[x]] with respect ; to object [[y]]]. define-frame action-wrt(nil action object) ;[[Before(x,y)]] = The proposition that time [[x]] is before time [[y]] define-frame Before(nil before after) ;[[TimeInterval(x,y)]] = The proposition that time in the interval given by [[x]] ; is [[y]] define-frame TimeInterval(nil interval dur) ;[[EventTime(x,y,z)]] = The proposition that some event or state [[x]] lasts ; for the time interval from [[y]] to [[z]]. define-frame EventTime(nil arg stime etime) ;[[Has(x,y,z)]] = The proposition that [[x]] is a [[y]] of [[z]]; define-frame Has(nil object rel possessor) ; Unconscious (Path) Knowledge: ; ===================== ; Notions about time: ;;; Make Before Transitive define-path before (compose before (kstar (compose after- ! before))). ;;; Make After Transitive define-path after (compose after (kstar (compose before- ! after))). ; BACKGROUND KNOWLEDGE: ; ===================== ; We need to included information that will help deduce that the young ; firm was lacking financially before the contract. ; 1) If x lands y at time t, then x receives y at time t. all(x,y,w,t)(EventTime(Does(action-wrt(concept-called(land),y),w,x),t,t) => EventTime(Does(action-wrt(concept-called(receive),y),w,x),t,t)). ; 2) If x receives y at time t1, then x has y for any future interval (t1,t2) all(x,y,w,z,t1,t2)({EventTime(Does(action-wrt(concept-called(receive),y),w,x),t1,t1), Before(t1,t2), Isa(y,z)} &=> EventTime(Has(y,z,x),t1,t2)). ; 3) If x has a government contract for some time interval t, then x has some money starting for the same interval. all(x,y,z,t1,t2)((EventTime(Has(y,z,x),t1,t2) and Isa(y,concept-called(governmentContract))) => EventTime(Has(some,concept-called(money),x),t1,t2)). ; 4) If x has some money during some interval (t1,t2), then x is not struggling during that interval. all(x,t1,t2)(EventTime(Has(some, concept-called(money),x),t1,t2) => EventTime(~HasProperty(concept-called(struggling),x),t1,t2)). ; 5) If x has some money and is not struggling at time interval (t2,t3), but x was struggling at time interval (t1,t2), then ; x did not have money during time interval (t1,t2). all(x,t1,t2,t3)({EventTime(Has(some, concept-called(money),x),t2,t3), EventTime(~HasProperty(concept-called(struggling),x),t2,t3),EventTime(HasProperty(concept-called(struggling),firm1),t1,t2), Before(t1,t2)} &=> EventTime(~Has(some, concept-called(money),x),t1,t2)). ; 6) If x does not have y during a time interval (t1,t2), and if x performs an action z in a certain manner w which has an unknown ; meaning, then it can be infered that performing z in the manner w implies that x does not have y for the same interval. ; (This will be our meaning postulate) all(x,y,Y,z,w,D,t1,t2)({EventTime(~Has(y,Y,x),t1,t2), EventTime(Does(z,degree-to-which(w,D),x),t1,t2), MeaningUnknown(w)} &=> (EventTime(Does(z,degree-to-which(w,D),x),t1,t2) => EventTime(~Has(y,Y,x),t1,t2))). ; CASSIE READS THE PASSAGE: ; ========================= ; "After operating slighty emvasally [in the red] for many months, ; the struggling young firm landed a large government contract." ; ; Part 1) "The struggling young firm operated slighty emvasally..." ; Note that we must constraing the struggling property to be in this time period ; since it might not be the case that the firm is always struggling. Isa(firm1, concept-called(Firm))! HasProperty(concept-called(young), firm1)! EventTime(HasProperty(concept-called(struggling), firm1), time1, time2)! ; Part 2) "[The struggling young firm] landed a large government contract." Isa(contract1, concept-called(governmentContract))! HasProperty(concept-called(large), contract1)! ; Now to combine parts 1 and 2 we need to introduce a theory of time: ; Use Before/After/Now theory and corresponding case frame. ; ; "Before...(Part 1)...for many months...[After]...(Part 2)." Before(time1,time2)! Before(time2,now)! TimeInterval(Before(time1,time2),amt-in-units(concept-called(many), concept-called(months)))! EventTime(Does(concept-called(operate), degree-to-which(concept-called(emvasally), concept-called(slightly)),firm1), time1, time2)! EventTime(Does(action-wrt(concept-called(land),contract1),concept-called(normal),firm1), time2, time2)! ; Cassie knows going into this that she does not know the meaning of "emvasally" MeaningUnknown(concept-called(emvasally))! ; Ask Cassie what she now knows: ; =============================== ; We will do this first by asking whether the firm had money before landing the contract ; (ie while operating emvasally) EventTime(~Has(some, concept-called(money),firm1),time1,time2)? ; Now we will ask the following question to determine if Cassie has deduced ; a reasonable conclusion about the meaning of emvasally: ; Does operating "emvasally" at a certain time imply a lack of money during that time? (EventTime(Does(concept-called(operate),degree-to-which(concept-called(emvasally),concept-called(slightly)),firm1),time1,time2) => EventTime(~Has(some,concept-called(money),firm1),time1,time2))?