Title: Linguistics 239E Week 4
1Linguistics 239E Week 4
Ambiguity and Coordination
- Ron Kaplan and Tracy King
2NLP reading group
- Weekly meetings, Fri 145 - 315, Ventura 17
- This week
- John Fry (SRI), Limited-domain speech-to-speech
translation between English and Pashto
- URL http //nlp.stanford.edu/nlp/nlpgroup.html
- Sign up
- majordomo_at_lists.stanford.edu
- subscribe nlp-reading
3Issues from Week 3 Homework
- Notation for feature declaration
- Similar to off-path constraint notation
- Notation available for future extensions
- Generator bug
- If the generator loads, the feature declaration
and all other notation is fine (rules, templates,
lexicon)
- Have updated XLE on elaine
- PREDs cannot unify
- AP -- (AMOD) A.
- AP very orange PRED
'very'/'orange'
- Have in different f-structures (e.g. ADJUNCT)
- Have one of them not have a PRED
- Cant load files from Windows line-break
conventions
4Homework Issues Debugging
- Tree seems ok, but no f-structure
- No tree
- Other features
- print-lex-entry
- print-rule
- There is lots in the XLE documentation
5Short exercise
- /afs/ir.stanford.edu/class/linguist239e/assignment
s
- eng-week4-demo.lfg
- eng-week4-demo-test.lfg
- Conflicting PREDs
- he devoured a very orange orange.
- No c-structure
- she thought!
- NP she
- VP thought
- EXCL !
6Ambiguity
- Syntactically legitimate ambiguity
- Sources
- Alternative c-structure rules
- Disjunctions in f-structure description
- Lexical categories
- XLEs display/computation of ambiguity
- Dealing with ambiguity
- Recognize legitimate ambiguity
- OT marks for preferences (later in the course)
- Stochastic disambiguation
7Syntactic Ambiguity
- Lexical
- part of speech
- subcategorization frames
- Syntactic
- attachments
- coordination
- Implemented system highlights interactions
8Lexical Ambiguity POS
- verb-noun
- I saw her duck.
- I saw NP her duck.
- I saw NP her VP duck.
- noun-adjective
- the N/A mean rule
- that child is A mean.
- he calculated the N mean.
9Morphology and POS ambiguity
- English has impoverished morphology and hence
extreme POS ambiguity
- leaves leave Verb Pres 3sg
- leaf Noun Pl
- leave Noun Pl
- will Noun Sg Aux Verb base
- Even languages with extensive morphology have
ambiguities
10Lexical ambiguity Subcat frames
- Words often have more than one subcategorization
frame
- transitive/intransitive
- I broke it./It broke.
- intransitive/oblique
- He went./He went to London.
- transitive/transitive with infinitive
- I want it./I want it to leave.
11Subcat-Rule interactions
- OBL vs. ADJUNCT with intransitive/oblique
- He went to London.
- PRED go
- SUBJ PRED he
- OBL PRED to
- OBJ PRED London
- PRED go
- SUBJ PRED he
- ADJUNCT PRED to
- OBJ PRED
London
12OBL-ADJUNCT cont.
- Passive by phrase
- It was eaten by the boys.
- PRED eat
- SUBJ PRED it
- OBL-AG PRED by
- OBJ PRED boy
- It was eaten by the window.
- PRED eat
- SUBJ PRED it
- ADJUNCT PRED by
- OBJ PRED boy
13XCOMP-ADJUNCT
- to infinitives can be arguments or adjuncts
(purpose clauses)
- I want her to leave.
- PRED want( OBJ)
- SUBJ PRED I
- OBJ PRED her 1
- XCOMP PRED leave
- SUBJ 1
14XCOMP-ADJUNCT cont.
- I want money to buy that.
- PRED want
- SUBJ PRED I
- OBJ PRED money
- ADJUNCT PRED buy
- SUBJ PRED pro
- OBJ PRED that
- But both sentences get both analyses
- The syntax does not have world knowledge
15OBJ-TH and Noun-Noun compounds
- Many OBJ-TH verbs are also transitive
- I took the cake. I took Mary the cake.
- The grammar needs a rule for noun-noun compounds
- the tractor trailer, a grammar rule
- These can interact
- I took the grammar rules
- I took NP the grammar rules
- I took NP the grammar NP rules
16Syntactic Ambiguities
- Even without lexical ambiguity, there is
legitimate syntactic ambiguity
- PP attachment
- Coordination
- Want to
- constrain these to legitimate cases
- make sure they are processed efficiently
17PP Attachment
- PP adjuncts can attach to VPs and NPs
- Strings of PPs in the VP are ambiguous
- I see the girl with the telescope.
- I see the girl with the telescope.
- I see the girl with the telescope.
- This ambiguity is reflected in
- the c-structure (constituency)
- the f-structure (ADJUNCT attachment)
18PP attachment cont.
- This ambiguity multiplies with more PPs
- I saw the girl with the telescope
- I saw the girl with the telescope in the garden
- I saw the girl with the telescope in the garden
on the lawn
- The syntax has no way to determine the
attachment, even if humans can.
19Ambiguity in coordination
- Vacuous ambiguity of non-branching trees
- this can be avoided
- Legitimate ambiguity
- old men and women
- old N men and women
- NP old men and NP women
- I turned and pushed the cart
- I V turned and pushed the cart
- I VP turned and VP pushed the cart
20Grammar Engineering and ambiguity
- Large-scale grammars will have lexical and
syntactic ambiguities
- With real data they will interact resulting in
many parses
- these parses are legitimate
- they are not intuitive to humans
- XLE provides tools to manage ambiguity
- grammar writer interfaces
- computation
21XLE display
- Four windows
- c-structure (top left)
- f-structure (bottom left)
- packed f-structure (top right)
- choice space (bottom right)
- C-structure and f-structure next buttons
- Other two windows are packed representations of
all the parses
- clicking on a choice will display that choice in
the left windows
22Example
- I see the girl in the garden
- PP attachment ambiguity
- both ADJUNCTS
- difference in ADJUNCT-TYPE
23Packed F-structure and Choice space
24Sorting through the analyses
- Next button on c-structure and then f-structure
windows
- impractical with many choices
- independent vs. interacting ambiguities
- hard to detect spurious ambiguity
- The packed representations show all the analyses
at once
- (in)dependence more visible
- click on choice to view
- spurious ambiguities appear as blank choices
- but legitimate ambiguities may also do so
25Ambiguity Demo
- /afs/ir.stanford.edu/class/linguist239e/assignment
s
- eng-week4-demo.lfg
- eng-week4-demo-test.lfg
- Attachment
- they see the girl with the monkey.
- Subcategorization
- they thought about her.
- Feature
- I see the sheep.
- All three (2 c-structures 8 analyses)
- they thought about the sheep in the park.
26XLE Ambiguity Management
How many sheep? How many fish?
The sheep liked the fish.
- Packed representation is a free choice system
- Encodes all dependencies without loss of
information
- Common items represented, computed once
- Key to practical efficiency
27Dependent choices
but its wrong
It doesnt encode all dependencies, choices are
not free.
Again, packing avoids duplication
bad The girl saw the cat The cat saw th
e girl
bad
Who do you want to succeed? I want to succe
ed John want intrans, succeed trans I want
John to succeed want trans, succeed intrans
28Solution Label dependent choices
- Label each choice with distinct Boolean
variables p, q, etc.
- Record acceptable combinations as a Boolean
expression ?
- Each analysis corresponds to a satisfying
truth-value assignment
- (free choice from the true lines of ?s
truth table)
29Coordination
- Illustrates engineering interation of
- Linguistic phenomena
- Description
- Representation
30Coordination phenomena
- Constitutent Coordinated elements are otherwise
motivated constitutents.
- S A girl saw Mary and S a girl heard
Bill. (Unreduced)
- A girl VP saw Mary and VP heard
Bill. (Reduced)
- A girl V saw and V heard Mary.
- Nonconstituent Coordinated elements look like
fragments
- Bill went to ? Chicago on Wednesday and ? New
York on Thursday.
(What motivates constituency? Transformati
ons? Phonology? Semantics? Coordination?
Well deal only with constituent coordination)
31Descriptive problems
- First cut Conjoin phrases of like category
Assign expanded-form interpretation (?)
- A girl VP saw Mary and VP heard Bill.
interpreted like
(2) S A girl saw Mary and S a girl heard
Bill.
see(girl,Mary) hear(girl, Bill)
But Can coordinate some unlike categories
Bush is NP a Republican and AP proud of it.
Cant coordinate some like categories
Bad John V keeps and V polishes his
car in the garage. OK John V washes and
V polishes his car in the garage.
And semantic entailments differ One girl in (1)
32Theoretical/engineering goal
- Get right syntactic and semantic results
- Without obscuring other generalizations
- One account of passives, relatives,
subcategorizationwhether conjoined or not.
33Coordination in LFG/XLE
- Functional representation
- A coordinate phrase corresponds to an f-structure
set
- (Bresnan/Kaplan/Peterson Kaplan/Maxwell)
- For unreduced, add alternative to other S
expansions
- S -- NP VP S ! CONJ S !
.
34Coordinate reduction
- Also sets, but must distribute external
elements across all set members
- E.g. single SUBJ satisfies conjoined VPs
- A girl VP saw Mary and VP
heard Bill.
- VP -- V NP VP ! CONJ
VP ! .
How does SUBJ distribute without modifying normal
SUBJ equation?
35Distribution
- If denotes an f-structure f, then ( SUBJ)!
Holds iff f has an attribute SUBJ with value !
- What if denotes a set f?
- Without further specification, ( SUBJ)! Is
false.
- Distribution a formal/theoretical extension
- For any (distributive) property P and set s,
P(s) holds iff P(f) holds for all f in s.
- ( SUBJ)! is a (distributive) property, so
- If s f1 f2 and !g, then (s SUBJ)g iff
- (f1 SUBJ)g and (f2 SUBJ)g
36(s SUBJ)g
Note For defining equations, distribution is
equivalent to generalization (Kaplan Maxwell)
distribution is better for existentials
37Further consequences
38Wheres the conjunction?
- Lexcial entry and CONJ ( COORD)and.
39Solution Nondistributives
- Observe Coordination itself has properties
- NUM, PERS, GEND of coordination different from
any/all conjuncts
- sg and sg pl fem masc
masc
- Coordination f-structure is hybrid
- Elements and attributes
- Attributes declared in grammar configuration
- NONDISTRIBUTIVES NUM PERS GEND COORD.
PRED see SUBJ girl
COORD and
40Nondistributives NP example
Mary
I
Mary and I
41(No Transcript)