Context-free grammar with quantifiers
We extend CFG.hs to add quantified noun phrases in the tradition of Montague
Documentation
class Symantics repr => Quantifier repr whereSource
We extend our earlier fragment with common nouns farmer and donkey, and quantifiers everyone, someone, every farmer, a donkey, etc. Since we added two new categories (CN and QNP), we need to add rules to our CFG to be able to use the categories in derivations.
The numbers 4 and 5 are due to Montague
every :: repr CN -> repr QNPSource
a :: repr CN -> repr QNPSource
who :: repr VP -> repr CN -> repr CNSource
Quantifier EN | Sample sentences (or, CFG derivations) We stress that the inferred type of sen2-sen4 is S. So, these are the derivations of complete sentences. We extend our EN interpreter (interpreter of derivations as English phrases) to deal with QNP. |
Quantifier JA | The expression for quantifiers ensures that no inverse reading is possible. Only linear reading. |
Lambda lrepr => Quantifier (Sem lrepr) |