Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Natural Language Processing zWhat’s the problem? yInput? yOutput?

Similar presentations


Presentation on theme: "1 Natural Language Processing zWhat’s the problem? yInput? yOutput?"— Presentation transcript:

1 1 Natural Language Processing zWhat’s the problem? yInput? yOutput?

2 2 Example Applications zEnables great user interfaces! zSpelling and grammar checkers. zHttp://www.askjeeves.com/ zDocument understanding on the WWW. zSpoken language control systems: banking, shopping zClassification systems for messages, articles. zMachine translation tools.

3 3 NLP Problem Areas zPhonology and phonetics: structure of sounds. zMorphology: structure of words zSyntactic interpretation (parsing): create a parse tree of a sentence. zSemantic interpretation: translate a sentence into the representation language. yPragmatic interpretation: incorporate current situation into account. yDisambiguation: there may be several interpretations. Choose the most probable

4 4 Some Difficult Examples zFrom the newspapers: ySquad helps dog bite victim. yHelicopter powered by human flies. yLevy won’t hurt the poor. yOnce-sagging cloth diaper industry saved by full dumps. zAmbiguities: yLexical: meanings of ‘hot’, ‘back’. ySyntactic: I heard the music in my room. yReferential: The cat ate the mouse. It was ugly.

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

6 6 Using CFG’s for Parsing zCan natural language syntax be captured using a context-free grammar? yYes, no, sort of, for the most part, maybe. zWords: ynouns, adjectives, verbs, adverbs. yDeterminers: the, a, this, that yQuantifiers: all, some, none yPrepositions: in, onto, by, through yConnectives: and, or, but, while. yWords combine together into phrases: NP, VP

7 7 An Example Grammar zS -> NP VP zVP -> V NP zNP -> NAME zNP -> ART N zART -> a | the zV -> ate | saw zN -> cat | mouse zNAME -> Sue | Tom

8 8 Example Parse zThe mouse saw Sue.

9 9 Try at Home zThe Sue saw.

10 10 Also works... zThe student like exam zI is a man zA girls like pizza zSue sighed the pizza. zThe basic word categories are not capturing everything…

11 11 Grammars with Features zWe add features to constituents: zAGR: number-person combination, (3s, 1p) zVFORM: verb form (go, goes, gone, going) zSUBCAT: restrictions on complements yNone (sleep) yNP (find) yNP-NP (give) zNow every constituent has a set of features: y(NP (AGR 1p) (ROOT cat))

12 12 Grammar rules with Features z(S (AGR (? a)) -> (NP (AGR (? a))) (VP (AGR (? a))) z(VP (AGR (? a)) (VFORM (? vf))) --> (V (AGR (? a)) (VFORM (? vf)) (SUBCAT non)) zdog: (N (AGR 3s) (ROOT dog)) zdogs: (N (AGR 3p) (ROOT dog)) zbarks: (V (AGR 3s) (VFORM pres) (SUBCAT none) (ROOT bark))

13 13 Semantic Interpretation zOur goal: to translate sentences into a logical form. zBut: sentences convey more than true/false: yIt will rain in Seattle tomorrow. yWill it rain in Seattle tomorrow? zA sentence can be analyzed by: ypropositional content, and yspeech act: tell, ask, request, deny, suggest

14 14 Propositional Content zWe develop a logic-like language for representing propositional content: yWord-sense ambiguity yScope ambiguity zProper names --> objects (John, Alon) zNouns --> unary predicates (woman, house) zVerbs --> ytransitive: binary predicates (find, go) yintransitive: unary predicates (laugh, cry) zQuantifiers: most, some

15 15

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

17 17 Disambiguating Word Senses zUse type hierarchies: yThe ruler likes the house. zOnly allow patterns: (Likes Animate object) Object Animate Inanimate PersonCat ToolDwelling Ruling personRuler toolhousehammer

18 18 Speech Acts zWhat do you mean when you say: yDo 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

19 19 Natural Language Summary zParsing: ycontext free grammars with features. zSemantic interpretation: yTranslate sentences into logic-like language yUse additional domain knowledge for word-sense disambiguation. yUse context to disambiguate references. yUse context to analyze which speech act is meant.


Download ppt "1 Natural Language Processing zWhat’s the problem? yInput? yOutput?"

Similar presentations


Ads by Google