computational linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10....

30
Computational Linguistics CS579: Fall Semester 2020 School of Computing Korea Advanced Institute of Science and Technology Jong C. Park © All rights reserved.

Upload: others

Post on 01-Dec-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Computational LinguisticsCS579: Fall Semester 2020

School of ComputingKorea Advanced Institute of Science and Technology

Jong C. Park

© All rights reserved.

Page 2: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

First-Order Logic• First-Order Logic• Three Inference Tasks• A First-Order Model Checker• First-Order Logic and Natural Language

Lambda Calculus• Compositionality• Two Experiments• The Lambda Calculus• Implementing Lambda Calculus• Grammar Engineering

Fall 2020 KAIST CS579: Computational Linguistics 2

Review of Previous Lectures

Page 3: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Lambda Calculus• We showed how to define a grammar that is

modular, extensible and reusable, in a framework of grammar engineering.

Fall 2020 KAIST CS579: Computational Linguistics 3

Review of the Last Lecture

Page 4: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Scope Ambiguities Montague’s Approach Storage Methods Hole Semantics

Fall 2020 KAIST CS579: Computational Linguistics 4

Underspecified Representations

Page 5: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Goals Today• We examine the nature of scope ambiguities.• We introduce Montague’s approach to scope

ambiguities.

Fall 2020 KAIST CS579: Computational Linguistics 5

Underspecified Representations

Page 6: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Observation• Sentences with scope ambiguities are often

semantically ambiguous but fail to exhibit any syntactic ambiguity.

• They may have at least two non-equivalent first-order representations, but have only one syntactic analysis.

Problem• If there is no syntactic ambiguity, we will be able

to build only one of the possible representations.

Fall 2020 KAIST CS579: Computational Linguistics 6

Underspecified Representations

Page 7: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

We investigate four different approaches to scope ambiguities.• Montague’s original method• Two storage based methods• Cooper storage• Keller storage

• A modern underspecification based approach• Hole semantics

Fall 2020 KAIST CS579: Computational Linguistics 7

Underspecified Representations

Page 8: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

SCOPE AMBIGUITIES

CS579: Computational Linguistics 8Fall 2020 KAIST

Page 9: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Scope ambiguity is a common semantic phenomenon and can arise from many sources.• quantifier, coordination, negation, adverbs, etc.

We will be concerned primarily with quantifier scope ambiguities. • They arise in sentences containing more than one

quantifying noun phrase.• Every boxer loves a woman.

Fall 2020 KAIST CS579: Computational Linguistics 9

Scope Ambiguities

Page 10: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Deriving a representation for the sentence:

Fall 2020 KAIST CS579: Computational Linguistics 10

Every boxer loves a woman (S)∀x(boxer(x)→ ∃y(woman(y)∧love(x,y)))

Every boxer (NP)𝜆u. ∀x(boxer(x)→u@x)

loves a woman (VP)𝜆z. ∃y(woman(y)∧love(z,y))

loves (TV)𝜆v. 𝜆z. v@𝜆x.love(z,x))

a woman (NP)𝜆w. ∃y(woman(y) ∧ w@y

Page 11: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

The reading corresponding to the constructed first-order formula • x(boxer(x) y(woman(y) love(x,y)))• For each boxer there is a woman that he loves.• “every boxer” has scope over (or out-scopes) “a

woman”. • In other words, “every boxer” has wide scope

and “a woman” has narrow scope.

Fall 2020 KAIST CS579: Computational Linguistics 11

Page 12: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

There is another reading for the sentence.• y(woman(y) x(boxer(x) love(x,y)))• There is one woman who is loved by all boxers.• “a woman” has scope over (or out-scopes)

“every boxer”. • In other words, “a woman” has wide scope and

“every boxer” has narrow scope.

Is this a genuine reading, distinct from the previous reading?

Fall 2020 KAIST CS579: Computational Linguistics 12

∀x(boxer(x)→ ∃y(woman(y)∧love(x,y)))

Page 13: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Question• Are scope ambiguities really such a problem?

For instance, we can argue • that the first reading is sufficient to cover both

readings, in that it is ‘weaker’, • that the weaker reading is the ‘real’

representation of the sentence, and • that the stronger reading is pragmatically

inferred from the weaker reading with the help of the contextual knowledge.

Fall 2020 KAIST CS579: Computational Linguistics 13

1. ∀x(boxer(x)→ ∃y(woman(y)∧love(x,y)))2. ∃y(woman(y)∧ ∀x(boxer(x)→ love(x,y)))

Page 14: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Another sentence• Every owner of a hash bar gives every criminal

a big kahuna burger. • The sentence has 18 readings:

1. ∀x(∃y(hbar(y) ⋀ of(x,y) ⋀ owner(x)) → ∀z(crim(z) →∃u(bkb(u) ⋀ give(x,z,u))))

2. ∀x(crim(x) → ∀y((∃z(hbar(z) ⋀ of(y,z))⋀ owner(y)) → ∃u(bkb(u) ⋀ give(y,x,u))))

3. ∀x((∃y(hbar(y) ⋀ of(x,y) ⋀ owner(x)) →∃z(bkb(z) ⋀ ∀u(crim(u) → give(x,u,z))))

Fall 2020 KAIST CS579: Computational Linguistics 14

Page 15: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

4. ∀x(crim(x) → ∃y(bkb(y) ∧ ∀z(∃u(hbar(u) ⋀ of(z,u) ⋀owner(z)) → give(z,x,y))))

5. ∀x(crim(x) → ∃y(hbar(y) ∧ ∀z((of(z,y) ⋀ owner(z)) →∃u(bkb(u) ⋀ give(z,x,u)))))

6. ∀x(crim(x) → ∃y(hbar(y) ⋀ ∃z(bkb(z) ⋀ ∀u of u, y⋀ owner(u)) → give(u,x,z)))))

7. ∀x(crim(x) → ∃y(bkb(y) ⋀ ∃z(hbar(z) ⋀ ∀u of u, z⋀ owner(u)) → give(u,x,y)))))∃x bkb x ⋀ ∀y ∃z hbar z ⋀ of y,z ⋀ owner y → ∀u crim u → give y,u,x

9. ∃x bkb x ⋀ ∀y crim y → ∀z ∃u hbar u ⋀ of z,u ⋀ owner z → give z,y,x

Fall 2020 KAIST CS579: Computational Linguistics 15

Every owner of a hash bar gives every criminal a big kahuna burger.

Page 16: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

∃x hbar x ⋀ ∀y of y,x ⋀ owner y → ∀z crim z → ∃u bkb u → give y,z,u∃x hbar x ⋀ ∀y crim y → ∀z of z,x

⋀ owner z → ∃u bkb u ⋀ give z,y,u∃x hbar x ⋀ ∀y of y,x ⋀ owner y → ∃z bkb z ⋀ ∀u crim u → give y,u,z∃x hbar x ⋀ ∃y bkb y ⋀ ∀z of z,x ⋀ owner z →∀u crim u → give z,u,y∃x bkb x ⋀ ∃y hbar y ⋀ ∀z of z,y ⋀ owner z →∀u crim u → give z,u,x∃x hbar x ⋀ ∀y crim y → ∃z bkb z ⋀ ∀u of u,x ⋀ owner u → give u,y,z

Fall 2020 KAIST CS579: Computational Linguistics 16

Every owner of a hash bar gives every criminal a big kahuna burger.

Page 17: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

∃x hbar x ⋀ ∃y bkb y ⋀ ∀z crim z → ∀u of u,x ⋀ owner u → give u,z,y∃x bkb x ⋀ ∃y hbar y ⋀ ∀z crim z → ∀u of u,y ⋀ owner u → give u,z,x∃x bkb x ⋀ ∀y crim y → ∃z hbar z ⋀ ∀u of u,z ⋀ owner u → give u,y,x

Fall 2020 KAIST CS579: Computational Linguistics 17

Every owner of a hash bar gives every criminal a big kahuna burger.

Page 18: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

The logical equivalence of the readings leads to 11 distinct readings.• {1,2}, {8,9}, {6,7}, {10,11}, {13,14,16,17}• {3}, {4}, {5}, {12}, {15}, {18}

Fall 2020 KAIST CS579: Computational Linguistics 18

Page 19: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

The following diagram shows the logical relationships among the readings:

Fall 2020 KAIST CS579: Computational Linguistics 19

13/14/16/17

12 15 18

10/11 6/7

5

8/9

4 3

1/2

Page 20: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Note that each group has a strongest reading ({13,14,16,17} and {8,9}) and a weakest reading ({5} and {1,2}), but there is no single weakest reading that covers all the possibilities.

In particular, it is hard to see how a pragmatic approach could account for this example.

Fall 2020 KAIST CS579: Computational Linguistics 20

Page 21: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

In addition, the idea of computing the weakest reading and relying on pragmatics for the rest faces difficulties even when the weakest reading exists.• Example• A boxer is loved by every woman.

• ∃y(boxer(y)∧ ∀x(woman(x)→ love(x,y)))• ∀x(woman(x)→ ∃y(boxer(y)∧love(x,y)))

• The stronger reading is what is generated by the direct approach to semantic construction.

Fall 2020 KAIST CS579: Computational Linguistics 21

Page 22: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

MONTAGUE’S APPROACH

CS579: Computational Linguistics 22Fall 2020 KAIST

Page 23: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Scope ambiguities are a genuine problem. Montague introduced a rule of quantification

(called quantifier raising):• Instead of directly combining syntactic entities

with the quantifying noun phrase we are interested in, we are permitted to choose an ‘indexed pronoun’ and to combine the syntactic entity with the indexed pronoun instead.

• These indexed pronouns are ‘placeholders’ for the quantifying noun phrase.

Fall 2020 KAIST CS579: Computational Linguistics 23

Montague’s Approach

Page 24: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

• When this placeholder has moved high enough in the tree to give us the scoping we are interested in, we are permitted to replace it by the quantifying NP of interest.

Fall 2020 KAIST CS579: Computational Linguistics 24

Page 25: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Example: the first stage• Every boxer loves a woman.

Fall 2020 KAIST CS579: Computational Linguistics 25

Every boxer loves her-3 (S)∀x(boxer(x)→ love(x,𝑧 ))

Every boxer (NP)𝜆u. ∀x(boxer(x)→u@x)

loves her-3 (VP)𝜆y. love(y,𝑧 )

loves (TV)𝜆v. 𝜆y. v@𝜆x.love(y,x))

her-3 (NP)𝜆w. w@𝑧

Page 26: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Example: the second stage of substituting the quantifying NP

Fall 2020 KAIST CS579: Computational Linguistics 26

Every boxer loves a woman (S)

a woman (NP)𝜆u. ∃y(woman(y) ∧ u@y

Every boxer loves her-3 (S,3)∀x(boxer(x)→ love(x,𝑧 ))

Page 27: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Lambda abstracting with respect to and -converting:

Fall 2020 KAIST CS579: Computational Linguistics 27

Every boxer loves a woman (S)

a woman (NP)𝜆u. ∃y(woman(y) ∧ u@y

Every boxer loves her-3 (S,3)𝜆𝑧 .∀x(boxer(x)→ love(x,𝑧 )))

∃y(woman(y)∧ ∀x(boxer(x)→ love(x,y)))

Page 28: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Montague’s approach makes use of syntactic and semantic placeholders so that we can place quantifying NPs in parse trees at exactly the level required to obtain the desired scope relations.

A neat piece of ‘lambda programming’ ensures that the semantic information recorded by the placeholder is re-introduced into the semantic representation correctly.

Fall 2020 KAIST CS579: Computational Linguistics 28

Page 29: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

SUMMARY

CS579: Computational Linguistics 29Fall 2020 KAIST

Page 30: Computational Linguisticsnlpcl.kaist.ac.kr/~cs579_2020/slides/579-fall-2020-12.pdf · 2020. 10. 13. · •∀x(woman(x)→∃y(boxer(y)∧love(x,y))) •The stronger reading is what

Scope ambiguities• A sentence with multiple quantifiers may have

genuine scope ambiguities. • We need a solution to generate multiple

readings.

Montague’s approach• Multiple readings can be derived by the use of

placeholders and ‘lambda programming’.

Fall 2020 KAIST CS579: Computational Linguistics 30

Summary