Grammer E0 can generated grammatically incorrect sentences such as "Me smell a wumpus." We need a subjective pronoun (like "I"), not objective ("me"). We could replace the NP rule with two new rules: an NP_subj rule and an NP_obj rule:
The problem with this is that the number of rules grows as we duplicate rules, e.g. subject-verb agreement would result in 4 NP rules.
Instead, we use augmentations (grammar E1):
- NP(case) -> Pronoun(case) | ...
Pronoun(Subjective) -> I | ...
Pronoun(Objective) -> me | ...
Subject-verb agreement can also be handled this way, as will be shown in chapter 23.
Verb subcategorization is another aspect of language that can be handled in this way. E1 allows "give me the gold", but also "go me the gold". We need to specify what categories can follow a verb. We can do this with a verb subcategorization list of complements, e.g. "give" followed by [NP,NP] or [NP,PP], and "go" followed by [PP].
These rules can be enforced by augmenting the grammar:
- VP(subcat) -> VP([NP|subcat]) NP(Objective) |
VP([Adjective|subcat]) Adjective |
VP([PP|subcat]) PP |
Verb(subcat)
- S -> NP(Subjective) VP([])
- Verb([NP,NP]) -> give | ...
An example parse tree is shown below:
Generation from augmented grammars depends on the number of values the augmentations can take on. This can potentially be infinite, e.g., for the grammar a^n b^n c^n.