further pronoun support; naive resolution heuristic still binding too many referents

parent 8dc6b3b3
......@@ -82,7 +82,7 @@
{:id (uuid)
:form "dough"
:pos "N"
:type :ingredient
:type "Ingredient"
:numerus "Singular"}
{:id (uuid)
:form "cups"
......@@ -273,6 +273,24 @@
]
:search-preference :min-bindings
}
{:id :pronoun ; Binding pronoun to referent of other noun. TODO: Use distance-heuristic
:match [[(? :interpretation) :lexicon (? :lex)]
[(? :interpretation) :isa "PPRON"]
[(? :prec-ref) :isa "Referent"]
[(? :prec-noun-intp) :isa "N"]
[(? :prec-noun-intp) :referent (? :prec-ref)]
[(? :prec-noun-intp) :numerus (? :num)]
]
:call (mapcat
(fn [b]
(map (fn [lex]
(assoc b (? :num) (:numerus lex)))
(get lex-by-id (get b (? :lex))))))
:merge [[(? :interpretation) :referent (? :prec-ref)]
[(? :interpretation) :numerus (? :num)]
]
;:search-preference :min-bindings
}
{:id :root-verb
:match [[(? :v-intp) :lexicon (? :lex)]
[(? :v-intp) :isa "V"]]
......@@ -350,6 +368,7 @@
[(? :ref) :physical-type :discourse-addressee]
[(? :ref) :tag "semantic"]
[(? :vp) :syn-valence (? :syn-val)]
[(? :syn-val) :isa :syn-valence]
[(? :syn-val) :subject (? :subj)]
[(? :syn-val) :tag "syntax"]
[(? :vp) :sem-valence (? :sem-val)]
......@@ -425,18 +444,35 @@
[(? :v) :word (? :v-word)]
[(? :vp) :syn-valence (? :syn-val)]
[(? :vp) :sem-valence (? :sem-val)]
[(? :obj) :subunit (? :det)]
[(? :det) :isa "DET"]
[(? :det) :word (? :det-word)]
[(? :obj) :subunit (? :ling-ref-expr)]
[(? :ling-ref-expr) :word (? :ling-ref-expr-word)]
[(? :obj) :isa "NP"]
[(? :obj) :referent (? :ref)]
[(? :ref) :isa "Referent"]
[(? :clause) :subunit (? :vp)]
[(? :v-word) :meets (? :det-word)]
[(? :v-word) :meets (? :ling-ref-expr-word)]
]
:merge [[(? :clause) :subunit (? :obj)]
[(? :vp) :subunit (? :obj)]
[(? :syn-val) :object (? :obj)]
[(? :sem-val) :patient (? :ref)][]]}
[(? :sem-val) :patient (? :ref)]]}
{:id :transitive-pronoun
:match [[(? :vp) :isa "VP"]
[(? :vp) :head (? :v)]
[(? :v) :word (? :v-word)]
[(? :vp) :syn-valence (? :syn-val)]
[(? :vp) :sem-valence (? :sem-val)]
[(? :ling-ref-expr) :isa "PPRON"]
[(? :ling-ref-expr) :word (? :ling-ref-expr-word)]
[(? :ling-ref-expr) :referent (? :ref)]
[(? :ref) :isa "Referent"]
[(? :clause) :subunit (? :vp)]
[(? :v-word) :meets (? :ling-ref-expr-word)]
]
:merge [[(? :clause) :subunit (? :ling-ref-expr)]
[(? :vp) :subunit (? :ling-ref-expr)]
[(? :syn-val) :object (? :ling-ref-expr)]
[(? :sem-val) :patient (? :ref)]]}
{:id :PP ; PrepNP
:match [[(? :p) :isa "PREP"]
[(? :p) :word (? :p-word)]
......@@ -589,12 +625,20 @@
]}
{:id :cause-motion-goal-oriented
:match [[(? :vp) :sem-valence (? :sem-val)]
[(? :vp) :syn-valence (? :syn-val)]
[(? :syn-val) :isa :syn-valence]
[(? :syn-val) :object (? :obj)]
[(? :sem-val) :isa :sem-valence]
[(? :sem-val) :agent (? :agent)]
[(? :sem-val) :patient (? :trajector)]
[(? :vp) :head (? :verb)]
[(? :verb) :evokes (? :verb-schema)]
[(? :pp) :evokes (? :spg)]
[(? :pp) :subunit (? :prep)]
[(? :prep) :word (? :prep-word)]
[(? :obj) :subunit (? :ling-ref-expr)]
[(? :ling-ref-expr) :word (? :traj-word)]
[(? :traj-word) :meets (? :prep-word)]
[(? :spg) :has-constituent (? :path-role)]
[(? :path-role) :isa "Path"]
[(? :path-role) :classifies (? :path)]
......@@ -701,7 +745,6 @@
[(? :linked-2) :isa "Linked-2"]
[(? :linked-2) :tag "semantic"]
]}
;TODO Link TerminalState with Covered-Schema TODO
{:id :instrumental-PP-process ; "Whisk with a spoon."
:match [[(? :clause) :subunit (? :vp)]
[(? :vp) :isa "VP"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment