Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoontz committed Jul 21, 2024
1 parent d99a527 commit 416857e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 54 deletions.
16 changes: 2 additions & 14 deletions resources/english/grammar.edn
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
menard.ug/slash-is-head-slash
menard.subcat/c]}

{:rule "adj-p" ;; [adj-p +able .[to sleep]]
{:rule "adj-p" ;; [adj-p +able .[to sleep]], [adj-p +able .to]
:cat :adjective
:head {:phrasal? false}
:comp {:cat :verb
Expand All @@ -159,16 +159,4 @@
menard.ug/head-rule
menard.ug/head-sem
menard.ug/head-first]}

{:rule "vp-inf" ;; [vp +to .sleep]
:cat :verb
:infl :infinitive
:head {:canonical "to"
:phrasal? false}
:unify [menard.ug/head-first
menard.ug/comp-is-root
menard.ug/head-reflexive
menard.ug/head-rule
menard.ug/head-sem
menard.ug/slash-is-head-slash
menard.subcat/d]}]
]
9 changes: 6 additions & 3 deletions resources/english/lexicon/adjectives.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{"_" [{:null? true :sem {:pred :_}}]
"able" [{:sense 1
:sem {:pred :able}
:subcat []}
"able" [(let [subj (atom :top)
sem (atom {:subj subj
:pred :anaphoric})]
{:sense 1
:sem {:pred :able}
:subcat []})
(let [subj (atom :top)
sem (atom {:subj subj
:pred :anaphoric})]
Expand Down
7 changes: 6 additions & 1 deletion resources/english/lexicon/rules.edn
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,15 @@
:sem {:existential? true}}
:2 {:cat :noun
:subcat []
;; there walks a dog
;; *there walks he
;; *there walks her
:pronoun? false
:agr agr
:sem semantic-subject}
:3 []}})

;; transitive, nonreflexive:
;; 3. transitive, nonreflexive:
(let [subj (atom {:existential? false})
obj (atom {:existential? false})]
{:subcat {:1 {:cat :noun
Expand All @@ -136,6 +140,7 @@
:sem {:subj subj
:obj obj}})

;; 4. transitive, nonreflexive:
;; transitive, reflexive
(let [subj (atom {:existential? false})
obj (atom {:existential? false})
Expand Down
59 changes: 23 additions & 36 deletions resources/english/lexicon/verbs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@

;; "I am able to sleep"
(let [subj (atom :top)
sem (atom {:subj subj})]
embedded-sem (atom {:subj subj})
sem (atom {:subj subj
:obj embedded-sem})]
{:sense 4
:sem sem
:modal :adjective
:subcat {:1 {:cat :noun
:sem subj}
:2 {:cat :adjective
Expand All @@ -71,6 +74,7 @@
:mental-state? false
:aspect :progressive}
:exceptions exceptions}

{ ;; the 'was' in 'was sleeping' (aux sense, participle complement)
:sense 6
:aux? true
Expand Down Expand Up @@ -347,7 +351,7 @@
{:infl :past-participle :surface "given"}]]
[{:exceptions exceptions
:sem {:pred :give}
:intransitive? true}
:intransitive-only? true}
{:exceptions exceptions
:subcat {:2 {:cat :prep
:sem {:pred :to}}
Expand All @@ -358,7 +362,7 @@
{:infl :past-participle :surface "gone"}]]
[{:exceptions exceptions
:sem {:pred :go
:intransitive? true}}
:intransitive-only? true}}
{:exceptions exceptions
:sem {:pred :go}
:subcat {:2 {:cat :prep
Expand Down Expand Up @@ -740,45 +744,28 @@

;; TODO: "the cat they think that you will see"

"to" ;; "to sleep"
(let [sem (atom :top)
agr (atom :top)
reflexive? (atom :top)]
[
;; used to sleep
{:agr agr
:sense 1
:reflexive? reflexive?
:to? true
:inflected? true
:infl :infinitive
:sem sem
:subcat {:1 {:cat :verb
:modal :none
:agr agr
:reflexive? reflexive?
:subcat {:1 {:cat :noun}} ;; prevent "[vp:inf to to]"
:infl :base
:sem sem}
:2 []}}

;; used to try to sleep
"to" ;; to (in "she is able to"), "to sleep", "to see him"
[
(let [subj (atom :top)
sem (atom {:subj subj})
agr (atom :top)
reflexive? (atom :top)]
{:agr agr
:sense 2
:reflexive? reflexive?
:to? true
:sense "v1"
:inflected? true
:modal :infinitve
:infl :infinitive
:sem sem
:subcat {:1 {:cat :verb
:modal :infinitive
:subcat {:1 {:cat :noun
:sem subj}
:2 {:cat :verb
:to? false
:agr agr
:reflexive? reflexive?
:subcat {:1 {:cat :noun}} ;; prevent "[vp:inf to to]"
:sem sem
:infl :base
:sem sem}
:2 []}}
])
:subcat {:1 {:cat :noun
:sem subj}
:2 []}}}})]

"try" [{:sem {:pred :try}
:modal :infinitive}]
Expand Down

0 comments on commit 416857e

Please sign in to comment.