Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

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 2. Noun-phrase  noun 3. Noun-phrase  article noun 4. Verb-phrase  verb 5. Verb-phrase  verb noun-phrase 6. Article  a 7. Article  the 8. Noun  man 9. Noun  dog 10. Verb  likes 11. Verb  bites

2 S  NP VP NP  | |PP VP  | NP NP | NP PP | VP NP PP  NP  “Ben" | “Ann"  "morning" | “ice-cream"  "gave" | "saw"  "the"  "to" | "in" S – SENTENCE NP – NOUN PHRASE VP – VERB PHRASE DET – DETERMINER PP - PREPOSITION S – SENTENCE NP – NOUN PHRASE VP – VERB PHRASE DET – DETERMINER PP - PREPOSITION Question: Consider the grammar defined by the following BNF:

3 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  | |PP VP  | NP NP | NP PP | VP NP PP  NP  “Ben" | “Ann"  "morning" | “ice-cream"  "gave" | "saw"  "the"  "to" | "in"


Download ppt "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."

Similar presentations


Ads by Google