Date post: | 20-Dec-2015 |
Category: |
Documents |
View: | 214 times |
Download: | 0 times |
Announcements
• a9 out sometime Thursday, due Wednesday April 22nd, 11:59pm
• How’s your progress on the BBS articles?
Schedule
• Last Week
– SHRUTI
– Formal Grammar and Parsing
• This Week
– Construction Grammar, ECG
– Psychological model of sentence processing
• Next Week
– Language learning
– Learning ECG
Quiz
1. What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Pat ate the kiwi”?
2. How well can CFGs represent English? What are some mechanisms for improvement?
3. What are constructions?
4. What is the difference between subcasing and evoking another schema or construction?
Quiz
1. What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Harry likes the cafe”?
2. How well can CFGs represent English? What are some mechanisms for improvement?
3. What are constructions?
4. What is the difference between subcasing and evoking another schema or construction?
Grammar
• A grammar is a set of rules defining a formal language
• an example is right-regular grammar
• a more common example is Context-Free Grammar
β : single non-terminal
• β : any combination of terminals and non-terminals
S NP VPNP Det Noun | ProperNounVP Verb NP | Verb PPPP Preposition NP
Noun kiwi | orange | storeProperNoun Pat | IDet a | an | theVerb ate | went | shopPreposition to | at
Top Down Parsing: Pat ate the kiwi
• start from S and apply all applicable rules
• forward search (use your favorite search algorithm…)
S NP VPNP Det Noun | ProperNounVP Verb NP | Verb PPPP Preposition NPNoun kiwi | orange | storeProperNoun Pat | IDet a | an | theVerb ate | went | shopPreposition to | at
S
NP VP
Det Noun VP ProperNoun VP
a Noun VP an Noun VP the Noun VP
a kiwi VP a orange VP a store VP …succeed when you encounter
Pat ate the kiwi in a state without any non-terminals
(DFS)
Bottom Up Parsing: Pat ate the kiwi
• start from the sentence and try to match non-teriminals to it
• backward search (use your favorite search algorithm…)
S NP VPNP Det Noun | ProperNounVP Verb NP | Verb PPPP Preposition NPNoun kiwi | orange | storeProperNoun Pat | IDet a | an | theVerb ate | went | shopPreposition to | at
succeed when you encounter S in a state by itself
Pat ate the kiwi
ProperNoun ate the kiwi
NP Verb the kiwi
NP Verb Det kiwi
NP Verb Det Noun
NP Verb NP
NP VP
NP ate the kiwi
(DFS)
S
Quiz
1. What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Harry likes the cafe”?
2. How well can CFGs represent English? What are some mechanisms for improvement?
3. What are constructions?
4. What is the difference between subcasing and evoking another schema or construction?
Notice the ungrammatical and/or odd sentences that we can generate?
• * Pat ate a orange
• * Pat shop at the store
• * Pat went a store
• ? Pat ate a store
• ? The kiwi went to an orange
S NP VPNP Det Noun | ProperNounVP Verb NP | Verb PPPP Preposition NP
Noun kiwi | orange | storeProperNoun Pat | IDet a | an | theVerb ate | went | shopPreposition to | at
need to capture agreement, subcategorization, etc
you could make many versions of verbs, nouns, dets
cumbersome
Unification Grammar• Basic idea: capture these agreement features for each non-
terminal in feature structures
• Enforce constraints on these features using unification rules
Patnumber : SGperson : 3rd agreement
Inumber : SGperson : 1stagreement
Went
agreementShop
agreementnumber : person : 1st
VP Verb NP VP.agreement ↔ Verb.agreement
S NP VPNP.agreement ↔ VP.agreement
Quiz
1. What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Harry likes the cafe”?
2. How well can CFGs represent English? What are some mechanisms for improvement?
3. What are constructions?
4. What is the difference between subcasing and evoking another schema or construction?
Embodied constructions
construction HARRYform : /hEriy/meaning : Harry
construction CAFEform : /khaefej/meaning : Cafe
Harry
CAFEcafe
ECG NotationForm Meaning
Constructions have form and meaning poles that are subject to type constraints.
Quiz
1. What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Harry likes the cafe”?
2. How well can CFGs represent English? What are some mechanisms for improvement?
3. What are constructions?
4. What is the difference between subcasing and evoking another schema or construction?
A schema hierarchy of objects (Nomi)
schema Referentsubcase of Entityroles
categorydistributionboundednessnumbergenderaccessibilityresolved-ref
schema Referentsubcase of Entityroles
categorydistributionboundednessnumbergenderaccessibilityresolved-ref
schema Object subcase of Entity
schema Object subcase of Entity
schema Entityschema Entity
schema Placeschema Place
schema Physical-Objectsubcase of Object, Place
schema Physical-Objectsubcase of Object, Place
schema Animate subcase of Physical-
Objectroles
animacyconstraints
animacy ← true
schema Animate subcase of Physical-
Objectroles
animacyconstraints
animacy ← true
schema Humansubcase of
Animateroles
sex
schema Humansubcase of
Animateroles
sexschema Nomi
subcase of Humansex ← female
schema Nomisubcase of Human
sex ← female
schema Manipulable-Object
subcase of Physical-Object
schema Manipulable-Object
subcase of Physical-Object
schema Toysubcase of
Manipulable-Object
schema Toysubcase of
Manipulable-Object
schema Ball subcase of Toy
schema Ball subcase of Toy
slot filler
schema Cup subcase of Manipulable-Object
schema Cup subcase of Manipulable-Object
The schemas we just defined
Entity Place
Object
Physical-Object
Referent
AnimateManipulable-Object
HumanToy
Nomi Mother FatherBook
Cup
Ball Block
Food
Doll Bed
Cake Juice
A schema hierarchy of actions (Nomi)
schema DirectedActionsubcase of Actionroles
patient : Entity
schema DirectedActionsubcase of Actionroles
patient : Entity
schema Actionroles
agent : Entity
schema Actionroles
agent : Entity
schema Move subcase of Actionroles
mover : Entitydirection : Place
schema Move subcase of Actionroles
mover : Entitydirection : Place
schema CauseMove subcase of DirectedAction,
Moveroles
causer : Humanmover : Physical-Objectmotion : Move
constraints motion.mover ↔ movermotion.agent ↔ causermotion.direction ↔ directionagent ↔ causerpatient ↔ mover
schema CauseMove subcase of DirectedAction,
Moveroles
causer : Humanmover : Physical-Objectmotion : Move
constraints motion.mover ↔ movermotion.agent ↔ causermotion.direction ↔ directionagent ↔ causerpatient ↔ mover
identification constraint
type constraint
Constructions, finally (Nomi)construction Ref-Expr
form : Schematic-Formmeaning : Referent
construction Ref-Exprform : Schematic-Formmeaning : Referent
construction Nomi-Cnlevel 0subcase of Ref-Exprform : Word
self.f.orth ← "Nomi"meaning
evokes Nomi as nself.m.category ↔ nself.m.resolved-ref ↔ n
construction Nomi-Cnlevel 0subcase of Ref-Exprform : Word
self.f.orth ← "Nomi"meaning
evokes Nomi as nself.m.category ↔ nself.m.resolved-ref ↔ n
local name
fancy way of sayingthat the category ofthe referent is Nomi
construction Cup-Cnlevel 0subcase of Ref-Exprform : Word
self.f.orth ← “cup"meaning
evokes Cup as nself.m.category ↔ nself.m.resolved-ref ↔ n
construction Cup-Cnlevel 0subcase of Ref-Exprform : Word
self.f.orth ← “cup"meaning
evokes Cup as nself.m.category ↔ nself.m.resolved-ref ↔ n
Constructions, finally (Nomi)
construction Cause-Motion-Verb
subcase of Motion-Verbmeaning : CauseMove
construction Cause-Motion-Verb
subcase of Motion-Verbmeaning : CauseMove
construction Motion-Verbmeaning : Move
construction Motion-Verbmeaning : Move
construction Get-Cnlevel 0subcase of Cause-Motion-
Verbform : Word
self.f.orth ← "get"
construction Get-Cnlevel 0subcase of Cause-Motion-
Verbform : Word
self.f.orth ← "get"lexical construction
Constructions, finally (Nomi)
construction Transitive-Cnlevel 2constructional
constituentsagt : Ref-Exprv : Cause-Motion-Verbobj : Ref-Expr
formagt.f before v.fv.f before obj.f
meaningv.m.agent ↔ agt.m.resolved-
refv.m.patient ↔ obj.m.resolved-
ref
construction Transitive-Cnlevel 2constructional
constituentsagt : Ref-Exprv : Cause-Motion-Verbobj : Ref-Expr
formagt.f before v.fv.f before obj.f
meaningv.m.agent ↔ agt.m.resolved-
refv.m.patient ↔ obj.m.resolved-
ref
smaller constructions that it takes
ordering constraints on the constituents