Skip to content

Commit

Permalink
support "he is able to sleep"
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoontz committed Jul 19, 2024
1 parent 97ad784 commit 9fc2c2c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
12 changes: 12 additions & 0 deletions resources/english/grammar.edn
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@
menard.ug/head-sem
menard.ug/slash-is-head-slash
menard.subcat/c]}

{:rule "adj-p" ;; [adj-p +able .[to sleep]]
:cat :adjective
:head {:phrasal? false}
:comp {:cat :verb
:to? true}
:slash? false
:unify [menard.ug/head-first
menard.ug/head-is-root
menard.ug/head-rule
menard.ug/head-sem
menard.subcat/d]}

{:rule "pp:2"
:cat :prep
Expand Down
14 changes: 13 additions & 1 deletion resources/english/lexicon/adjectives.edn
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{"_" [{:null? true :sem {:pred :_}}]
"able" [{:sem {:pred :able}}]
"able" [{:sense 1
:sem {:pred :able}
:subcat []}
(let [subj (atom :top)
sem (atom {:subj subj})]
{:sense 2
:sem {:pred :be-able-to
:subj subj
:obj sem}
:subcat {:1 {:cat :verb
:sem sem
:infl :infinitive}
:2 []}})]
"accessible" [{:sem {:pred :accessible}}]
"acclaimed" [{:sem {:pred :acclaimed}}]
"accurate" [{:sem {:pred :accurate}}]
Expand Down
17 changes: 14 additions & 3 deletions resources/english/lexicon/verbs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,19 @@
:3 []}
:exceptions exceptions})

;; "I am able to sleep"
(let [subj (atom :top)
sem (atom {:subj subj})]
{:sense 4
:sem sem
:subcat {:1 {:cat :noun
:sem subj}
:2 {:cat :adjective
:sem sem}}
:exceptions exceptions})

{ ;; the 'is' in 'is sleeping" (aux sense, participle complement)
:sense 4
:sense 5
:aux? true
:infl :present
:modal :present-participle
Expand All @@ -60,7 +71,7 @@
:aspect :progressive}
:exceptions exceptions}
{ ;; the 'was' in 'was sleeping' (aux sense, participle complement)
:sense 5
:sense 6
:aux? true
:infl :past-simple
:modal :past-participle
Expand All @@ -71,7 +82,7 @@

(;; the 'is' or 'was' in 'is born' or 'was born'
let [subj (atom {:animate? true})]
{:sense 6
{:sense 7
:aux? false
:sem {:pred :be-born
:subj subj
Expand Down

0 comments on commit 9fc2c2c

Please sign in to comment.