Computational Semantics: Discourse Representa- tion Theory Yuliya Lierler Computational Semantics: Discourse Representation Theory Yuliya Lierler University of Nebraska at Omaha November 28, 2012
ComputationalSemantics:Discourse
Representa-tion
Theory
Yuliya Lierler Computational Semantics:Discourse Representation Theory
Yuliya Lierler
University of Nebraska at Omaha
November 28, 2012
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)
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.
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
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)
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))
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))
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.
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”)
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
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
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)
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)
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
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
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
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
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
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
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
ComputationalSemantics:Discourse
Representa-tion
Theory
Yuliya Lierler
Translating DRT to FOL:DRSs
(
x1. . . xnC1...
Cn
)fo = ∃x1 . . .∃xn((C1)fo& . . .& (Cn)fo)
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
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)
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
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
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
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
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 .
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.
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
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
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
ComputationalSemantics:Discourse
Representa-tion
Theory
Yuliya Lierler
Example of Merge within Lexical Semantics:
Vincent: λ u.(x
x=vincent ; u@ x)
ComputationalSemantics:Discourse
Representa-tion
Theory
Yuliya Lierler
Lexical Semantics:Nouns and proper names
boxer: λ x. boxer(x)
Vincent: λ u.(x
x=vincent ;u@ x)
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)
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)
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
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)
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
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!
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
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.
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)