Unformatted text preview:

Natural Language Processing Lecture 21 11 12 2013 Jim Martin Today Finish Compositional Semantics Review quantifiers and lambdas Models 11 14 13 Speech and Language Processing Jurafsky and Martin 2 1 Complex NPs Things get quite a bit more complicated when we start looking at more complicated NPs Such as A menu Every restaurant Not every waiter Most restaurants All the morning non stop flights to Houston Speech and Language Processing Jurafsky and Martin 11 14 13 3 Quantifiers Contrast Frasca closed e Closed e ClosedThing e Frasca With Every restaurant closed 11 14 13 Speech and Language Processing Jurafsky and Martin 4 2 Quantifiers Roughly every in an NP like this is used to stipulate something about every member of some class The NP is specifying the class And the VP is specifying the thing stipulated So the NP is a template like thing The trick is going to be getting the Q to be right thing 11 14 13 Speech and Language Processing Jurafsky and Martin 5 Quantifiers But that s not combinable with anything so wrap a lambda around it This requires a change to the kind of things that we ll allow lambda variables to range over Now it s both FOL predicates and terms 11 14 13 Speech and Language Processing Jurafsky and Martin 6 3 Rules 11 14 13 Speech and Language Processing Jurafsky and Martin 7 Example 11 14 13 Speech and Language Processing Jurafsky and Martin 8 4 Every Restaurant Closed 11 14 13 Speech and Language Processing Jurafsky and Martin 9 Grammar Engineering Remember in the rule to rule approach we re designing separate semantic attachments for each grammar rule So we now have to check to see if things still work with the rest of the grammar and clearly they don t Two places to revise The S rule S NP VP VP Sem NP Sem Simple NP s like proper nouns Proper Noun Sally 11 14 13 Sally Speech and Language Processing Jurafsky and Martin 10 5 S Rule We were applying the semantics of the VP to the semantics of the NP Now we re swapping that around S NP VP 11 14 13 NP Sem VP Sem Speech and Language Processing Jurafsky and Martin 11 Every Restaurant Closed 11 14 13 Speech and Language Processing Jurafsky and Martin 12 6 Simple NP fix And the semantics of proper nouns used to just be things that amounted to constants Franco Now they need to be a little more complex This works lambda x Franco x Speech and Language Processing Jurafsky and Martin 11 14 13 13 Revised Now all these examples should work Every restaurant closed Sunflower closed What about x e Restaurant x Closing e Closed e x A restaurant closed This rule stays the same NP Det Nominal Just need an attachment for Det a 11 14 13 Speech and Language Processing Jurafsky and Martin 14 7 Revised So if the template for every is Then the template for a should be what 11 14 13m Speech and Language Processing Jurafsky and Martin 15 Break Sumly article 11 14 13 Speech and Language Processing Jurafsky and Martin 16 8 So Far So Good We can make effective use of lambdas to overcome Mismatches between the syntax and semantics While still preserving strict compositionality 11 14 13 Speech and Language Processing Jurafsky and Martin 17 Problem Every restaurant has a menu 11 14 13 Speech and Language Processing Jurafsky and Martin 18 9 What We Really Want 11 14 13 Speech and Language Processing Jurafsky and Martin 19 Store and Retrieve Now given a representation like that we can get all the meanings out that we want by Retrieving the quantifiers one at a time and placing them in front The order determines the scoping the meaning 11 14 13 Speech and Language Processing Jurafsky and Martin 20 10 Store The Store 11 14 13 Speech and Language Processing Jurafsky and Martin 21 Retrieve Use lambda reduction to retrieve from the store and incorporate the arguments in the right way Retrieve element from the store and apply it to the core representation With the variable corresponding to the retrieved element as a lambda variable Huh 11 14 13 Speech and Language Processing Jurafsky and Martin 22 11 Retrieve Example pull out 2 first that s s2 and apply it to the predicate representation 11 14 13 Speech and Language Processing Jurafsky and Martin 23 Example Then pull out S1 and apply it to the previous result 11 14 13 Speech and Language Processing Jurafsky and Martin 24 12 Ordering Determines Outcome Now if we had done it in the other order first S1 and then S2 we could have gotten the other meaning other quantifier scoping 11 14 13 Speech and Language Processing Jurafsky and Martin 25 So What is the implication of this kind of approach to examples like this Almost every show from every broadcast network is now free online at all the networks sites or at hubs like Hulu while almost every cable show is not 11 14 13 Speech and Language Processing Jurafsky and Martin 26 13 Semantics 11 14 13 Speech and Language Processing Jurafsky and Martin 27 Semantics Why are these representations semantic Rather than just a bunch of words with parentheses and greek characters That is what is it about these representations that allow them to say things about some state of affairs in some world we care about 11 14 13 Speech and Language Processing Jurafsky and Martin 28 14 Semantics Let s start with the basics of what we might want to say about some world There are entities in this world We d like to assert properties of these entities And we d like to assert relations among them Let s call a scheme that can capture these things a model And let s claim that we can use basic set theory to represent such models 11 14 13 Speech and Language Processing Jurafsky and Martin 29 Set Based Models In such a scheme All the entities of a world are elements of a set We lll call the set of all such elements the domain Properties of the elements are just sets of elements from the domain Relations are represented as sets of tuples of elements from the domain 11 14 13 Speech and Language Processing Jurafsky and Martin 30 15 Restaurant World 11 14 13 Speech and Language Processing Jurafsky and Martin 31 Models Next we need a way to map the elements of our meaning representation to the model For FOL FOL Terms elements of the domain Med f FOL atomic formula sets of domain elements or sets of tuples Noisy Med is true if f is in the set of elements that corresponds to the noisy relation Near Med Rio is true if the tuple f g is in the set of tuples that corresponds to Near in the interpretation 11 14 13 Speech and Language Processing Jurafsky and Martin 32 16 Models What about the other


View Full Document

CU-Boulder CSCI 5832 - Natural Language Processing

Loading Unlocking...
Login

Join to view Natural Language Processing and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Natural Language Processing and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?