Presentation is loading. Please wait.

Presentation is loading. Please wait.

Compositional Logical Semantics Torbjörn Lager Department of Linguistics Stockholm University.

Similar presentations


Presentation on theme: "Compositional Logical Semantics Torbjörn Lager Department of Linguistics Stockholm University."— Presentation transcript:

1 Compositional Logical Semantics Torbjörn Lager Department of Linguistics Stockholm University

2 NLP1 - Torbjörn Lager 2 Logical Semantics Example zJohn laughed zlaughed'(j) zNobody laughed   x[laughed'(x)] zBut this is just translation! What's semantic about that?

3 NLP1 - Torbjörn Lager 3 What Is the Name of This Game? zTruth conditional semantics zModel theoretic semantics zLogical semantics zFormal semantics zCompositional semantics zSyntax-driven semantic analysis zCompositional, logical, truth conditional, model theoretic semantics....

4 NLP1 - Torbjörn Lager 4 Truth Conditional Semantics zWe use language to talk about the world zMeaning = Truth conditions zExamples: y"John whistles" is true iff John whistles y"John visslar" is true iff John whistles y"Ogul fautu seq" is true iff... Natural language The outside world

5 NLP1 - Torbjörn Lager 5 Model Theoretic Semantics zWe don't know what the world is really like, so let's talk about a model of the world instead zSuch a model does (usually) consists of individuals, sets of individuals, functions and relations. i.e the sort of things set theory talks about zTruth becomes truth relative to a model Natural language Model The outside world

6 NLP1 - Torbjörn Lager 6 Compositional Semantics zThe Compositionality Principle: yThe meaning of the whole is a function of the meaning of the parts and the mode of combining them. yThe meaning of a complex expression is uniquely determined by the meaning of its constituents and the syntactic construction used to combine them. Natural language Model The World

7 NLP1 - Torbjörn Lager 7 Truth Conditional, Model Theoretic and Compositional Semantics Combined zA simple model M: yDomain: x{John, Mary, Paul} yInterpretation: xNames: "John" refers to John, "Mary" refers to Mary, etc. xVerbs: "whistles" refers to {John, Paul} zExample y"John whistles" is true in M iff the individual in M referred to as "John" is an element in the set of individuals that "whistles" refer to. Richard Montague (1970): "I reject the contention that an important theoretical difference exists between formal and natural languages"

8 NLP1 - Torbjörn Lager 8 Translational Semantics zAccount for the meanings of natural language utterances by translating them into another language. zIt could be any language, but only if this language has a formal semantics are we done. Natural language Logical Form Language Model The World

9 NLP1 - Torbjörn Lager 9 Grammar and Logical Form zS -> NP VP [S] = [VP]([NP]) zNP -> john [NP] = j zVP -> whistles [VP] = x[whistles'(x)] z[john whistles] = whistles'(j) cf. The principle of compositionality Have same truth conditions

10 NLP1 - Torbjörn Lager 10 Beta Reduction (Lambda Conversion) z[S] = [VP]([NP]) z[NP] = j z[VP] = x[whistles'(x)]  Beta reduction rule : u  (  )   where every occurrence of u in  is replaced by  z x[whistles'(x)](j) application zwhistles'(j) reduction

11 NLP1 - Torbjörn Lager 11 Grammar and Logical Form zS -> NP VP [S] = [NP]([VP]) zNP -> john [NP] = P[P(j)] zVP -> whistles [VP] = x[whistles'(x)] z[john whistles] = whistles'(j)

12 NLP1 - Torbjörn Lager 12 From Logical Form to Truth Conditions  whistles'(j) is true iff the individual (in the model) denoted by 'j' has the property denoted by 'whistles'  cf. "John whistles" is true iff John whistles

13 NLP1 - Torbjörn Lager 13 Beta Reduction (Lambda Conversion) z[S] = [NP]([VP]) z[NP] = P[P(j)] z[VP] = x[whistles'(x)]  Beta reduction rule : u  (  )   where every occurrence of u in  is replaced by  z P[P(j)]( x[whistles'(x)]) application z x[whistles'(x)](j) reduction zwhistles'(j) reduction

14 NLP1 - Torbjörn Lager 14 A Larger Example zS -> NP VP [S] = [NP]([VP]) zNP -> DET N [NP] = [DET]([N]) zDET -> every [DET] = Q[ P[  z[Q(z)  P(z)]]] zN -> man [N] = x[man'(x)] zVP -> whistles [VP] = x[whistles'(x)] z[every man whistles} =  z[man'(z)  whistles'(z)]

15 NLP1 - Torbjörn Lager 15 A Larger Example (cont'd) z[S] = [NP]([VP]) z[NP] = [DET]([N]) z[DET] = Q[ P[  z[Q(z)  P(z)]]] z[N] = x[man'(x)] z[VP] = x[whistles'(x)] z Q[ P[  z[Q(z)  P(z)]]]( x[man'(x)]) application z P[  z[ x[man'(x)](z)  P(z)]] reduction z P[  z[man'(z)  P(z)]] reduction z P[  z[man'(z)  P(z)]]( x[whistles'(x)]) application z  z[man'(z)  x[whistles'(x)](z)] reduction z  z[man'(z)  whistles'(z)] reduction

16 NLP1 - Torbjörn Lager 16 Examples in Oz zX = {fun {$ P} {P j} end fun {$ X} whistles(X) end} z% X gets bound to the tuple 'whistles(j)' zDetSem = fun {$ Q} fun {$ P} all(Z impl({Q Z} {P Z})) end end zNSem = fun {$ X} man(X) end zVPSem = fun {$ X} whistles(X) end zNPSem = {DetSem NSem} zSSem = {NPSem VPSem} z% X gets bound to the tuple 'all(Z impl(man(Z) whistles(Z)))'


Download ppt "Compositional Logical Semantics Torbjörn Lager Department of Linguistics Stockholm University."

Similar presentations


Ads by Google