Beruflich Dokumente
Kultur Dokumente
Robert C. Berwick
The Menu Bar
• Administrivia:
• Schedule alert: Lab 3 out; due next Weds.
• Lab time today, tomorrow
• Please read notes3.pdf!!
englishgrammar.pdf (on web)
• Agenda:
• Building grammars – basics to complex
• Limits of context-free grammars: the
trouble with tribbles
• Foundation for the laboratory
6.863J/9.611J Lecture 9 Sp03
Grammars for natural languages
S→NP VP
VP→V NP Can’t we get a computer to do this?
NP→Det N
NP→ N*
6.863J/9.611J Lecture 9 Sp03
Key elements – part 1
function args
the stock
sold
at a bargain price
green with envy
the over-priced stock
• Subtlety to this
• Believe, know, think, wonder,…
• ? I believe why John likes ice-cream
• I know why John likes ice-cream
• I believe that John likes ice-cream
• I believe (that) John likes ice-cream
XP [V +proposition]
know [V +proposition]
6.863J/9.611J Lecture 9 Sp03
Heads of phrases
V +proposition
know [V +proposition]
NP VP
NP VP
V Sbar
believe
V Sbar
believe
Comp S
that
J. likes ice-cream
6.863J/9.611J Lecture 9 Sp03
Sbar
VP
V Sbar
believe
Comp S
J. likes ice-cream
6.863J/9.611J Lecture 9 Sp03
In fact, true for all sentences…
Sbar
John likes ice-cream
Comp S
Why?
ε
J. likes ice-cream
• (U do it..)
• What about:
Clinton admires honesty/Honesty admires
Clinton
How do we encode these in a CFG?
Should we encode them?
• Colorless green ideas sleep furiously
• Revolutionary new ideas appear
infrequently
6.863J/9.611J Lecture 9 Sp03
Features
Verb NP
num=sing
POSSN VAR
GENDER
POS CASE PERSON
NEG
–Czech: AGFS3----1A----
POSSG DCOMP VOICE
SUBPOS
NUMBER TENSE
He has
Sorry, that’s just how language is …
You know too much to write it down easily! gone
Other sentence types
• Questions:
• Will John eat ice-cream?
• Did John eat ice-cream?
• How do we encode this?
• Object gaps:
• the sandwich that the president kissed e
• I wonder what Sally said the president kissed e
Sally consumed the pickle with e
• What else has Sally consumed e with the pickle
[how could you tell the difference?]
Subject gaps:
the sandwich that e kissed the president
I wonder what Sally said e kissed the president
What else has
6.863J/9.611J Lecture 9 Sp03
Gaps
what
VP
Did NP
filler
‘gap’ or
V NP empty element
ε
6.863J/9.611J Lecture 9 Sp03
Crisper representation:
Sbar
Comp S
what
‘filler’ Auxv NP VP
did J
‘gap’ or
eat NP empty element
ε
6.863J/9.611J Lecture 9 Sp03
Fillers can be arbitrarily far from
gaps they match with…
• What did John say that Mary thought that
the cat ate___?
Feature 1 Value
1
Feature 2 Value
2
... ....
Feature n Value
n
• Number-person features
Num SG
Pers 3
• Number-person-category features
Cat NP
(3sgNP) Num SG
Pers 3
Cat S
Agr 1 Num SG
Pers 3
Head
Subj
Agr 1
• Goal:
• Use feature structures to provide richer
representation
• Block entry into chart of ill-formed constituents
• Changes needed to Earley
• Add feature structures to grammar rules, e.g.
S Æ NP VP
<NP HEAD AGR> = <VP HEAD AGR>
<S HEAD> = <VP HEAD>
• Add field to states containing DAG representing
feature structure corresponding to state of parse,
e.g.
S Æ • NP VP, [0,0], [], DAG