Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language Problems.

Similar presentations


Presentation on theme: "1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language Problems."— Presentation transcript:

1 1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language Problems

2 2 Problem 3/4 1. sentence  np vp 2. np  n 3. np  art n 4. vp  v 5. vp  v np 6. art  a 7. art  the 8. n  man 9. n  dog 10. v  likes 11. v  bites The big dog bites the man (no adjectives) 12. np  adj n 13. np  art adj n 14. adj  big Emma likes the boy (add Emma, boy) The man likes Bite the man 15. sentence  vp 16. v  bite

3 3 Parsing bite the man Top down: start at sentence symbol and work down to a string of terminals 1. sentence  np vp 2. np  n 3. np  art n 4. vp  v 5. vp  v np 6. art  a 7. art  the 8. n  man 9. n  dog 10. v  likes 11. v  bites 15. sentence  vp 16. v  bite sentence → vp → v np → bite np → bite art n → bite the n → bite the man

4 4 Problem 5 Grammar: 1. sentence ↔ noun_phrase verb_phrase 2. noun_phrase ↔ article number noun 3. article singular ↔ a singular 4. article singular ↔ the singular 5. article plural ↔ the plural 6. singular noun ↔ man singular 7. singular noun ↔ dog singular 8. plural noun ↔ men plural 9. singular verb phrase ↔ singular verb 10. singular verb ↔ bites 11. plural verb phrase ↔ plural verb 12. plural verb ↔ like 13. verb_phrase ↔ verb noun_phrase (missing) Parse: The men like the dog: sentence noun_phrase verb_phrase article plural noun verb_phrase The plural noun verb_phrase The men plural verb_phrase The men plural verb noun_phrase The men like noun_phrase...

5 5 Problem 7 noun_phrase adjective_list noun noun_phrase article adjective_list noun adjective-list adjective adjective_list adjective adjective_list

6 6 Problem 9 New Noun_phrase definition: Add dictionary entries for specific adjectives E.g. brown: PART_OF_SPEECH: adjective ROOT: brown NUMBER: p or s Adjective_list Adjective: Remaining-list: * *(null or pointer to an adjective_list) Noun_phrase Determiner: Adjective_list: Noun: Number

7 7 Problem 9 Add arcs and procedures to ATN diagram: procedure noun_phrase4 begin ADJECTIVE_LIST := structure returned by ADJECTIVE_LIST network if ADJECTIVE_LIST.ADJECTIVE = null fail end; procedure noun_phrase5 begin NOUN:= structure returned by NOUN network if NOUN_PHRASE.NOUN.PART_OF_SPEECH= noun begin NOUN_PHRASE.NOUN = NOUN NOUN_PHRASE.ADJECTIVE_LIST = ADJECTIVE_LIST NOUN_PHRASE.NUMBER = NOUN.NUMBER end else fail end;

8 8 Problem 9 Add arcs and procedures to ATN diagram: procedure noun_phrase6 begin ARTICLE:= structure returned by ARTICLE network if ARTICLE.PART_OF_SPEECH <> article fail end procedure noun_phrase7 begin (same as noun_phrase4) end procedure noun_phrase8 begin NOUN:= structure returned by NOUN network if NOUN_PHRASE.NOUN.PART_OF_SPEECH = noun begin NOUN_PHRASE.ARTICLE= ARTICLE NOUN_PHRASE.NOUN = NOUN NOUN_PHRASE.ADJECTIVE_LIST = ADJECTIVE_LIST NOUN_PHRASE.NUMBER = NOUN.NUMBER end else fail end

9 9 Problem 10 What is added because of adjectives? –Do they add anything to the type hierarchy? –Are there case frames (fig 14.11) for any of the adjectives? –Does this add to the semantic rep for a sentence? E.g. "Bob has brown hair" uses frame for "has" to build

10 10 Procedures: procedure noun_phrase begin call adjective_phrase to get a representation for the adjective_phrase call noun to get a representation of the noun case the article is indefinite and the number singular: the noun concept is generic the article is definite and number singular: bind marker to noun concept number is plural: indicate that the noun concept is plural bind case frames for each adjective to the noun end procedure adjective begin retrieve the concept for the adjective end procedure adjective_phrase begin (get the linked list of adjectives) end

11 11 Bob has brown hair: 1. call sentence 2. sentence calls noun_phrase 3. noun_phrase calls noun 4. noun returns frame for Bob Do we know Bob is a person? If so, bind Bob to person 5. verb_phrase calls verb which retrieves case frame for has 6. verb_phrase calls noun_phrase 7. noun_phrase calls adjective_phrase to retrieve brown which returns case frame for brown 8. noun_phrase calls noun which returns hair Attach to case frame for brown 9. Combine case frame for has to the subject (Bob) and object (brown hair) PART_OF_SPEECH : adjective ROOT: brown NUMBER: s PART_OF_SPEECH : noun ROOT: hair NUMBER: s PART_OF_SPEECH : noun ROOT: Bob NUMBER:s PART_OF_SPEECH : verb ROOT: has NUMBER:s

12 12 Problem 19 Possible domains: –shopping (how does bizrate.com or shopzilla work?) –?? Is there an underlying template? You: –pick a domain –construct a hypothetical template –speculate on how it works Also callled web mining, information extraction –many interesting products to crawl with your specific agenda –how are they built?


Download ppt "1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language Problems."

Similar presentations


Ads by Google