Natural Language Processing · TEE · papers
Q3a · Top-down restaurant parse
2024-02-12 · re-exam · recovered AI paper
Previous examination · complete worked answers
Answer
As printed, this grammar cannot derive the complete sentence. The object dosas is a Noun, but NP has no rule for a bare Nominal/Noun. NP→Det Nominal would require a determiner before dosas that is absent.
Clearly stated minimal repair
Add NP→Nominal. The repaired top-down derivation is:
| Step | Sentential form |
|---|---|
| 1 | S |
| 2 | NP VP |
| 3 | Det Nominal VP |
| 4 | A Noun VP |
| 5 | A restaurant Verb NP |
| 6 | A restaurant serves Nominal |
| 7 | A restaurant serves Noun |
| 8 | A restaurant serves dosas |
This tree uses the added rule only for the object. Do not silently pretend it is derivable under the original rule set. Left-recursive Nominal/VP alternatives require a terminating parser strategy; the displayed successful derivation chooses the needed finite branches.
Source / convention note. Original CFG is incomplete for the given bare-plural object. Exact failure and explicit repaired derivation are both shown.