computing natural language semantics reading logical form€¦ · first course in computational...

13
Semantic Composition for NL Semantic (Scope) Ambiguity Underspecification Computing Natural Language Semantics Informatics 2A: Lecture 22 Bonnie Webber and Katya Alahverdzhieva School of Informatics University of Edinburgh [email protected] November 12, 2009 Informatics 2A: Lecture 22 Computing Natural Language Semantics 1 Semantic Composition for NL Semantic (Scope) Ambiguity Underspecification 1 Semantic Composition for NL Logical Form 2 Semantic (Scope) Ambiguity Definition Semantic Scope Approaches to Scope Ambiguity 3 Underspecification Motivation Underspecification: General Idea Building Underspecified Representations Hole Semantics Informatics 2A: Lecture 22 Computing Natural Language Semantics 2 Semantic Composition for NL Semantic (Scope) Ambiguity Underspecification Reading Required Reading: J&M, ch. 18 (Intro 18.3) NLTK book ch. 10 (10.1 10.4) http://nltk.googlecode.com/svn/trunk/doc/book/ch10.html Alexander Koller & Joachim Nieren. Scope Underspecification and Processing. ESSLLI 1991 Lecture Notes (pp9–40: general intro to underspecification) http://www.coli.uni-saarland.de/~ koller/papers/esslli99.ps.gz Recommended Reading: Blackburn & Bos. Representation and Inference for Natural Language. A First Course in Computational Semantics. 2005 (ch.1–3) Informatics 2A: Lecture 22 Computing Natural Language Semantics 3 Semantic Composition for NL Semantic (Scope) Ambiguity Underspecification Logical Form Logical Form To build a compositional semantics for NL, we attach valuation functions to grammar rules (semantic attachments). The semantic attachments instruct us how to compute the interpretation of the LHS of the rule from the interpretations of its RHS components. Grammar I S NP VP {VP.Sem(NP.Sem)} VP TV NP {TV.Sem(NP.Sem)} NP NPR {NPR.Sem} TV loves {λy.λx.love(x,y)} NPR Orr {orr} NPR Yossarian {yossarian} VP.Sem(NP.Sem) means apply the interpretation of the VP to the interpretation of the NP. Informatics 2A: Lecture 22 Computing Natural Language Semantics 4

Upload: others

Post on 12-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

Computing Natural Language SemanticsInformatics 2A: Lecture 22

Bonnie Webber and Katya Alahverdzhieva

School of InformaticsUniversity of [email protected]

November 12, 2009

Informatics 2A: Lecture 22 Computing Natural Language Semantics 1

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

1 Semantic Composition for NLLogical Form

2 Semantic (Scope) AmbiguityDefinitionSemantic ScopeApproaches to Scope Ambiguity

3 UnderspecificationMotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Informatics 2A: Lecture 22 Computing Natural Language Semantics 2

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

Reading

Required Reading:

J&M, ch. 18 (Intro → 18.3)

NLTK book ch. 10 (10.1 → 10.4)http://nltk.googlecode.com/svn/trunk/doc/book/ch10.html

Alexander Koller & Joachim Nieren. Scope Underspecification and

Processing. ESSLLI 1991 Lecture Notes (pp9–40: general intro tounderspecification)http://www.coli.uni-saarland.de/~koller/papers/esslli99.ps.gz

Recommended Reading:

Blackburn & Bos. Representation and Inference for Natural Language. A

First Course in Computational Semantics. 2005 (ch.1–3)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 3

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

Logical Form

To build a compositional semantics for NL, we attach valuation functionsto grammar rules (semantic attachments).The semantic attachments instruct us how to compute the interpretationof the LHS of the rule from the interpretations of its RHS components.

Grammar I

S → NP VP {VP.Sem(NP.Sem)}VP → TV NP {TV.Sem(NP.Sem)}NP → NPR {NPR.Sem}TV → loves {λy.λx.love(x,y)}NPR → Orr {orr}NPR → Yossarian {yossarian}

VP.Sem(NP.Sem) means apply the interpretation of the VP to theinterpretation of the NP.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 4

Page 2: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

Logical Form: example

S[λx .love(x , orr)(yossarian) ⇒β love(yossarian, orr)]

NP[yossarian]

NPR[yossarian]

Yossarian

VP[λy .λx .love(x , y)(orr) ⇒β λx .love(x , orr)]

TV[λy .λx .love(x , y)]

loves

NP[orr ]

NPR[orr ]

Orr

Informatics 2A: Lecture 22 Computing Natural Language Semantics 5

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

Logical Form, cont’d

◦ What about the interpretation of an NP other than a propernames – eg,

John has access to a computer.Every student has access to a computer.

whose FOPL interpretation contains an existential (∃) or auniversal (∀) quantifier

∃x(computer(x) ∧ have access to(john, x))∀x(student(x) → ∃y(computer(y) ∧ have access to(x , y)))

◦ Can we build such interpretations up from their component partsin the same way as with proper names?

Informatics 2A: Lecture 22 Computing Natural Language Semantics 6

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

Suppose we get interpretations for a computer and every student fromthe following syntactic rules and semantic attachments:

Grammar II

VP → TV NP {TV.Sem(NP.Sem)}TV → has access to {λy.λx.have access to(x,y)}NP → a NOM {∃x .NOM.Sem(x)}NP → every NOM {∀x .NOM.Sem(x)}NPR → John {john}NOM → N {N.Sem}N → student {student}N → computer {computer}

Following the principle of compositionality, what interpretations do weget for:

John has access to a computer.Every student has access to a computer.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 7

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

LF: example I

S[have access to(john,∃x .computer(x))]

NP[john]

NPR[john]

John

VP[λx .have access to(x ,∃x .computer(x))]

TV[λy .λx .have access to(x , y)]

has access to

NP[∃x .computer(x)]

a NOM[computer ]

N[computer ]

computer

John has access to a computer: have access to(john,∃x .computer(x))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 8

Page 3: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

LF: example II

S[have access to(∀x .student(x),∃y .computer(y))]

NP[∀x .student(x)]

every NOM[student]

N[student]

student

VP[λx .have access to(x ,∃y .computer(y))]

TV[λy .λx .have access to(x , y)]

has access to

NP[∃y .computer(y)]

a NOM[computer ]

N[computer ]

computer

Every student has access to a computer:have access to(∀x .student(x),∃y .computer(y))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 9

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

Problems with simple direct interpretation

Neither of these interpretations is a syntactically correctFOPL formula

Moreover, the second sentence is semantically ambiguous, soeach interpretation should have its own unambiguousrepresentation

Informatics 2A: Lecture 22 Computing Natural Language Semantics 10

Semantic Composition for NLSemantic (Scope) Ambiguity

UnderspecificationLogical Form

Problems with simple direct interpretation

Neither of these interpretations is a syntactically correctFOPL formula

Moreover, the second sentence is semantically ambiguous, soeach interpretation should have its own unambiguousrepresentation

The first problem arises because FOPL expressions are notisomorphic to the syntactic structure of NL.

The second problem arises because simple direct interpretation isdeterministic.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 10

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

DefinitionSemantic ScopeApproaches to Scope Ambiguity

Ambiguities in NL

Recall (L2,L11,L12) that NL ambiguities arise at variouslevels: PoS, syntax, lexicon.

But even an utterance with a unique syntactic structure andwords that are unambiguous with respect to PoS tags andsenses can have > 1 interpretation.

Consider the sentence Every student has access to a laptop.. . .

Informatics 2A: Lecture 22 Computing Natural Language Semantics 11

Page 4: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

DefinitionSemantic ScopeApproaches to Scope Ambiguity

S

NP

every NOM

N

student

VP

TV

has-access-to

NP

a NOM

N

laptop

Informatics 2A: Lecture 22 Computing Natural Language Semantics 12

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

DefinitionSemantic ScopeApproaches to Scope Ambiguity

Semantic Ambiguity

While the sentence is neither syntactically nor lexically ambiguous,it has two different interpretations because of its determiners:

every: interpreted as ∀ (universal quantifier)

a: interpreted as ∃ (existential quantifier)

Meaning 1

Possibly a different laptop per student∀x(student(x) → ∃y(laptop(y) ∧ have access to(x , y)))

Meaning 2

Possibly the same laptop for all students∃y(laptop(y) ∧ ∀x(student(y) → have access to(x , y)))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 13

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

DefinitionSemantic ScopeApproaches to Scope Ambiguity

Scope

The ambiguity arises because every and a each has its ownscope:

◦ Interpretation 1: every has scope over a◦ Interpretation 2: a has scope over every

Scope is not uniquely determined either by left-to-right order,or by position in the parse tree.

We therefore need other mechanisms to ensure that theambiguity is reflected by there being multiple interpretationsassigned to S.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 14

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

DefinitionSemantic ScopeApproaches to Scope Ambiguity

Coping with Scope: options

1. Enumerate all interpretations: computationally unattractive.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 15

Page 5: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

DefinitionSemantic ScopeApproaches to Scope Ambiguity

Coping with Scope: options

1. Enumerate all interpretations: computationally unattractive.

2. Store the interpretation of sub-units (as in chart parsing).Empty the stores after the whole sentence is parsed. The order ofemptying the stores determines what has scope over what. (Seenltk.sem.cooper storage.)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 15

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

DefinitionSemantic ScopeApproaches to Scope Ambiguity

Coping with Scope: options

1. Enumerate all interpretations: computationally unattractive.

2. Store the interpretation of sub-units (as in chart parsing).Empty the stores after the whole sentence is parsed. The order ofemptying the stores determines what has scope over what. (Seenltk.sem.cooper storage.)

3. Use an underspecified representation that can be furtherspecified to each of the multiple interpretations.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 15

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Why use underspecification? (1)

◦ Constraints from the discourse or the outside world may get usdirectly to the intended interpretation, rather than needing toselect from among enumerated alternatives:

Every student has access to a laptop. The European Research Foundationjust donated 200 new laptops for use in Inf2a. (⇒ Meaning 1)

Every student has access to a laptop. It can be borrowed from the ITO.(⇒ Meaning 2)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 16

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Page 6: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Every student at some university has access to a laptop.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Every student at some university has access to a laptop.

1. Not necessarily same laptop, not necessarily same university∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z)))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Every student at some university has access to a laptop.

1. Not necessarily same laptop, not necessarily same university∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z)))2. Same laptop, not necessarily same university∃z(laptop(z) ∧ ∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → have access(x , z)))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Every student at some university has access to a laptop.

1. Not necessarily same laptop, not necessarily same university∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z)))2. Same laptop, not necessarily same university∃z(laptop(z) ∧ ∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → have access(x , z)))3. Not necessarily same laptop, same university∃y(univ(y) ∧ ∀x((stud(x) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z))))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Page 7: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Every student at some university has access to a laptop.

1. Not necessarily same laptop, not necessarily same university∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z)))2. Same laptop, not necessarily same university∃z(laptop(z) ∧ ∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → have access(x , z)))3. Not necessarily same laptop, same university∃y(univ(y) ∧ ∀x((stud(x) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z))))4. Same university, same laptop∃y(univ(y) ∧ ∃z(laptop(z) ∧ ∀x((stud(x) ∧ at(x , y)) → have access(x , z))))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Every student at some university has access to a laptop.

1. Not necessarily same laptop, not necessarily same university∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z)))2. Same laptop, not necessarily same university∃z(laptop(z) ∧ ∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → have access(x , z)))3. Not necessarily same laptop, same university∃y(univ(y) ∧ ∀x((stud(x) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z))))4. Same university, same laptop∃y(univ(y) ∧ ∃z(laptop(z) ∧ ∀x((stud(x) ∧ at(x , y)) → have access(x , z))))5. Same laptop, same university∃z(laptop(z) ∧ ∃y(univ(y) ∧ ∀x((stud(x) ∧ at(x , y)) → have access(x , z))))where 4 & 5 are equivalent

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Motivating Underspecification (2)

◦ The number of interpretations grows exponentially with the number ofscope operators:

Every student at some university has access to a laptop.

1. Not necessarily same laptop, not necessarily same university∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z)))2. Same laptop, not necessarily same university∃z(laptop(z) ∧ ∀x(stud(x) ∧ ∃y(univ(y) ∧ at(x , y)) → have access(x , z)))3. Not necessarily same laptop, same university∃y(univ(y) ∧ ∀x((stud(x) ∧ at(x , y)) → ∃z(laptop(z) ∧ have access(x , z))))4. Same university, same laptop∃y(univ(y) ∧ ∃z(laptop(z) ∧ ∀x((stud(x) ∧ at(x , y)) → have access(x , z))))5. Same laptop, same university∃z(laptop(z) ∧ ∃y(univ(y) ∧ ∀x((stud(x) ∧ at(x , y)) → have access(x , z))))where 4 & 5 are equivalent

Every student at some university does not have access to a computer.

→ 18 interpretations

Informatics 2A: Lecture 22 Computing Natural Language Semantics 17

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Underspecification

Underspecification starts from the fact that the interpretations ofsemantically ambiguous sentences nevertheless share somecomponents:

∀x .(student(x) → ∃y .(computer(y) ∧ have access to(x , y)))∃y .(computer(y) ∧ ∀x .(student(y) → have access to(x , y)))

with the different meanings being determined by which part is inthe scope of (’<’) which part:

Meaning 1: exists < every

Meaning 2: every < exists

Informatics 2A: Lecture 22 Computing Natural Language Semantics 18

Page 8: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation

1. Specify the components of the formula

every(x,. . . ,. . . )

student(x)

exists(y,. . . ,. . . )

computer(y)

have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 19

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation

1. Specify the components of the formula

every(x,. . . ,. . . )

student(x)

exists(y,. . . ,. . . )

computer(y)

have access to(x,y)

2. Add unique labels and fill in the argument slots

l1: every(x,l11,l12)

l11: student(x)

l2: exists(y,l21,l22)

l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 19

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Tree Representation

l1: every(x,l11,l12) l2: exists(x,l21,l22)

l11: student(x) l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 20

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Tree Representation

l1: every(x,l11,l12) l2: exists(x,l21,l22)

l11: student(x) l21: computer(y)

l3: have access to(x,y)

We can combine the pieces with solid lines. If a subformula can beplugged into more than one slot, we will use dotted lines instead.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 20

Page 9: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Tree Representation

l1: every(x,l11,l12) l2: exists(x,l21,l22)

l11: student(x) l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 21

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation, cont’d

1. Specify the components of the formula

Informatics 2A: Lecture 22 Computing Natural Language Semantics 22

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation, cont’d

1. Specify the components of the formula√

Informatics 2A: Lecture 22 Computing Natural Language Semantics 22

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation, cont’d

1. Specify the components of the formula√

2. Add unique labels and fill in the argument slots

Informatics 2A: Lecture 22 Computing Natural Language Semantics 22

Page 10: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation, cont’d

1. Specify the components of the formula√

2. Add unique labels and fill in the argument slots√

Informatics 2A: Lecture 22 Computing Natural Language Semantics 22

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation, cont’d

1. Specify the components of the formula√

2. Add unique labels and fill in the argument slots√

3. Add scope constraints

Informatics 2A: Lecture 22 Computing Natural Language Semantics 22

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation, cont’d

1. Specify the components of the formula√

2. Add unique labels and fill in the argument slots√

3. Add scope constraintsl3 < l12 and l3 < l22

Informatics 2A: Lecture 22 Computing Natural Language Semantics 22

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Towards Underspecified Representation, cont’d

1. Specify the components of the formula√

2. Add unique labels and fill in the argument slots√

3. Add scope constraintsl3 < l12 and l3 < l22

4. Add a top label (l0) containing the whole formula.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 22

Page 11: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Tree Representation

l0

l1: every(x,l11,l12) l2: exists(x,l21,l22)

l11: student(x) l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 23

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Approach to Underspecification: Hole Semantics

◦ Unspecified labels are replaced by holes marking the positionwhere a subformula can be plugged in.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 24

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Approach to Underspecification: Hole Semantics

◦ Unspecified labels are replaced by holes marking the positionwhere a subformula can be plugged in.

l0

l1: every(x,l11,l12) l2: exists(x,l21,l22)

l11: student(x) l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 24

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Approach to Underspecification: Hole Semantics

◦ Unspecified labels are replaced by holes marking the positionwhere a subformula can be plugged in.

h0

l1: every(x,l11,h1) l2: exists(x,l21,h2)

l11: student(x) l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 25

Page 12: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Disambiguation I

◦ Disambiguation consists in plugging a subformula into a holestarting from the top (h0) node.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 26

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Disambiguation I

◦ Disambiguation consists in plugging a subformula into a holestarting from the top (h0) node.

Meaning 1

h0 = l1

l1: every(x,l11,h1)

l11: student(x) l2: exists(x,l21,h2)

l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 26

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Meaning 1

h0 = l1; h1 = l2

l1: every(x,l11,l2)

l11: student(x) l2: exists(x,l21,h2)

l21: computer(y)

l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 27

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Meaning 1

h0 = l1; h1 = l2 and h2 = l3

l1: every(x,l11,l2)

l11: student(x) l2: exists(x,l21,l3)

l21: computer(y) l3: have access to(x,y)

∀x .(student(x) → ∃y .(computer(y) ∧ have access to(x , y)))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 28

Page 13: Computing Natural Language Semantics Reading Logical Form€¦ · First Course in Computational Semantics . 2005 (ch.1{3) Informatics 2A: Lecture 22 Computing Natural Language Sema

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Disambiguation II

Meaning 2

h0 = l2

l2: exists(x,l21,h2)

l21: computer(y) l1: every(x,l11,h1)

l11: student(x) l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 29

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Meaning 2

h0 = l2; h2 = l1

l2: exists(x,l21,l1)

l21: computer(y) l1: every(x,l11,h1)

l11: student(x) l3: have access to(x,y)

Informatics 2A: Lecture 22 Computing Natural Language Semantics 30

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Meaning 2

h0 = l2; h2 = l1 and h1 = l3

l1: exists(y,l21,l1)

l21: computer(y) l1: every(x,l11,l3)

l11: student(x) l3: have access to(x,y)

∃y .(computer(y) ∧ ∀x .(student(x) ∧ have access to(x , y)))

Informatics 2A: Lecture 22 Computing Natural Language Semantics 31

Semantic Composition for NLSemantic (Scope) Ambiguity

Underspecification

MotivationUnderspecification: General IdeaBuilding Underspecified RepresentationsHole Semantics

Summary

Syntax guides semantic composition in a systematic way.

Lambda expressions facilitate the construction of compositionalsemantic interpretations.

Logical forms can be constructed by attaching valuation functionsto grammar rules.

However, this approach is not adequate enough for quantified NPs,as LFs are not always isomorphic with syntax.

Instead, we can elegantly handle scope by building an abstractunderspecified representation and disambiguate on demand.

Informatics 2A: Lecture 22 Computing Natural Language Semantics 32