1 / 19

Natural Language Processing

Natural Language Processing. What’s the problem? Input? Output?. Example Applications. Enables great user interfaces! Spelling and grammar checkers. Http://www.askjeeves.com/ Document understanding on the WWW. Spoken language control systems: banking, shopping

toledor
Télécharger la présentation

Natural Language Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Natural Language Processing • What’s the problem? • Input? • Output?

  2. Example Applications • Enables great user interfaces! • Spelling and grammar checkers. • Http://www.askjeeves.com/ • Document understanding on the WWW. • Spoken language control systems: banking, shopping • Classification systems for messages, articles. • Machine translation tools.

  3. NLP Problem Areas • Phonology and phonetics: structure of sounds. • Morphology: structure of words • Syntactic interpretation (parsing): create a parse tree of a sentence. • Semantic interpretation: translate a sentence into the representation language. • Pragmatic interpretation: incorporate current situation into account. • Disambiguation: there may be several interpretations. Choose the most probable

  4. Some Difficult Examples • From the newspapers: • Squad helps dog bite victim. • Helicopter powered by human flies. • Levy won’t hurt the poor. • Once-sagging cloth diaper industry saved by full dumps. • Ambiguities: • Lexical: meanings of ‘hot’, ‘back’. • Syntactic: I heard the music in my room. • Referential: The cat ate the mouse. It was ugly.

  5. Parsing • Context-free grammars: • EXPR -> NUMBER • EXPR -> VARIABLE • EXPR -> (EXPR + EXPR) • EXPR -> (EXPR * EXPR) • (2 + X) * (17 + Y) is in the grammar. • (2 + (X)) is not. • Why do we call them context-free?

  6. Using CFG’s for Parsing • Can natural language syntax be captured using a context-free grammar? • Yes, no, sort of, for the most part, maybe. • Words: • nouns, adjectives, verbs, adverbs. • Determiners: the, a, this, that • Quantifiers: all, some, none • Prepositions: in, onto, by, through • Connectives: and, or, but, while. • Words combine together into phrases: NP, VP

  7. An Example Grammar • S -> NP VP • VP -> V NP • NP -> NAME • NP -> ART N • ART -> a | the • V -> ate | saw • N -> cat | mouse • NAME -> Sue | Tom

  8. Example Parse • The mouse saw Sue.

  9. Try at Home • The Sue saw.

  10. Also works... • The student like exam • I is a man • A girls like pizza • Sue sighed the pizza. • The basic word categories are not capturing everything…

  11. Grammars with Features • We add features to constituents: • AGR: number-person combination, (3s, 1p) • VFORM: verb form (go, goes, gone, going) • SUBCAT: restrictions on complements • None (sleep) • NP (find) • NP-NP (give) • Now every constituent has a set of features: • (NP (AGR 1p) (ROOT cat))

  12. Grammar rules with Features • (S (AGR (? a)) -> (NP (AGR (? a))) (VP (AGR (? a))) • (VP (AGR (? a)) (VFORM (? vf))) --> (V (AGR (? a)) (VFORM (? vf)) (SUBCAT non)) • dog: (N (AGR 3s) (ROOT dog)) • dogs: (N (AGR 3p) (ROOT dog)) • barks: (V (AGR 3s) (VFORM pres) (SUBCAT none) (ROOT bark))

  13. Semantic Interpretation • Our goal: to translate sentences into a logical form. • But: sentences convey more than true/false: • It will rain in Seattle tomorrow. • Will it rain in Seattle tomorrow? • A sentence can be analyzed by: • propositional content, and • speech act: tell, ask, request, deny, suggest

  14. Propositional Content • We develop a logic-like language for representing propositional content: • Word-sense ambiguity • Scope ambiguity • Proper names --> objects (John, Alon) • Nouns --> unary predicates (woman, house) • Verbs --> • transitive: binary predicates (find, go) • intransitive: unary predicates (laugh, cry) • Quantifiers: most, some

  15. Examples • (MOST x1: (laugh x1) (happy x1)) • (Believe john (kill June Mary)) • (Every b1: (boy b1) (A d1 : (dog d1) (loves b1 d1))) • Semantic interpretation can be done with feature grammars (see book).

  16. Disambiguating Word Senses • Use type hierarchies: • The ruler likes the house. • Only allow patterns: (Likes Animate object) Object Inanimate Animate Tool Dwelling Person Cat Ruling person Ruler tool hammer house

  17. Speech Acts • What do you mean when you say: • Do you know the time? Context Speaker knows time Speaker doesn’t know Speaker believes request request hearer knows time Speaker believes offer wasting time hearer doesn’t know Speaker doesn’t know yes-no question Y/N question or if hearer knows time or cond offer request

  18. Natural Language Summary • Parsing: • context free grammars with features. • Semantic interpretation: • Translate sentences into logic-like language • Use additional domain knowledge for word-sense disambiguation. • Use context to disambiguate references. • Use context to analyze which speech act is meant.

More Related