The syntax and compositional semantics of noun phrases

advertisement
CS544: Lecture 3:
Syntax and Compositional
Semantics of the Noun Phrase
March 1, 2011
Jerry R. Hobbs
USC/ISI
Marina del Rey, CA
Noun Phrases
S
NP
Last time we elaborated on VPs.
VP
V
NP
This time we’ll elaborate on NPs.
The Relevant Parts of Speech
Noun (NN, NNS): singular and plural; “The _____ is ...”
Verb (VBN, VBG):
broken, breaking; “_____-ing”
Adjective (JJ, JJR, JJS): good, better, best; “The ____ thing is ...”
Adverb (RB): very; often “____-ly”
Pronoun (PP): I, you, he, she, it, we, they, anyone, ...
Determiner and quantifies (DT): a, the, some, ....
Preposition (IN): of, in, to, during, before, ...
The Structure of the NP
the three tall government buildings in Chicago that I saw
left modifiers
head noun
right modifiers, noun complements
noun group
the three tall gray U.S. government buildings
determiners,
numbers,
quantifiers
adjectives
prenominal
nouns
head noun
In this order.
NP --> DT* JJ* NN* {NN | NNS} ....
You can use this structure to tell what part of speech a word is
Nominal Compounds
One or more nouns can be placed before the head noun;
This says only that some relation occurs between the adjacent nouns or
noun sequences
turpentine jar
pension fund air strike city lights
language origin grammar induction human languages
==> turpentine(x) & nn(x,y) & jar(y)
Bracketing ambiguities:
[Stanford [Research Institute]] vs. [[cancer research] institute]
==> cancer(x)
& research(y) & nn(x,y)
What about:
& institute(z) & nn(y,z)
State pension funds
TreeBank does not tag these -Grammar induction techniques
“too hard to explain to annotators”
Wall Street reform effort
California Public Employees
Retirement System
Noun-like adjectives can appear in this position too.
The Adjective Position
A sequence of adjectives in their absolute, comparative, or superlative forms:
big investors
the new chief executive
a ferocious fire fight
the nation’s biggest public pension fund the Taliban’s ideological agenda
a cursory look
different sentences
unannotated textual input
Present and Past Participles can occur in the adjective position:
supporting air strikes
resulting brawl
stepped-up reform effort
numbed reflection
Note incorporated particle
Present Participles can occur in prenominal noun position:
parking spaces its cratering record
Adverbs can modify the adjectives or participles:
past internally driven geologic activity
JJ
Systematic ambiguity between adjective and prenominal noun:
criminal lawyer
resulting brawl vs. parking spaces
==> criminal(x) & lawyer(x) vs. criminal(x) & nn(x,y) & lawyer(y)
NN
Other Adjective Position
Constructions
Measure phrases:
10-year fund veteran, 12.2% rise, six-foot high fence
Note use of singular
Hyphenated passives with nouns:
Los Angeles-based company
cement-lined ramp
Hyphenated present participle (pre-participle noun is object):
money-losing investments
Hyphenated or unhyphenated adjective-noun:
medium-resolution images
higher level units
finite state languages
Determiners
The order of determiners (quantifiers, numbers) is a very random
phenomenon that defies general principles:
not as few as ten too many other books
All the forest was destroyed
* All a forest was destroyed
the three other books
three other books
the other three books
* other the three books
* other three books
any such book
* such any book
* a such book
such a book
all three books
* both two books
Some Determiner Phrases
Definite, Indefinite, Demonstrative: the, a, that, those
Possessive Pronouns: its, his, our, their, your
Quantifiers: each, all, such,
An Ambiguity: some situations vs some computer program
little (evidence)
Determiner or Adjective? other, our own
Numbers and Related Words: two, 67 billion, several, many, most,
four and a half (glasses)
Complex Determiners: all our, all that, only a few, the two, just one or two,
more than 100, a net 1,000, every last (one), the past 25 (millennia)
Possessive NPs also function as determiners:
the nation’s biggest public pension fund
Saturn’s satellites
Afghanistan’s Uruzgan Valley
Count Nouns vs. Mass Nouns
Count nouns in the singular require a determiner:
I showed him an example.
* I showed him example.
Mass nouns don’t require a determiner in the singular:
I gave him wine.
When mass nouns do have a determiner, it often means a kind rather
than an instance.
I gave him a good wine. (= a good kind of wine)
But there are many many idiomatic exceptions:
For example, by surprise, in front, in mind,
He is president
Structure of NPs: Left Modifiers
all the many tall educated Washington presidential foreign policy advisors
Head noun: advisor’(e0,x)
& Plural’(e1,x,s)
Prenominal nouns: Washington’(e2,w) & nn’(e3,w,x)
Also noun-like Adjs: president’(e3,y) & nn’(e4,y,x)
Adjectives: tall’(e5,x)
Also vbn, vbg: educate’(e6,z,x)
Quantifiers, Numbers: many’(e7,s) (property of the set in plurals)
Determiner: the’(e8,x, ....&e1)
(relation between entity x and description given by rest of NP)
Possessive NPs are determiner phrases: Amy’s => poss’(e10,a,x)
Predeterminer: all’(e9, s, ...&e1)
IN THIS ORDER
(relation between set and description)
Pronouns and Proper Nouns
It should be easy: No internal structure:
NP --> Pronoun (PP)
NP --> ProperNoun (NNP, NNPS)
I, you, he, she, anyone, one, ...
Uruzgun Valley, Enceladus
But proper nouns sometimes function as nouns inside NPs, rather than
full NPs:
The Voyager 2 spacecraft
The Cassini mission
A resurgent Taliban
So maybe it’s better to treat proper nouns as simply nouns:
Noun --> ProperNoun
where in most uses it has no modifiers.
Headless NPs
With some determiners, you don’t need a head noun:
I like those.
Give me some.
You have many.
I don’t have any.
the most
* I like the.
* Give me a.
* I want my.
the fifth-highest
They can also occur with right modifiers:
Those with siblings should stand up for them.
Many in America don’t question authority.
Recognizing Noun Groups with
Finite-State Automata
Noun groups can be recognized fairly reliably with a finite-state automaton:
NG -->
{ (Detp) (Adjs) Ns | Detp[complete] | Pro | N[time] | that N[sing] }
Detp[complete] -->
{ ( { Adv[pre-num] | another | { det | Pro[poss] } ( only (other) ) } ) Number
| Q | Q-er | (the) Q-est | another } | Det[complete,~that] | Pro[poss,complete] }
Detp[incomplete] -->
{ { { Det | Pro[poss] } only | a | Det[incomplete] | Pro[poss,incomplete] } (other)
| Detp[complete] other }
Adjs --> Adj ( ({ “,” | and | “,” and }) Adj )*
Adj --> JJ | VBN | VBG | Number “-” N[measure] (“-” JJ) | N “-” VBN }
Ns --> { ( JJ “-” ) N[sing,~time,~proper] }* N
Logical Form of Noun Groups
Nouns convey three kinds of information:
Singular nouns:
“man”: the entity referred to: man(x)
the property conveyed about that entity: man’(e,x)
Plural nouns:
“men”: the set s referred to
the typical entity in that set: x
A representation for “men”: man’(e,x) & plural(x,s)
s is the set of men
x is the typical man
e is the property of x’s being a man
“tall presidents” ==> tall(x) & president’(e,x) & plural(x,s)
“numerous presidents” ==> numerous(s) & president’(e,x) & plural(x,s)
“former presidents” ==> former(e) & president’(e,x) & plural(x,s)
“the men ran” ==> run(x)
“the men gathered” ==> gather(s)
Logical Form of Noun Groups
Determiners and quantifiers are complicated in their logical form.
Standard approach:
all, every ==> (forall (x) ...)
some, a ==> (exists (x) ...)
the, these, such, .... ==> ?
I would just say which of x, s, and e the word’s meaning depends on.
many men ==> many(s)
the man ==> the(x,e) [x can be identified by the description e]
such men ==> such(x,e)
Possessives:
Pat’s book ==> Pat(x) & Poss(x,y) & book(y)
Headless NPs:
several arrived ==> several(s) & plural(x,s) & arrive(x)
Verbal forms in adjective position:
Note object position
running man ==> run(x) & man(x)
broken window ==> break(y,x) & window(x)
Logical Form of Noun Groups
Verbal forms in adjective position:
Note object position
running man ==> run(x) & man(x)
broken window ==> break(y,x) & window(x)
Possible positions for present participle:
Adjective: supporting strike ==> support(x,y) & strike(x)
Prenominal noun: parking space ==> park’(e,y,z) & nn(e,x) & space(x)
Head noun: a brutal shooting ==> brutal(e) & shoot’(e,x,y)
Three types of adjectives (wrt logical form):
Standard: red car ==> red(x) & car(x)
Opaque: accidental guerilla ==> accidental(e) & guerilla’(e,x)
(The person is not accidental, only the property of being a guerilla)
Noun-like: Saturnian system ==> Saturn(x) & nn(x,y) & system(y)
Attributives
Some attributive adjectives have an implicit comparison set or scale:
A small elephant is bigger than a big mosquito.
That mosquito is big.
mosquito(x) & big(x, s)
The implicit comparison set or scale,
which must be determined
from context
Proper Names
Proper names:
Could treat them as constants:
Springfield is the capital of Illinois. ==> capital(Springfield, Illinois)
But there are many Springfields; we could treat it as a predicate true
of any town named Springfield:
capital(x,y) & Springfield(x) & Illinois(y)
Or we could treat the name as a string, related to the entity by the
predicate name:
capital(x,y) & name(“Springfield”, x) & name(“Illinois”, y)
Indexicals
An indexical or deictic is a word or phrase that requires knowledge of
the situation of utterance for its interpretation.
“I”, “you”, “we”, “here”, “now”, some uses of “this”, “that”, ...
The property of being “I” is being the speaker of the current utterance
Indexicals require an argument for the utterance or the speech situation.
I(x,u): x is the speaker of utterance u
you(x,u): x is the intended hearer of utterance u
we(s,u): s is a set of people containing the speaker of utterance u
here(x,u): x is the place of utterance u
now(t,u): t is the time of utterance u
ago(t,d,u): t is a duration of d before the time of the utterance u
from the quotation marks
Chris said, “I see you now.”
==> say(Chris,u) & content(e,u) & see’(e,x,y) & I(x,u) & you(y,u)
& atTime(e,t) & now(t,u)
Quantifier Ambiguities
Every man loves a woman.
==> ( m)( w) love(m,w)
==> ( w)( m) love(m,w)
i.e., his wife
i.e., Britney Spears
Most politicians in most countries can fool most of the people on most issues
most of the time.
This has 120 possible readings, all distinct.
e.g., different issues for each country, or same issues?
different people for each issue, or same people?
Do we need to generate each separate reading?
Quasi-logical form (Alshawi), typical elements (me)
Specify the predicate-argument relations, remain silent about
quantifier scoping
every(m,e1) & man’(e1,m) & love(m,w) & a(w,e2) & woman’(e2,w)
May later learn: FunctionallyDependent(w,m)
i.e., ( m)( w)
Right Modifiers or Noun Complements
Anything that can be a predicate complement can be a right modifier:
PP: the man in the black coat
Adjective phrase: the people responsible, investors nationwide
Past participle: the ingredients required for the recipe
Present participle: those people seeking reelection
NP (Appositive): Barack Obama, president of the U.S.
Think of these as “reduced relatives”: the man (who is) in the black coat
Also relative clauses:
the birds that I am able to identify ()
And a few other, less common constructions:
Infinitival complements: an attempt to escape
Sentential complements: the belief that America deserves better
Prepositional Phrases
Some examples:
a vital part of CalPERS’ efforts
the Cassini mission to Saturn
a ferocious fire fight with the Taliban
a cautionary tale about fights breaking out
the regularity of chunks over different sentences
PP attachment ambiguities are the biggest source of ambiguity in English:
I [saw [the whales in the bay] with binoculars.
I [saw [the whales] [in [the bay with binoculars]]]. etc.
Usually attachments don’t cross:
Specify the length, in bytes, of the word.
Lots of ambiguities are benign:
I never spent enough time in one place.
build a life for myself away from the job.
bear little resemblance to the usual phrase structure.
Adjective and Participle Phrases
Some examples:
big investors nationwide
the interest generated by Voyager’s visit
A classic ambiguity in computational linguistics:
I saw the Grand Canyon, flying to New York.
Appositive NPs
Proper names can be
the head, or
the appositive.
Some examples:
Anne Stausboll, a 10-year fund veteran,
the Australian counterinsurgency expert David Kilcullen
a term, “accidental guerilla”
chunking – recognizing higher level units of structure
Logical Forms of Right Modifiers
PP: the cat in the hat ==> cat(x) & in(x,y) & hat(y)
Sometimes arguments in relation nouns:
mother of Pat ==> mother(x,y) & Pat(y)
Adjective phrase: the man responsible ==> man(x) & responsible(x,y)
Past participle: the window broken by the boy ==> window(x) & break(y,x) & boy(y)
Present participle: a student studying logic ==> student(x) & study(x,y) & logic(y)
Appositives: NP NP
Barack Obama, president of the U.S.
Use the predicate “be”: Obama(x) & be(x,y) & president(y,z) & US(z)
or identity of variables: Obama(x) & president(x,z) & US(z)
or predicate “Appos”: Obama(x) & Appos(x,y) & president(y,z) & US(z)
“Appos” usually means “be”, but can mean other things
Some Other Right Modifiers
Time NPs:
the summit last March
Not an appositive because
summit =/= last March
More like a PP
==> atTime(s,t)
Infinitival complements:
the desire to fly
==> desire(x,e) & fly’(e,x)
“That” clause:
the belief that the world is round ==> belief(x,e) & round’(e,y) & world(y)
Like an appositive because
belief = that the world is round
Not a relative clause
because nothing’s missing
Relative Clauses
One of the arguments or adjuncts is missing from the relative clause;
the relative clause is a right adjunct on some head noun;
that head noun “supplies” the missing argument or adjunct.
Simplest and most common case: the subject is missing:
fund which ( ) has lost more than a quarter of its value
the most momentous thing that ( ) had happened in their valley
storms that ( ) set the sky close to the ground
images that ( ) confounded planetary scientists
the filler
the gap
Relative Clauses
Relative clauses in which the direct object or some other complement
is missing:
the man I saw ( )
some form of chunked representation of sentences,
which we might interpret ( ) as a phrase structure tree
Relative Clauses
Relative clauses in which an adjunct is missing:
beliefs for which our forbears fought ( )
ways to turn these villagers into allies ( )
one way to capture the regularity of chunks ( )
Why “Long-Distance
Dependencies”?
NP
NP
SBAR
IN
S
NP
VP
S
V
VP
NP
S
V
VP
NP
the book
that
Chris
thinks
Pat
said
Kim
V
NP
read
()
Other Long-Distance
Dependencies
Relative clauses are examples of long-distance dependencies, because
the gap and its filler can be arbitrarily far apart in the parse tree.
the man that Mary believes John asked Susan to tell George to meet with ( )
To get the right logical form, we have to pass information about the gap
up to the filler (or pass information about the filler down to the gap).
Other long-distance dependency constructions:
Questions: Who does Mary believe John asked George to meet with ( )?
Wh-nominalizations: Whoever Mary believes John asked George
to meet with ( ) is here
what was most revealing about the battle was the fact that ...
asked later why they’d done so
the question of how to learn structure from unannotated textual input
Introducing Gaps in Clauses
The elegant way:
NP[gap=x] --> “ ”
The efficient way:
VP[gap=x] --> V[compl1=np]
S[gap=x] --> VP
x is some identifier of the node
that is gapped
Gives us a gap in the object
Gives us a gap in the subject
Passing gaps up to higher nodes:
S[gap=x] --> NP VP[gap=x]
VP[gap=x] --> V NP (that) S[gap=x]
These work for gaps in questions and wh-nominalizations too.
Filling the Gaps
The “wh-phrase” introducing the relative clause can be quite complex:
the man who I met ( )
the man the brother of whose father I met ( )
Rule:
Replace the wh-word with the head noun.
Fill the gap with the whole wh-phrase
Similar rules for questions and wh-nominalizations
Logical Forms for Long-Distance
Dependencies
the man who arrived ==> man(x) & arrive(x)
the man whom Pat met ==> man(x) & Pat(y) & meet(y,x)
the man for whom Pat works ==> man(x) & Pat(y) & work’(e,y) & for(e,x)
the man whose cousin arrived ==> man(x) & cousin(y,x) & arrive(y)
whoever studies will pass ==> study(x) & pass’(e,x) & Future(e)
Download