Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CYC(34): (charniak-parse "The cat sat on the mat.")
- ((:S1 (:S (:NP (:DT "The") (:NN "cat")) (:VP (:VBD "sat") (:PP # #)) (:\. "."))))
- 156
- CYC(35):
- 2. OO oriented
- You can create a parser object and call its 'parse method,
- which returns a parse-tree object that has many methods which
- I won't describe here:
- CYC(38): (csetq parser (new-charniak-parser))
- #<CHARNIAK-PARSER (Error handling: :THROW) @ #x942761fa>
- CYC(39): (fim parser 'parse "The cat sat on the mat.")
- #<P(S):
- #<P(NP):
- #<W(DT): The>
- #<W(NN): cat>
- >
- #<P(VP):
- #<W(VBD): sat>
- #<P(PP):
- #<W(IN): on>
- #<P(NP):
- #<W(DT): the>
- #<W(NN): mat>
- >
- >
- >
- #<W(.): .>
- >
- CYC(40):
- 3. Semantics
- To obtain actual CycL, use the cyclify function:
- CYC(43): (princ (cyclify "Daniel kissed Henrietta."))
- ((#$thereExists ?KISSED1245
- (#$thereExists ?DANIEL1248
- (#$thereExists ?HENRIETTA1249
- (#$and (#$isa ?HENRIETTA1249 #$FemaleHuman) (#$givenNames ?HENRIETTA1249 Henrietta)
- (#$isa ?DANIEL1248 #$MaleHuman) (#$givenNames ?DANIEL1248 Daniel)
- (#$isa ?KISSED1245 #$Kissing) (#$performedBy ?KISSED1245 ?DANIEL1248)
- (#$objectActedOn ?KISSED1245 ?HENRIETTA1249))))))
- ((#$thereExists ?KISSED1245
- (#$thereExists ?DANIEL1248 (#$thereExists ?HENRIETTA1249 (#$and # # # # # # #)))))
- CYC(44):
- wff-checking is on by default, but can be turned off (which doesn't make any difference
- here):
- CYC(44): (princ (cyclify "Daniel kissed Henrietta." '(:wff-check? nil)))
- ((#$thereExists ?KISSED1251
- (#$thereExists ?DANIEL1254
- (#$thereExists ?HENRIETTA1255
- (#$and (#$isa ?HENRIETTA1255 #$FemaleHuman) (#$givenNames ?HENRIETTA1255 Henrietta)
- (#$isa ?DANIEL1254 #$MaleHuman) (#$givenNames ?DANIEL1254 Daniel)
- (#$isa ?KISSED1251 #$Kissing) (#$performedBy ?KISSED1251 ?DANIEL1254)
- (#$objectActedOn ?KISSED1251 ?HENRIETTA1255))))))
- ((#$thereExists ?KISSED1251
- (#$thereExists ?DANIEL1254 (#$thereExists ?HENRIETTA1255 (#$and # # # # # # #)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement