computational semantics: discourse representation theory

43
Computational Semantics: Discourse Representa- tion Theory Yuliya Lierler Computational Semantics: Discourse Representation Theory Yuliya Lierler University of Nebraska at Omaha November 28, 2012

Upload: dinhtram

Post on 14-Feb-2017

239 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler Computational Semantics:Discourse Representation Theory

Yuliya Lierler

University of Nebraska at Omaha

November 28, 2012

Page 2: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Overview

• Discourse Representation Theory (DRT) for SemanticRepresentation (Logic Form)• DRT allows for Anaphora Resolution• Relation between DRSs and First Order Logic• Method for Constructing Discourse Representation

Structures (DRS)

Page 3: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Discourse Representation Theory: Wikipedia

Discourse Representation Theory (DRT) is a framework forexploring meaning under a formal semantics approach.

Traditional Montagovian (Richard Montague) approach:en.wikipedia.org/wiki/Richard_Montagueen.wikipedia.org/wiki/Montague_grammar

The main differences between DRT and MontagueGrammar is that DRT includes a level of abstract mentalrepresentations (discourse representation structures –DRS) within its formalism, which gives it an intrinsic ability tohandle meaning across sentence boundaries.

DRT was created by Hans Kamp in 1981. Irene Heiminvented File Change Semantics in 1982.

Page 4: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Interpreting Discourse

• Discourse: a sequence of several natural languagesentences• How can we represent the meaning of discourse?• It is not just the conjunction of the first-order logic

representations of its individual sentences

Page 5: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Why not FOL

• Example 1:Mia is a woman. She loves Vincent.• FOL representation:

A: woman(mia)& love(x,vincent)B: woman(mia)& love(mia,vincent)

Page 6: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Why not FOL

• Example 2:A woman snorts. She collapses.• FOL Representation

A: ∃y(woman(y)& snort(y))& collapse(x)B: ∃y(woman(y)& snort(y))& collapse(y)C: ∃y(woman(y)& snort(y)& collapse(y))

Page 7: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Why not FOL

• Example 3:If a woman snorts, she collapses.• FOL Representation:

A: ∃y(woman(y)& snort(y))→collapse(x)B: ∃y(woman(y)& snort(y))→collapse(y)C: ∃y(woman(y)& snort(y)→collapse(y))D: ∀y(woman(y)& snort(y)→collapse(y))

Page 8: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Context Change Potential

• We need to start with the right representation• Basic FOL does not seem to give us the right means

? Manipulation with quantifier scope and free variables? Not the right intuitions about how discourse works

• We need a representation that naturally mirrors thecontext change potential (CCP) of an utterance.

Wikipedia: CCP is the way new information reshapesexisting understanding. As speakers use natural language,they offer and interpret new contributions in the context ofwhat has already passed in their discourse.

Page 9: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Overview of Discourse Representation Theory

• DRT employs a language based on boxlike structurescalled DRSs• DRSs are Pictures (something like ”mental models”)

Page 10: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Discourse Representation Structures

• A new discourse starts a new DRS:

• This DRS is meant to represent the meaning of anentire discourse• When a new sentence (”A woman snorts”) is parsed,

the DRS is expanded:x

woman(x)snort(x)

• The x in the top of the box is a discourse referent• The expressions woman(x) and snort(x) are

DRS-conditions

Page 11: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Processing subsequent sentences

• Let’s now interpret:She collapses• We will do three things:

? Add a new discourse referent? Add condition collapse(y)

? Add a further condition x = y

x,ywoman(x)snort(x)

collapse(y)x=y

• Why did we do this?? She is a pronoun? Pronouns introduce a discourse referent which is then

identified with an accessible discourse referent

Page 12: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Further examples of DRSs

• Proper names:

Mia snortsx

mia=xsnort(x)

• Quantified NPs:

Every man smokes. xman(x) ⇒ smoke(x)

Page 13: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Further examples of DRSs

• Negation

Mia does not have a car

xx=mia

¬y

car(y)have(x,y)

• Disjunction

Mia smokes or snorts

xx=mia

smoke(x) ∨ snorts(x)

Page 14: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Syntax of DRSs

• If x1 . . . xn are discourse referents, and C1. . . Cn are

conditions, then

x1 . . . xnC1...

Cn

is a DRS

Page 15: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Terms and Syntax of DRS-conditions

? A term τ is either a constant or a discourse referent• If R is a relation symbol of arity n, and τ1. . . τn are

terms, then R(τ1. . . τn) is a DRS-condition• If τ1 and τ2 are terms then τ1 = τ2 is a DRS-condition• If B is a DRS, then ¬B is a DRS-condition• If B1 and B2 are DRSs, then B1 ⇒ B2 and B1 ∨ B2 are

DRS-conditions

Page 16: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Accessibility

• Resolving anaphoric pronouns in DRT is subject toaccessibility constraints• Accessibility is a geometric concept, defined in terms of

the ways DRSs are nested into each other• A DRS B1 is accessible from DRS B2 when B1 equals

B2, or when B1 subordinates B2

Page 17: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Subordination

• A DRS B1 subordinates B2 iff:? B1 immediately subordinates B2? There is a DRS B such that B1 subordinates B and B

subordinates B2

• B1 immediately subordinates B2 iff:? B1 contains a condition ¬B2? B1 contains a condition B2∨B or B∨B2? B1 contains a condition B2 ⇒ B? B1 ⇒ B2 is a condition in some DRS B

Page 18: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

The accessibility constraint

Suppose a pronoun has introduced a new discoursereferent y into the universe of some DRS B.Then we are only free to add the condition y = x to theconditions of B if x is declared in an accessible DRS from B

Page 19: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Accessibility: examples

• A woman walks. She collapses.

x ywoman(x)walk(x)

collapse(y)y = x

• Every woman walks. ?She collapses.y

xwoman(x) ⇒ walk(x)

collapse(y)y 6= x

Page 20: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Interpreting DRSs

• We use the translation from DRSs to First-Order Logicto define the semantics for the DRS language

Page 21: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Translating DRT to FOL:DRSs

(

x1. . . xnC1...

Cn

)fo = ∃x1 . . .∃xn((C1)fo& . . .& (Cn)fo)

Page 22: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Translating DRT to FOL:DRS-Conditions

• (R(x1. . . xn))fo = R(x1. . . xn)• (x1=x2)fo = x1=x2• (¬B)fo= ¬(B)fo

• (B1∨B2)fo = (B1)fo ∨ (B2)fo

Page 23: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Translating DRT to FOL:Implicative DRS-conditions

(

x1. . . xnC1...

Cn

⇒ B)fo =

∀ x1. . .∀ xn(((C1)fo& . . .& (Cn)fo)→(B)fo)

Page 24: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Building DRSs

• We know now what DRT is• But how can we construct DRSs for discourses in a

systematic and automatic way?• We will explore the lambda-based method

Page 25: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Semantic Construction

To build representations we need to:• Specify the meanings of the words – ‘incomplete’

formulas (lexical semantics)• Indicate where the missing information will come from

(syntax)• Provide means of combining parts of discourse

Key ideas:• Use lambda terms to specify lexical entries• Make rules in the grammar specify which daughter is

the function and which the argument• Use lambda calculus to yield the λ-DRS of the mother

node• Design merge operation for DRSs

Page 26: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Intuition behind λ

We first focus on λ-calculus that we see as a glue languagededicated to the task of gluing together the items needed tobuild semantic representation.

Lambdas talk about missing information, and where it is.• The λ binds a variable• The positions of a λ-bound variable in the formula mark

where information is missing• Replacing these variables with values fills in the

missing information

Page 27: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

The λ Operator and Functional Application

The λ operator marks missing information by bindingvariables• In λx .man(x), the prefix λx binds the occurrence of x in

man(x) and suggests that at this point it is unclear“who is a man”.

The @ operator is used to indicate functional application, i.e.,that we wish to perform substitution. In λx .man(x)@vincent

• λx .man(x) is a functor• vincent is an argument

Page 28: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

The β-Conversion and α–Conversion

The substitution is performed by β-conversion.From

λx .man(x)@vincent

β-conversion produces

man(vincent).

α-conversion is the process of renaming bound variables.For instance, we obtain

λx .λy .loves(x , y)

fromλz.λv .loves(z, v)

by α-conversion by replacing z by x and w by y .

Page 29: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Building DRSs with lambdas

• We will use the lambda-calculus as a tool to build DRSsfor sentences• We will use λ to mark missing information in the DRS• We call this combination λ-DRT• It will allow us to use such tools as α, β-conversion.

Page 30: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Lexical Semantics:Nouns and proper names

boxer: λ x. boxer(x)

• λ binds variable x• Position of x in boxer(x) marks where information is

missing

Page 31: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

The Merge ; Operator

• The ; indicates a merge between two DRSsDiscourse: A boxer loses. He dies.

(x

boxer(x)lose(x)

;y

die(y)y=?

)

• The merge is used to combine two DRSs into onelarger DRS

Page 32: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Merge Reduction

• Replacing merged DRSs for a new DRS by taking theunion of the two universes and conditions:

(x

boxer(x)lose(x)

;y

die(y)y=?

)=

x yboxer(x)lose(x)die(y)y=?

Accessibility Constraints⇒x y

boxer(x)lose(x)die(y)y=x

• The merge is the operation on DRSs we need to statein the lexical semantics

Page 33: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Example of Merge within Lexical Semantics:

Vincent: λ u.(x

x=vincent ; u@ x)

Page 34: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Lexical Semantics:Nouns and proper names

boxer: λ x. boxer(x)

Vincent: λ u.(x

x=vincent ;u@ x)

Page 35: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Lexical Semantics:Determiners

a: λ p.λ q.((x

;p@ x);q@ x)

every: λ p.λ q.((x

;p@x)⇒ q@ x)

Page 36: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Lexical Semantics:Verbs

dances: λ x. dance(x)

wins: λ x. win(x)admires:

λ u.λ x.u@λ y. admire(x,y)

Page 37: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

• Sentence: A boxer wins.• Lexical Semantics enrties:

a: λ p.λ q.((x

;p@ x);q@ x)

boxer: λ x. boxer(x)

wins: λ x. win(x)

• How do we put them together?? α, β-conversions

Page 38: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

β-Conversion in Use

β-conversion is the process of filling the missing informationin place of lambda-bound variables:

λ x. boxer(x) @y to boxer(y)

Page 39: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Merge-reduction can only be applied afterα-conversion

• Consider the example: A woman walks and a womantalks

(x

woman(x)walk(x)

;x

woman(x)talk(x)

)=

xwoman(x)walk(x)talk(x)

• This is of course not the result we want!• Renaming mechanism is needed

Page 40: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

α-Conversion in Use

α-conversion is the process of renaming bound variables:

• λ x. boxer(x) to λ y. boxer(y)

? These mean the same thing!

• λ x. boxer(x) @x to λ y. boxer(y) @x

? where λ x.boxer(x)

– functor

? @x – argument

• Rename variables in functor so that they are all distinctfrom the variables in the argument.• Rename variables in merged DRSs so that variables in

one DRS are distinct from variables in the other.• This is like using any variable in the lexical entries at

most once!

Page 41: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Syntax and Application

Syntax indicates how the missing information in lexicalentries is filled:• DCG (definite clause grammar rule NP⇒ DET N

→• NP⇒ DET@N

? Lexical semantic entry for DET – functor? Lexical semantic entry for N – argument

Page 42: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Syntax Contribution Example

• NP->A @ boxer.

• λ p.λ q.((x

;p@ x);q@ x)@λ x. boxer(x)

• Blackboard 1.

Page 43: Computational Semantics: Discourse Representation Theory

ComputationalSemantics:Discourse

Representa-tion

Theory

Yuliya Lierler

Blackboard 2

Every man dances

• NP->Det @ N• S->NP @ V

Every: λ p.λ q.((x

;p@x)⇒ q@x)

man: λ x. man(x)

dances: λ x. dance(x)