The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites...
-
Upload
kelly-stevens -
Category
Documents
-
view
216 -
download
1
Transcript of The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites...
![Page 1: The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites the dog V N NP S VP A 1. Sentence noun-phrase verb-phrase.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649f455503460f94c66197/html5/thumbnails/1.jpg)
the man bites the dogthe man bites the dogthe man bites the dogman bites the dogbites the dogbites the dogthe dogthe dogdog
Parse Tree
NP
A N
theman
bites
thedog
V
N
NP
S
VP
A
1. Sentence noun-phrase verb-phrase2. Noun-phrase noun3. Noun-phrase article noun4. Verb-phrase verb5. Verb-phrase verb noun-phrase6. Article a7. Article the8. Noun man9. Noun dog10. Verb likes11. Verb bites
![Page 2: The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites the dog V N NP S VP A 1. Sentence noun-phrase verb-phrase.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649f455503460f94c66197/html5/thumbnails/2.jpg)
S NP VP NP <name> | <det> <noun> |PP
VP <verb> | <verb> NP NP | <verb> NP PP | VP NP PP <prep> NP
<name> “Ben" | “Ann"<noun> "morning" | “ice-cream"<verb> "gave" | "saw"<det> "the" <prep> "to" | "in"
S – SENTENCENP – NOUN PHRASEVP – VERB PHRASEDET – DETERMINERPP - PREPOSITION
S – SENTENCENP – NOUN PHRASEVP – VERB PHRASEDET – DETERMINERPP - PREPOSITION
Question: Consider the grammar defined by the following BNF:
![Page 3: The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites the dog V N NP S VP A 1. Sentence noun-phrase verb-phrase.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649f455503460f94c66197/html5/thumbnails/3.jpg)
Draw parse trees in this grammar for the following sentences. a) Ben gave Ann the ice-cream.
b) Ann gave the ice-cream to Ben.
Answers:
S NP VP NP <name> | <det> <noun> |PP
VP <verb> | <verb> NP NP | <verb> NP PP | VP NP PP <prep> NP
<name> “Ben" | “Ann"<noun> "morning" | “ice-cream"<verb> "gave" | "saw"<det> "the" <prep> "to" | "in"