November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics...

18
November 2003 CSA4050: Semantics I 1 CSA4050: Advanced Topics in NLP Semantics I • What is semantics for? • Role of FOL • Montague Approach

Transcript of November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics...

Page 1: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 1

CSA4050:Advanced Topics in NLP

Semantics I• What is semantics for?• Role of FOL• Montague Approach

Page 2: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 2

Semantics

• Semantics is the study of the meaning of NL expressions

• Expressions include sentences, phrases, and sentences.

• What is the goal of such study? – Provide a workable definition of meaning.– Explain semantic relations between

expressions.

Page 3: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 3

Workable Definition of Meaning

• Restrict the scope of semantics.• Ignore irony, metaphor etc.• Stick to the literal interpretations

of expressions• Assume that meaning is

understood in terms of something concrete: truth conditions.

Page 4: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 4

Truth Conditional Semantics

• Key Claim: the meaning of a sentence is identical to the conditions under which it is true.

• Know the meaning of "Ġianni ate fish for tea" = know exactly how to apply it to the real world and decide whether it is true or false.

• On this view, one task of semantic theory is to provide a system for identifying the truth conditions of sentences.

Page 5: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 5

TCS and Semantic Relations

• TCS provides a precise account of semantic relations between sentences.

• Examples:– S1 is synonymous with S2.– S1 entails S2– S1 is consistent with S2.– S1 is inconsistent with S2.

• Just like logic!• Which logic?

Page 6: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 6

NL Semantics:Two Basic Issues

• How can we automate the process of associating semantic representations with expressions of natural language?

• How can we use semantic representations of NL expressions to automate the process of drawing inferences?

• We will focus mainly on first issue.

Page 7: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 7

Associating Semantic Representations Automatically

• Design a semantic representation language.

• Figure out how to compute the semantic representation of sentences

• Link this computation to the grammar and lexicon.

Page 8: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 8

Semantic Representation Language

• Logical form (LF) is the name used by logicians (Russell, Carnap etc) to talk about the representation of context-independent meaning.

• Semantic representation language has to encode the LF.

• One concrete representation for logical form is first order logic (FOL)

Page 9: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 9

Why is FOL a good thing?

• Has a precise, model-theoretic semantics.• If we can translate a NL sentence S into a

sentence of FOL, then we have a precise grasp on at least part of the meaning of S.

• Important inference problems have been studied for FOL. Computational solutions exist for some of them.

• Hence the strategy of translating into FOL also gives us a handle on inference.

Page 10: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 10

Anatomy of FOL

• Symbols of different types– constant symbols: a, b, c.– variable symbols: x, y, z– function symbols: f, g, h– predicate symbols: p, q, r– connectives: &, v, – quantifiers: , – punctuation: ), (, “,”

Page 11: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 11

Anatomy of FOL

• Expressions of different types– Expressions for talking about things

• constant: a• variable: x• term: f(a,g(c,y))

– Expressions for stating facts• atomic formula: p(a,x).• complex formula: p(a,x) & q(y,b)• Quantified expression: x(p(a,x))

Page 12: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 12

word POS Logic Representation

Mike proper noun individual constant

mike

cow common noun

1 place predicate

cow(x)

red adjective 1 place predicate

red(x)

big red car adj/noun 1 place predicate

big(x) & red(x) & car(x)

sleeps intrans verb 1 place predicate

sleep (x)

kicks trans. verb 2 place predicate

kick(x,,y)

gives ditrans verb 3 place pred give(x,y,z)

Logical Form of Phrases

Page 13: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 13

Logical Forms of Sentences

• John kicks Fido:kick(john, fido)

• Every student wrote a programx( stud(x) y( prog(y) & write(x,y))y( x(stud(x) prog(y) & write(x,y))• Ambiguity problem• Compositionality.

Page 14: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 14

Frege’s Principle of Compositionality

• The POC states that the LF of a complex phrase can be built out of the LFs of the constituent parts.

• An everyday example of compositionality is the way in which the “meaning” of arithmetic expressions is computed(2+3) * (4/2) = (5 * 2) =10

Page 15: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 15

Compositionality for NL

• The LF of the whole sentence can be computed from the LF of the subphrases, i.e.

• Given the syntactic rule X Y Z.• Suppose [Y], [Z] are the LFs of Y,

and Z respectively.• Then [X] = ([Y],[Z]) where is

some function for semantic combination

Page 16: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 16

Claims of Richard Montague:

• Each syntax rule is associated with a semantic rule that describes how the LF of the LHS category is composed from the LF of its subconstituents

• 1:1 correspondence between syntax and semantics (rule-to-rule hypothesis)

• Functional composition proposed for combining semantic forms.

• Lambda calculus proposed as the mechanism for describing functions for semantic combination.

Page 17: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 17

Sentence Rule

• Syntactic Rule:S NP VP

• Semantic Rule:[S] = [VP]([NP])i.e. the LF of S is obtained by "applying" the LF of VP to the LF of NP.

• For this to be possible [VP] must be a function, and [NP] the argument to the function.

Page 18: November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.

November 2003 CSA4050: Semantics I 18

Swrite(bertrand,principia)

NPbertand

VPy.write(y,principia)

Vx.y.write(y,x)

NPprincipia

bertrand

writes principia

Parse Tree with Logical Forms