Scope Ambiguities, Montague and Cooper Storage Kilian Evang May - - PowerPoint PPT Presentation

scope ambiguities montague and cooper storage
SMART_READER_LITE
LIVE PREVIEW

Scope Ambiguities, Montague and Cooper Storage Kilian Evang May - - PowerPoint PPT Presentation

Outline Introduction Montagues Solution Coopers Solution Summary Scope Ambiguities, Montague and Cooper Storage Kilian Evang May 21, 2008 Kilian Evang Scope Ambiguities, Montague and Cooper Storage Outline Introduction


slide-1
SLIDE 1

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Scope Ambiguities, Montague and Cooper Storage

Kilian Evang May 21, 2008

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-2
SLIDE 2

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Introduction The Big Picture Scope ambiguties Montague’s Solution Cooper’s Solution Storage Retrieval Implementation Summary

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-3
SLIDE 3

Outline Introduction Montague’s Solution Cooper’s Solution Summary The Big Picture Scope ambiguties

NL Sentence tree with SR first-order formula model truth value synlex syngra semlex semgra “postprocessing”

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-4
SLIDE 4

Outline Introduction Montague’s Solution Cooper’s Solution Summary The Big Picture Scope ambiguties

NL Sentence tree with SR first-order formula model truth value synlex syngra semlex semgra “postprocessing”

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-5
SLIDE 5

Outline Introduction Montague’s Solution Cooper’s Solution Summary The Big Picture Scope ambiguties

Note (1):

Semantic representations that are assigned to lexical items and internal nodes in the tree can be anything – currently it’s lambda expressions.

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-6
SLIDE 6

Outline Introduction Montague’s Solution Cooper’s Solution Summary The Big Picture Scope ambiguties

Note (2):

Is the syntactic grammar a “black box”? Yes and no. Though any semantic rules adhering to the interface can be used with it, the parsing process is guided by syntactic and semantic rules at the same time. Example: s(s(NP_st,VP_st),[coord:no,sem:Sem])--> np(NP_st,[coord:_,num:Num,gap:[],sem:NP]), vp(VP_st,[coord:_,inf:fin,num:Num,gap:[],sem:VP]), {combine(s:Sem,[np:NP,vp:VP])}.

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-7
SLIDE 7

Outline Introduction Montague’s Solution Cooper’s Solution Summary The Big Picture Scope ambiguties

Scope ambiguities

◮ arise in sentences containing more than one quantifying noun

phrase (QNP)

◮ Every criminal hates a man ◮ ∀x(criminal(x) → ∃y(man(y) ∧ hate(x, y))) ◮ ∃y(man(y) ∧ ∀x(criminal(x) → hate(x, y))) ◮ Only the first reading is produced by our system

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-8
SLIDE 8

Outline Introduction Montague’s Solution Cooper’s Solution Summary The Big Picture Scope ambiguties

Scope ambiguities (cont.)

◮ Semantically, the two quantifiers can be applied in either

  • rder.

◮ Problem: In our system, the order is determined by syntax

(example)

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-9
SLIDE 9

Outline Introduction Montague’s Solution Cooper’s Solution Summary The Big Picture Scope ambiguties Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-10
SLIDE 10

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Montague’s Solution

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-11
SLIDE 11

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Montague’s Solution

To generate a reading were some QNP has wide scope,

◮ replace it with a placeholder pronoun

e.g. it-1, semantics: λw.(w@z3)

◮ process the sentence as usual (you get a formula with a free

variable)

◮ lambda abstract over the formula with respect to the free

variable and apply the semantic representation of the original QNP to it

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-12
SLIDE 12

Outline Introduction Montague’s Solution Cooper’s Solution Summary Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-13
SLIDE 13

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Montague’s Solution (cont.)

◮ can be viewed syntactically as moving the QNP to a syntactic

top position, hence a.k.a quantifier raising

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-14
SLIDE 14

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Montague’s Solution (cont.)

Can be applied to multiple QNPs, meaning:

◮ every QNP may be replaced with a placeholder pronoun whose

semantic representation has the form λw.(w@zi) where i is some unique index Note: Need to keep track of which index belongs to which QNP!

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-15
SLIDE 15

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Montague’s Solution (cont.)

Can be applied to multiple QNPs, meaning:

◮ every QNP may be replaced with a placeholder pronoun whose

semantic representation has the form λw.(w@zi) where i is some unique index

◮ the resulting formula for the sentence contains free variables

Note: Need to keep track of which index belongs to which QNP!

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-16
SLIDE 16

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Montague’s Solution (cont.)

Can be applied to multiple QNPs, meaning:

◮ every QNP may be replaced with a placeholder pronoun whose

semantic representation has the form λw.(w@zi) where i is some unique index

◮ the resulting formula for the sentence contains free variables ◮ to get a sentential formula, the free variables are removed one

by one, in any order, by lambda abstracting over the formula with respect to the free variable and apply the semantic representation of the appropriate QNP to it Note: Need to keep track of which index belongs to which QNP!

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-17
SLIDE 17

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Montague’s Solution – How to Implement

◮ additional syntactic rules for introducing placeholder pronouns ◮ additional semantic rules for lambda abstracting over

semantic representations with free variables

◮ additional syntactic rules for combining “raised” QNPs with

sentences with placeholders Mess with syntax to solve a semantic problem?

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-18
SLIDE 18

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Cooper’s Solution

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-19
SLIDE 19

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Cooper’s Solution

◮ don’t apply QNPs during parsing, just collect them ◮ Every criminal hates a man: Somebody hates somebody, and

then there is some information about QNPs.

◮ This is a store:

love(z6, z7), (λu.∀x(criminal(x) → u@x), 6), (λu.∀y(man(y) ∧ u@y), 7))

◮ core representation, freezer

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-20
SLIDE 20

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Representations are Stores

The lambda expressions in the lexicon are just put into sequences, e.g. hates: λz.λu.(z@λv.hate(u, v)) The freezer is initially empty.

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-21
SLIDE 21

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Storage (Cooper)

If the store φ, (β, j), . . . , (β′, k) is a semantic representation for a quantified NP, then the store λu.(u@zi), (φ, i), (β, j), . . . , (β′, k), where i is some unique index, is also a representation for that NP.

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-22
SLIDE 22

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-23
SLIDE 23

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Retrieval (Cooper)

Let σ1 and σ2 be (possibly empty) sequences of binding operators. If the store φ, σ1, (β, i), σ2 is associated with an expression of category S, then the store β@λzi.φ, σ1, σ2 is also associated with this expression.

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-24
SLIDE 24

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Implementation

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-25
SLIDE 25

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Representing structures in Prolog

◮ index binding operators as terms of the form

bo(Quant,Index)

◮ indexes represented as Prolog variables (simpler than in

theory)

◮ stores as lists - example:

walk(X),bo(lam(P,all(Y,imp(boxer(Y),app(P,Y)))),X]

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-26
SLIDE 26

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Changing the machinery

  • 1. semantic lexicon: make store-based semantic representations
  • 2. semantic rules: combining stores, applying storage
  • 3. semantic rules: retrieval

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-27
SLIDE 27

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Semantic Lexicon: Store-Based Semantic Representations

semLex(iv,M):- M = [symbol:Sym, sem:[lam(X,Formula)]], compose(Formula,Sym,[X]). semLexStorage.pl

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-28
SLIDE 28

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Semantic Rules: Combining Stores, Applying Storage

combine(vp:[app(A,B)|S],[av:[A],vp:[B|S]]). combine(np:[app(app(B,A),C)|S3],[np:[A|S1], coord:[B],np:[C|S2]]):- appendLists(S1,S2,S3). combine(np:[lam(P,app(P,X)),bo(app(A,B),X)|S], [det:[A],n:[B|S]]). combine(np:[app(A,B)|S],[det:[A],n:[B|S]]). semRulesCooper.pl

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-29
SLIDE 29

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Semantic Rules: Retrieval

Retrieval takes place at the end, i.e. at the sentence level. combine(s:S,[np:[A|S1],vp:[B|S2]]):- appendLists(S1,S2,S3), sRetrieval([app(A,B)|S3],Retrieved), betaConvert(Retrieved,S). semRulesCooper.pl sRetrieval([S],S). sRetrieval([Sem|Store],S):- selectFromList(bo(Q,X),Store,NewStore), sRetrieval([app(Q,lam(X,Sem))|NewStore],S). cooperStorage.pl

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-30
SLIDE 30

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

The Top-Level Predicate

cooperStorage:- readLine(Sentence), setof(Sem,t([sem:Sem],Sentence,[]),Sems1), filterAlphabeticVariants(Sems1,Sems2), printRepresentations(Sems2). cooperStorage.pl

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-31
SLIDE 31

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Filtering Alphabetic Variants

filterAlphabeticVariants(L1,L2):- selectFromList(X,L1,L3), memberList(Y,L3), alphabeticVariants(X,Y), !, filterAlphabeticVariants(L3,L2). filterAlphabeticVariants(L,L). cooperStorage.pl

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-32
SLIDE 32

Outline Introduction Montague’s Solution Cooper’s Solution Summary Storage Retrieval Implementation

Why is Storage Optional?

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-33
SLIDE 33

Outline Introduction Montague’s Solution Cooper’s Solution Summary

Conclusion

Lambda Montague Cooper Semantic λ-expressions λ-expressions storages representations Additional operations replace QNPs by extend during parsing indexed pronouns storage Addtional operations λ-abstract, retrieve, after parsing apply filter

Kilian Evang Scope Ambiguities, Montague and Cooper Storage

slide-34
SLIDE 34

Outline Introduction Montague’s Solution Cooper’s Solution Summary

References

Patrick Blackburn and Johan Bos. Representation and Inference for Natural Language. A First Course in Computational Semantics, chapter 3.1–3.3. CSLI Publications, 2005.

Kilian Evang Scope Ambiguities, Montague and Cooper Storage