Download presentation
Presentation is loading. Please wait.
Published bySullivan Sauvage Modified over 9 years ago
1
Semantic Analysis Read J & M Chapter 15.
2
The Principle of Compositionality There’s an infinite number of possible sentences and an infinite number of possible meanings. But we need to specify the relationship between the two with a finite number of rules. What finite classes can we work with: Words Grammar rules So we need to find a way to define the meaning of an entire sentence as a function of the meaning of the words it contains and the rules that are used to put those words together.
3
Deriving the Meaning of Sentences John saw Bill. e Isa(e, Seeing) Agent(e, John) AE(e, Bill) S NPVP PN VNP John saw PN Bill
4
Attaching Semantic Rules to Grammar Rules John saw Bill. e Isa(e, Seeing) Agent(e, John) AE(e, Bill) S NPVP PN VNP John saw PN Bill A …{f( .sem, .sem …) PN John{John} { e Isa(o,Person) Name(o, John)} NP PN{PN.sem}
5
Handling the Verb S NPVP PN VNP John saw PN Bill S NP VP{VP.sem(NP.sem)} NP PN{PN.sem} PN John{John} PN Bill{Bill} VP V NP{V.sem(NP.sem)} V saw { x y e Isa(e, Seeing) Agent(e,y) AE(e,x) }
6
Common NPs John has a cat. S NPVP PN VNP John has DET Nom a N cat e,x Isa(e, Owning) Agent(e, John) AE(e, x) Isa(x, Cat)
7
When Arguments Are Quantified e,x Isa(e, Owning) Agent(e, John) AE(e, x) Isa(x, Cat) S NP VP{VP.sem(NP.sem)} NP PN{PN.sem} NP DET Nom{DET.sem x Nom.sem} PN John{John} DET a{ } Nom N{Isa(x N.sem)} N cat{cat} VP V NP{V.sem(NP.sem)} V has{ x y e Isa(e, Owning) Agent(e,y) AE(e,x) }
8
We Get the Wrong Answer The answer we want: e,x Isa(e, Owning) Agent(e, John) AE(e, x) Isa(x, Cat) The answer we’re going to get as things stand now: e Isa(e, Owning) Agent(e, John) AE(e, x Isa(x, Cat)) This isn’t even a valid formula.
9
Complex Terms A complex term has the following structure: Using one in our example, we get: e Isa(e, Owning) Agent(e, John) AE(e, ) Now we add the following rewrite rule for converting complex terms to ordinary FOPC expressions: P( ) Quantifer variable body Connective P(variable) In this case: AE(e, ) x Isa(x, Cat) AE(e, x) Note: If Quantifier is then Connective is . If , then it’s .
10
The Revised Grammar S NP VP{VP.sem(NP.sem)} NP PN{PN.sem} NP DET Nom{ } PN John{John} DET a{ } Nom N{ z Isa(z, N.sem)} N cat{cat} VP V NP{V.sem(NP.sem)} V has{ x y e Isa(e, Owning) Agent(e,y) AE(e,x) }
11
Do We Yet Have the Right Answer? The answer we’ve got now: e,x Isa(e, Owning) Agent(e, John) AE(e, x) Isa(x, Cat) But suppose we want something like: x Isa (x, Cat) Owner-of(x, John) In this case, we can view our initial answer as an intermediate representation and use it to form whatever other answer we like by applying inference rules.
12
Or Suppose We Want a Completely Different Kind of Representation
13
More on Quantifiers Everyone ate a cookie. S NP VP{VP.sem(NP.sem)} NP Pro{Pro.sem} NP DET Nom{ } DET a{ } Nom N{ z Isa(z, N.sem)} Pro everyone{ } N cookie{cookie} VP V NP{V.sem(NP.sem)} V ate{ x y e Isa(e, Eating) Agent(e,y) AE(e,x) } e x x' Isa(e, Eating) (person(x') Agent(e, x')) Isa(x, cookie) AE(e,x)
14
Different Argument Structures John served Bill. John served steak. S NP VP{VP.sem(NP.sem)} NP PN{PN.sem} NP MassN{MassN.sem} MassN steak{steak} PN John{John} PN Bill{Bill} VP V NP{V.sem(NP.sem)} VP V NP 1 NP 2 {V.sem(NP 1.sem)(NP 2.sem) V served{ x y e Isa(e, Serving) Agent(e,y) AE(e,x) } V served{ x y e Isa(e, Serving) Agent(e,y) Ben(e,x) } V served{ x y z e Isa(e, Serving) Agent(e,z) AE(e,y) Ben(e, x)}
15
Sentences that Aren’t Declarative Close the window. S VP{IMP(VP.sem(DummyYou))} Do you sell pretzels? S Aux NP VP{YNQ(VP.sem(NP.sem))} Who sells pretzels? S WhPro VP {WHQ(x, VP.sem(x)}} WHQ(x, e Isa(e, Selling) Agent(e,x) AE(e, pretzels)
16
Compound Noun Phrases leather jacket{ x Isa(x, jacket) NN(x, leather)} riding jacket winter jacket letter jacket Nom N { x Isa(x, N.sem)} Nom N Nom { x Nom.sem(x) NN(x, N.sem)} N jacket{jacket} N leather{leather}
17
Compound NPs, an Alternative leather jacket{ x Isa(x, jacket) madeof(x, leather)} riding jacket{ x Isa(x, jacket) usedfor(x,riding)} winter jacket letter jacket Nom N { x Isa(x, N.sem)} Nom N Nom { x Nom.sem(x) madeof(x, N.sem)} Nom N Nom { x Nom.sem(x) usedfor(x, N.sem)} N jacket{jacket} N leather{leather} N winter{winter}
18
Infinitive Verb Phrases I told Mary to eat. S NPVP ProVNPVPto I toldPN infToVP Mary to V eat e, f Isa(e, telling) Isa(f, eating) Agent(e, Speaker) Ben(e, Mary) AE(e, f) Agent(f, Mary)
19
Noncompositional Semantics Coupons are just the tip of the iceberg. That’s just the tip of Mrs. Ford’s iceberg. John kicked the bucket. John would have kicked the bucket. # The bucket was kicked by John. She turned up her toes. # She turned up his toes. Mary threw in the towel. Mary thought about throwing in the towel. # Mary threw in the white towel. willy nilly pell mell helter skelter
20
Semantic Grammars If we know we have a limited semantic representation, then build a grammar that is less general and that maps more directly to the semantic interpretation we want.
21
Example – Eating Italian Food
22
An Alternative InfoRequest I want to go (to) eat (some) FoodType Time {Retrieve (x, isa(x, Restaurant) nationality(x, FoodType.sem))} FoodType Nationality (food){Nationality.sem} Retrieve(x, isa(x, Restaurant) nationality(x, Italian))
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.