Semantic AnalysisThe Principle of CompositionalityDeriving the Meaning of SentencesAttaching Semantic Rules to Grammar RulesHandling the VerbCommon NPsWhen Arguments Are QuantifiedWe Get the Wrong AnswerComplex TermsThe Revised GrammarDo We Yet Have the Right Answer?Or Suppose We Want a Completely Different Kind of RepresentationMore on QuantifiersDifferent Argument StructuresSentences that Aren’t DeclarativeCompound Noun PhrasesCompound NPs, an AlternativeInfinitive Verb PhrasesNoncompositional SemanticsSemantic GrammarsExample – Eating Italian FoodAn AlternativeSemantic AnalysisRead J & M Chapter 15.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.Deriving the Meaning of SentencesJohn saw Bill.e Isa(e, Seeing) Agent(e, John) AE(e, Bill) SNP VPPN V NP John saw PN BillAttaching Semantic Rules to Grammar RulesJohn saw Bill. e Isa(e, Seeing) Agent(e, John) AE(e, Bill) S NP VP PN V NPJohn saw PN BillA … {f(.sem, .sem …)PN John {John}{e Isa(o,Person) Name(o, John)}NP PN {PN.sem}Handling the VerbS NP VP PN V NPJohn saw PN BillS 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) }Common NPsJohn has a cat.S NP VP PN V NPJohn has DET Nom a N cate,x Isa(e, Owning) Agent(e, John) AE(e, x) Isa(x, Cat)When Arguments Are Quantifiede,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) }We Get the Wrong AnswerThe 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.Complex TermsA complex term has the following structure:<Quantifier variable body>Using one in our example, we get:e Isa(e, Owning) Agent(e, John) AE(e, < x Isa(x, Cat)>)Now we add the following rewrite rule for converting complex terms to ordinary FOPC expressions:P(<Quantifier variable body>) Quantifer variable body Connective P(variable)In this case:AE(e, < x Isa(x, Cat)>) x Isa(x, Cat) AE(e, x)Note: If Quantifier is then Connective is . If , then it’s .The Revised GrammarS NP VP {VP.sem(NP.sem)}NP PN {PN.sem}NP DET Nom {<DET.sem x Nom.sem(x)>}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) }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.Or Suppose We Want a Completely Different Kind of RepresentationMore on QuantifiersEveryone ate a cookie.S NP VP {VP.sem(NP.sem)}NP Pro {Pro.sem}NP DET Nom {<DET.sem x Nom.sem(x)>}DET a {}Nom N {z Isa(z, N.sem)}Pro everyone {< x person(x)>}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)Different Argument StructuresJohn 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 NP1 NP2 {V.sem(NP1.sem)(NP2.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)}Sentences that Aren’t DeclarativeClose 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)Compound Noun Phrasesleather jacket {x Isa(x, jacket) NN(x, leather)}riding jacketwinter jacketletter jacketNom N {x Isa(x, N.sem)}Nom N Nom {x Nom.sem(x) NN(x, N.sem)}N jacket {jacket}N leather {leather}Compound NPs, an Alternativeleather jacket {x Isa(x, jacket) madeof(x, leather)}riding jacket {x Isa(x, jacket) usedfor(x,riding)}winter jacketletter jacketNom 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}Infinitive Verb PhrasesI told Mary to eat.SNP VPPro V NP VPto I told PN infTo VP Mary to V eate, f Isa(e, telling) Isa(f, eating) Agent(e, Speaker) Ben(e, Mary) AE(e, f) Agent(f, Mary)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 skelterSemantic GrammarsIf we know we have a limited semantic representation, then build a grammar that is less general and that maps more directly to the semantic
View Full Document