From c6846bd3eff1d7a4c5a7cbb9b439ec78c5b44e18 Mon Sep 17 00:00:00 2001 From: Eugene Koontz Date: Sat, 3 Aug 2024 00:31:30 +0200 Subject: [PATCH] improve ergonomics change :X-verb-with & to :X-verb {:with Y} --- resources/english/lexicon/rules.edn | 36 +++++++++++++-------------- resources/english/lexicon/verbs.edn | 38 ++++++++++++++--------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/resources/english/lexicon/rules.edn b/resources/english/lexicon/rules.edn index 1570ae536..449a98d16 100644 --- a/resources/english/lexicon/rules.edn +++ b/resources/english/lexicon/rules.edn @@ -80,8 +80,8 @@ {:rule :prepositional-verb-with-none :if {:cat :verb - :prepositional-verb-with ::unspec} - :then [{:prepositional-verb-with :none + :prepositional-verb ::unspec} + :then [{:prepositional-verb :none :prepositional-verb? false}]} {:rule :prepositional-verb-true @@ -89,10 +89,10 @@ :prepositional-verb? ::unspec} :then [{:prepositional-verb? true}]} - {:rule :adjectival-verb-with-none + {:rule :adjectival-verb-none :if {:cat :verb - :adjectival-verb-with ::unspec} - :then [{:adjectival-verb-with :none + :adjectival-verb ::unspec} + :then [{:adjectival-verb :none :adjectival-verb? false}]} {:rule :adjectival-verb-true @@ -102,8 +102,8 @@ {:rule :nominal-verb-with-none :if {:cat :verb - :nominal-verb-with ::unspec} - :then [{:nominal-verb-with :none + :nominal-verb ::unspec} + :then [{:nominal-verb {:with :none} :nominal-verb? false}]} {:rule :nominal-verb-true @@ -466,8 +466,8 @@ :subcat {:2 {:cat :prep} :3 []}} :then (let [subj (atom :top) - with-preposition (atom :top)] - [{:prepositional-verb-with with-preposition + preposition (atom :top)] + [{:prepositional-verb {:with preposition} :reflexive? false :sem {:obj :none :iobj :none @@ -476,15 +476,15 @@ :2 {:cat :prep :subcat [] :phrasal? false - :canonical with-preposition} + :canonical {:with preposition}} :3 []}} (let [iobj (atom :top)] - {:prepositional-verb-with with-preposition + {:prepositional-verb-with {:with preposition} :sem {:obj :none :subj subj :iobj iobj} :subcat {:1 {:sem subj} - :2 {:root with-preposition + :2 {:root {:with preposition} :cat :prep :subcat [] :sem {:obj iobj}}}})])} @@ -493,8 +493,8 @@ :if {:cat :verb :adjectival-verb? true} :then (let [subj (atom :top) - with-adjective (atom :top)] - [{:adjectival-verb-with with-adjective + adjective (atom :top)] + [{:adjectival-verb {:with adjective} :reflexive? false :sem {:obj :none :iobj :none @@ -503,13 +503,13 @@ :2 {:cat :adjective :subcat [] :phrasal? false - :canonical with-adjective} + :canonical adjective} :3 []}}])} {:rule :nominal-arg-verbs-number ;; "have lunch", not "have lunches" :if {:cat :verb :nominal-verb? true} - :then [{:nominal-argument-number :sing}]} + :then [{:nominal-verb {:number :sing}}]} {:rule :nominal-arg-verbs ;; "have lunch" :if {:cat :verb @@ -517,8 +517,8 @@ :then (let [subj (atom :top) with-noun (atom :top) nominal-argument-number (atom :top)] - [{:nominal-verb-with with-noun - :nominal-argument-number nominal-argument-number + [{:nominal-verb {:with with-noun + :number nominal-argument-number} :reflexive? false :sem {:obj :none :iobj :none diff --git a/resources/english/lexicon/verbs.edn b/resources/english/lexicon/verbs.edn index 847dfb679..eedd2c72a 100644 --- a/resources/english/lexicon/verbs.edn +++ b/resources/english/lexicon/verbs.edn @@ -10,7 +10,7 @@ "arrive" [{:intransitive-only? true :sem {:pred :arrive}}] "ask" [{:sem {:pred :ask}} - {:prepositional-verb-with "for" + {:prepositional-verb {:with "for"} :sem {:pred :ask-for}}] "assure" [{ :sem {:pred :assure}}] "avoid" [{ :sem {:pred :avoid}}] @@ -164,7 +164,7 @@ "cause" [{:sem {:pred :cause}}] "change" [{:sem {:pred :change}} {:sem {:pred :change-clothes} - :nominal-verb-with "clothes"}] + :nominal-verb {:with "clothes"}}] "cheat" [{:sem {:pred :cheat}}] "clean" [{:sem {:pred :clean}}] "close" [{:sem {:pred :close}}] @@ -338,7 +338,7 @@ :sem {:pred :fall}} {:exceptions exceptions :sem {:pred :fall-asleep} - :adjectival-verb-with "asleep"}]) + :adjectival-verb {:with "asleep"}}]) "feed" [{:sem {:pred :feed} :exceptions [{:infl :past-simple @@ -370,13 +370,13 @@ :sem {:pred :get}} {:exceptions exceptions :sem {:pred :get-angry} - :adjectival-verb-with "angry"} + :adjectival-verb {:with "angry"}} {:exceptions exceptions :sem {:pred :get-married} - :adjectival-verb-with "married"} + :adjectival-verb {:with "married"}} {:exceptions exceptions :sem {:pred :get-up} - :prepositional-verb-with "up"}]) + :prepositional-verb {:with "up"}}]) "give" (let [exceptions [{:infl :past-simple :surface "gave"} {:infl :past-participle :surface "given"}]] @@ -401,7 +401,7 @@ :3 []}} {:exceptions exceptions - :prepositional-verb-with "out" + :prepositional-verb {:with "out"} :sem {:pred :go-out}}]) "guess" [{:sem {:pred :guess}}] @@ -460,21 +460,21 @@ {:sense 4 :aux? false :reflexive? false - :nominal-verb-with "dinner" + :nominal-verb {:with "dinner"} :sem {:pred :have-dinner} :exceptions non-aux-exceptions} {:sense 5 :aux? false :reflexive? false - :nominal-verb-with "fun" + :nominal-verb {:with "fun"} :sem {:pred :have-fun} :exceptions non-aux-exceptions} {:sense 6 :aux? false :reflexive? false - :nominal-verb-with "lunch" + :nominal-verb {:with "lunch"} :sem {:pred :have-lunch} :exceptions non-aux-exceptions}]) @@ -542,16 +542,16 @@ :mental-state? true}}] "linger" [{:sem {:pred :linger} :intransitive-only? true}] - "listen" [{:prepositional-verb-with "to" + "listen" [{:prepositional-verb {:with "to"} :sem {:pred :listen-to}}] "live" [{:sem {:pred :live}}] "look" [{:intransitive-only? true :sem {:pred :look}} - {:prepositional-verb-with "at" + {:prepositional-verb {:with "at"} :sem {:pred :look-at}} - {:prepositional-verb-with "for" + {:prepositional-verb {:with "for"} :sem {:pred :look-for}} - {:prepositional-verb-with "up" + {:prepositional-verb {:with "up"} :sem {:pred :look-up}}] "lose" (let [exceptions [{:infl :past-simple :surface "lost"} {:infl :past-participle :surface "lost"}]] @@ -608,7 +608,7 @@ "prevent" [{ :sem {:pred :prevent}}] ;; TODO: rewrite after better lexical support for ditransitive verbs (similar to what - ;; was done for {:prepositional-verb-with "X"}. + ;; was done for {:prepositional-verb {:with "X"}. "put" (let [exceptions [{:infl :past-simple :surface "put"} {:infl :past-participle :surface "put"}]] [{:intransitive-only? true @@ -768,7 +768,7 @@ :exceptions exceptions} {:sem {:pred :throw-out} - :prepositional-verb-with "out" + :prepositional-verb {:with "out"} :exceptions exceptions}]) "to" ;; to (in "she is able to"), "to sleep", "to see them" @@ -845,9 +845,9 @@ :to? true})] "try" [{:sem {:pred :try} :modal :infinitive}] - "turn" [{:prepositional-verb-with "on" + "turn" [{:prepositional-verb {:with "on"} :sem {:pred :turn-on}} - {:prepositional-verb-with "off" + {:prepositional-verb {:with "off"} :sem {:pred :turn-off}}] "understand" [{:sem {:pred :understand} :exceptions [{:infl :past-simple :surface "understood"} @@ -864,7 +864,7 @@ :aspect :progressive} :used-to? true}] - "wake" [{:prepositional-verb-with "up" + "wake" [{:prepositional-verb {:with "up"} :sem {:pred :wake-up}}] "walk" [{:sem {:pred :walk}}