![Page 1: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/1.jpg)
IntroductiontoSyntaxandContext-FreeGrammars
Slides with contributions from Owen Rambow, Dan Jurafsky and James Martin
![Page 2: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/2.jpg)
Announcements• Thanksforansweringpoll(60votedsofar)• Pollre-openedsopleaseanswerifyouhaven’t
• Majoritylikesinclassinterac@on• SlimmermajorityfeelsPiazzaisusefuldespiteflaws• MajoritywouldpreferanotherplaEorm• Majoritypreferonlineques@onstoverbalones• Majoritywouldprefermorelecturetodiscussion
• Comments• Certainkindsofques@onsaremoresuitable• Somereallylikethepolls(e.g.,Videostudents)
![Page 3: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/3.jpg)
Lookingahead• Today:grammars,ContextFreeandDependency
• Thursday:ContextFreeGrammars
• Tuesday:Dependencyparsing
• Yourhomework:Learningadependencyparser
![Page 4: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/4.jpg)
WhatisSyntax?
• Studyofstructureoflanguage
• Howwordsarearrangedinasentenceandtherela@onshipbetweenthem.
• Goal:relatesurfaceform(percep@on)toseman@cs(meaning)
![Page 5: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/5.jpg)
WhatSyntaxisNot
• Phonology:studyofsoundsystemsandhowsoundscombine
• Morphology:studyofhowwordsareformedfromsmallerparts(morphemes)
• Seman@cs:studyofmeaningoflanguage
![Page 6: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/6.jpg)
Syntaxasaninterface
Morphology Syntax Semantics
Representational Device
![Page 7: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/7.jpg)
Simpli<iedViewofLinguistics
⇔ /waddyasai/ Phonology
Morphology /waddyasai/ ⇔ what did you say What did you say ⇔ what do+past2ndP say
Syntax what do you say ⇔ say Q
you what
obj subj
Semantics say Q
you what
obj subj ⇔ Q[ λx. say(you, x) ]
![Page 8: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/8.jpg)
TheBigPicture Empirical Matter Formalisms
• Data structures • Formalisms (e.g., CFG) • Algorithms • Distributional Models
Maud expects there to be a riot *Teri promised there to be a riot Maud expects the shit to hit the fan *Teri promised the shit to hit the fan
Linguistic Theory
?
?
? ?
![Page 9: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/9.jpg)
WhatAboutChomsky?• Atbirthofformallanguagetheory(compsci)andformallinguis@cs
• Majorcontribu@on:syntaxiscogni'vereality
• Humansabletolearnlanguagesquickly,butnotalllanguages⇒universalgrammarisbiological
• Goalofsyntac@cstudy:finduniversalprinciplesandlanguage-specificparameters
• SpecificChomskyantheorieschangeregularly
• Generalideasadoptedbyalmostallcontemporarysyntac@ctheories(“principles-and-parameters-typetheories”)
![Page 10: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/10.jpg)
TypesofLinguisticTheories• Prescrip've:“prescrip@velinguis@cs”isanoxymoron• Prescrip'vegrammar:howpeopleoughttotalk
• Descrip've:provideaccountofsyntaxofalanguage• Descrip'vegrammar:howpeopledotalk• oXenappropriateforNLPengineeringwork
• Explanatory:provideprinciples-and-parametersstyleaccountofsyntaxof(preferably)severallanguages
![Page 11: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/11.jpg)
TheBigPictureEmpirical Matter
Formalisms
• Data structures • Formalisms (e.g., CFG) • Algorithms • Distributional Models
Maud expects there to be a riot *Teri promised there to be a riot Maud expects the shit to hit the fan *Teri promised the shit to hit the fan
Linguistic Theory
?
?
? or
![Page 12: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/12.jpg)
NeedforSyntax• Grammarcheckers• Ques@onanswering• Informa@onextrac@on• Machinetransla@on
• Givenvariabilityinlanguage,helpstonormalize
![Page 13: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/13.jpg)
keyideasofsyntax• Cons@tuency(we’llspendmostofour@meonthis)• Subcategoriza@on• Gramma@calrela@ons• Movement/long-distancedependency
![Page 14: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/14.jpg)
StructureinStrings• Somewords:theasmallnicebigveryboygirlseeslikes
• Somegoodsentences:• theboylikesagirl• thesmallgirllikesthebiggirl• averysmallniceboyseesaveryniceboy
• Somebadsentences:• *theboythegirl• *smallboylikesnicegirl
• Canwefindsubsequencesofwords(cons'tuents)whichinsomewaybehavealike?
![Page 15: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/15.jpg)
StructureinStringsProposal1
• Somewords:theasmallnicebigveryboygirlseeslikes
• Somegoodsentences:• (the)boy(likesagirl)• (thesmall)girl(likesthebiggirl)• (averysmallnice)boy(seesaveryniceboy)
• Somebadsentences:• *(the)boy(thegirl)• *(small)boy(likesthenicegirl)
![Page 16: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/16.jpg)
StructureinStringsProposal2
• Somewords:theasmallnicebigveryboygirlseeslikes
• Somegoodsentences:• (theboy)likes(agirl)• (thesmallgirl)likes(thebiggirl)• (averysmallniceboy)sees(averyniceboy)
• Somebadsentences:• *(theboy)(thegirl)• *(smallboy)likes(thenicegirl)
![Page 17: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/17.jpg)
• Isproposal1orproposal2be8er?
• Why?
![Page 18: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/18.jpg)
MoreStructureinStrings• Somewords:theasmallnicebigveryboygirlseeslikes
• Somegoodsentences:• ((the)boy)likes((a)girl)• ((the)(small)girl)likes((the)(big)girl)• ((a)((very)small)(nice)boy)sees((a)((very)nice)girl)
• Somebadsentences:• *((the)boy)((the)girl)• *((small)boy)likes((the)(nice)girl)
![Page 19: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/19.jpg)
FromSubstringstoTrees• (((the)boy)likes((a)girl))
boy the
likes girl
a
![Page 20: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/20.jpg)
NodeLabels?• (((the)boy)likes((a)girl))
• Choosecons@tuentssoeachonehasonenon-bracketedword:thehead
• Groupwordsbydistribu@onofcons@tuentstheyhead(part-of-speech,POS):• Noun(N),verb(V),adjec@ve(Adj),adverb(Adv),determiner(Det)
• Categoryofcons@tuent:XP,whereXisPOS• NP,S,AdjP,AdvP,DetP
![Page 21: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/21.jpg)
NodeLabels• (((the/Det)boy/N)likes/V((a/Det)girl/N))
boy
the
likes
girl
a
DetP
NP NP
DetP
S
![Page 22: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/22.jpg)
TypesofNodes• (((the/Det)boy/N)likes/V((a/Det)girl/N))
boy
the
likes
girl
a
DetP
NP NP
DetP
S
Phrase-structure tree
nonterminal symbols = constituents
terminal symbols = words
![Page 23: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/23.jpg)
![Page 24: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/24.jpg)
![Page 25: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/25.jpg)
![Page 26: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/26.jpg)
![Page 27: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/27.jpg)
Constituency(Review)• E.g.,Nounphrases(NPs)
• Areddogonabluetree• Abluedogonaredtree• Somebigdogsandsomeli8ledogs• Adog• We• Bigdogs,li8ledogs,reddogs,bluedogs,yellowdogs,greendogs,blackdogs,andwhitedogs
• Howdoweknowtheseformacons@tuent?
![Page 28: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/28.jpg)
Constituency(II)
• Theycanallappearbeforeaverb:– Somebigdogsandsomelibledogsaregoingaroundincars…
– Bigdogs,libledogs,reddogs,bluedogs,yellowdogs,greendogs,blackdogs,andwhitedogsareallatadogparty!
– Idonot• Butindividualwordscan’talwaysappearbeforeverbs:
– *liblearegoing…– *blueare…– *andare
• Mustbeabletostategeneraliza@onslike:– Nounphrasesoccurbeforeverbs
![Page 29: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/29.jpg)
Constituency(III)
• Preposingandpostposing:• Underatreeisayellowdog.• Ayellowdogisunderatree.
• Butnot:• *Under,isayellowdogatree.• *Underaisayellowdogtree.
• Preposi@onalphrasesnotableforambiguityinabachment
![Page 30: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/30.jpg)
![Page 31: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/31.jpg)
PhraseStructureandDependencyStructure
likes/V
boy/N girl/N
the/Det a/Det boy
the
likes
girl
a
DetP
NP NP
DetP
S
All nodes are labeled with words! Only leaf nodes labeled with words!
![Page 32: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/32.jpg)
PhraseStructureandDependencyStructure(ctd)
likes/V
boy/N girl/N
the/Det a/Det boy
the
likes
girl
a
DetP
NP NP
DetP
S
Representationally equivalent if each nonterminal node has one lexical daughter (its head)
![Page 33: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/33.jpg)
TypesofDependency
likes/V
boy/N girl/N
a/Det small/Adj the/Det
very/Adv
sometimes/Adv Obj Subj
Adj(unct)
Fw Fw
Adj
Adj
![Page 34: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/34.jpg)
GrammaticalRelations• Typesofrela@onsbetweenwords
• Arguments:subject,object,indirectobject,preposi@onalobject
• Adjuncts:temporal,loca@ve,causal,manner,…
• Func@onWords
![Page 35: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/35.jpg)
Subcategorization• Listofargumentsofaword(typically,averb),withfeaturesaboutrealiza@on(POS,perhapscase,verbformetc)
• IncanonicalorderSubject-Object-IndObj• Example:
• like:N-N,N-V(to-inf)• see:N,N-N,N-N-V(inf)
• Note:J&Mtalkaboutsubcategoriza@ononlywithinVP
![Page 36: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/36.jpg)
Subcategorizationexamples• Give
• Pretend
• Tell
• Bet
![Page 37: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/37.jpg)
WhatAbouttheVP?
boy
the
likes
girl
a
DetP
NP NP
DetP
S
boy
the
likes DetP
NP
girl
a
NP
DetP
S
VP
![Page 38: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/38.jpg)
WhatAbouttheVP?• ExistenceofVPisalinguis@c(i.e.,empirical)claim,notamethodologicalclaim
• Seman@cevidence???• Syntac@cevidence
• VP-fron@ng(andquicklycleanthecarpethedid!)• VP-ellipsis(Hecleanedthecarpetsquickly,andsodidshe)• CanhaveadjunctsbeforeandaXerVP,butnotinVP(HeoHeneatsbeans,*heeatsoHenbeans)
• Note:VPcannotberepresentedinadependencyrepresenta@on
![Page 39: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/39.jpg)
Context-FreeGrammars
• Definedinformallanguagetheory(compsci)
• Terminals,nonterminals,startsymbol,rules
• String-rewri@ngsystem
• Startwithstartsymbol,rewriteusingrules,donewhenonlyterminalsleX
• NOTALINGUISTICTHEORY,justaformaldevice
![Page 40: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/40.jpg)
CFG:Example• ManypossibleCFGsforEnglish,hereisanexample(fragment):• S→NPVP• VP→VNP• NP→DetPN|AdjPNP• AdjP→Adj|AdvAdjP• N→boy|girl• V→sees|likes• Adj→big|small• Adv→very• DetP→a|the
the very small boy likes a girl
![Page 41: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/41.jpg)
DerivationsinaCFG
S→NPVPVP→VNPNP→DetPN|AdjPNPAdjP→Adj|AdvAdjPN→boy|girlV→sees|likesAdj→big|smallAdv→veryDetP→a|the
S
S
![Page 42: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/42.jpg)
DerivationsinaCFG
S→NPVPVP→VNPNP→DetPN|AdjPNPAdjP→Adj|AdvAdjPN→boy|girlV→sees|likesAdj→big|smallAdv→veryDetP→a|the
NP VP
NP
S
VP
![Page 43: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/43.jpg)
DerivationsinaCFG
S→NPVPVP→VNPNP→DetPN|AdjPNPAdjP→Adj|AdvAdjPN→boy|girlV→sees|likesAdj→big|smallAdv→veryDetP→a|the
DetP N VP
DetP
NP
S
VP
N
![Page 44: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/44.jpg)
DerivationsinaCFG
S→NPVPVP→VNPNP→DetPN|AdjPNPAdjP→Adj|AdvAdjPN→boy|girlV→sees|likesAdj→big|smallAdv→veryDetP→a|the
the boy VP
boy the
DetP
NP
S
VP
N
![Page 45: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/45.jpg)
DerivationsinaCFG
S→NPVPVP→VNPNP→DetPN|AdjPNPAdjP→Adj|AdvAdjPN→boy|girlV→sees|likesAdj→big|smallAdv→veryDetP→a|the
the boy likes NP
boy the likes
DetP
NP
NP
S
VP
N V
![Page 46: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/46.jpg)
DerivationsinaCFG
S→NPVPVP→VNPNP→DetPN|AdjPNPAdjP→Adj|AdvAdjPN→boy|girlV→sees|likesAdj→big|smallAdv→veryDetP→a|the
the boy likes a girl
boy the likes
DetP
NP
girl a
NP
DetP
S
VP
N
N
V
![Page 47: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/47.jpg)
DerivationsinaCFG;OrderofDerivationIrrelevant
S→NPVPVP→VNPNP→DetPN|AdjPNPAdjP→Adj|AdvAdjPN→boy|girlV→sees|likesAdj→big|smallAdv→veryDetP→a|the
NP likes DetP girl
likes
NP
girl
NP
DetP
S
VP
N
V
![Page 48: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/48.jpg)
DerivationsofCFGs• Stringrewri@ngsystem:wederiveastring(=derivedstructure)
• Butderiva@onhistoryrepresentedbyphrase-structuretree(=deriva'onstructure)!
boy the likes
DetP NP
girl a
NP
DetP
S
VP
N
N
V the boy likes a girl
![Page 49: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/49.jpg)
FormalDe<initionofaCFGG=(V,T,P,S)
• V:finitesetofnonterminalsymbols
• T:finitesetofterminalsymbols,VandTaredisjoint
• P:finitesetofproduc@onsoftheformA→α,A∈Vandα∈(T∪V)*
• S∈V:startsymbol
![Page 50: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/50.jpg)
Context?• Theno@onofcontextinCFGshasnothingtodowiththeordinarymeaningofthewordcontextinlanguage
• Allitreallymeansisthatthenon-terminalontheleX-handsideofaruleisoutthereallbyitself(freeofcontext)A->BCMeansthatIcanrewriteanAasaBfollowedbyaCregardlessofthecontextinwhichAisfound
![Page 51: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/51.jpg)
KeyConstituents(English)• Sentences• Nounphrases• Verbphrases• Preposi@onalphrases
![Page 52: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/52.jpg)
![Page 53: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/53.jpg)
![Page 54: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/54.jpg)
![Page 55: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/55.jpg)
Sentence-Types
• Declara@ves:Idonot.S->NPVP
• Impera@ves:Godogs!Go!S->VP
• Yes-NoQues@ons:Doyoulikemyhat?S->AuxNPVP
• WHQues@ons:Whataretheygoingtodo?S->WHAuxNPVP
![Page 56: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/56.jpg)
NPs• NP->Pronoun
• Icame,yousawit,theyconquered• NP->Proper-Noun
• NewJerseyiswestofNewYorkCity• LeeBollingeristhepresidentofColumbia
• NP->DetNoun• Thepresident
• NP->Nominal• Nominal->NounNoun
• AmorningflighttoDenver
![Page 57: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/57.jpg)
NPs• NP->Pronoun
• Icame,yousawit,theyconquered• NP->Proper-Noun
• NewJerseyiswestofNewYorkCity• LeeBollingeristhepresidentofColumbia
• NP->DetNoun• Thepresident
• NP->Nominal• Nominal->NounNoun
• AmorningflighttoDenver
What other types of nominals do you find in English? Give examples.
![Page 58: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/58.jpg)
PPs• PP->Preposi@onNP
• Overthehouse• Underthehouse• Tothetree• Atplay• Atapartyonaboatatnight
![Page 59: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/59.jpg)
![Page 60: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/60.jpg)
![Page 61: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/61.jpg)
It is hot out here in the sun. It is not hot here under the house. What is “here”?
![Page 62: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/62.jpg)
Recursion• We’llhavetodealwithrulessuchasthefollowingwherethenon-terminalontheleXalsoappearssomewhereontheright(directly)NP->NPPP [[Theflight][toBoston]]VP->VPPP [[departedMiami][atnoon]]
(indirectly)NP->NPSrelSrel->NPVP[[thedog][[thecat]likes]]
![Page 63: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/63.jpg)
Recursion
• Ofcourse,thisiswhatmakessyntaxinteres@ngThedogbitesThedogthemousebitbitesThedogthemousethecatatebitbites
![Page 64: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/64.jpg)
Recursion
[[Flights][fromDenver]][[[Flights][fromDenver]][toMiami]][[[[Flights][fromDenver]][toMiami]][inFebruary]][[[[[Flights][fromDenver]][toMiami]][inFebruary]][onaFriday]]
Etc.NP->NPPP
![Page 65: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/65.jpg)
ImplicationsofRecursionandContext-Freeness• VP->VNP• (I)hate
flightsfromDenverflightsfromDenvertoMiamiflightsfromDenvertoMiamiinFebruaryflightsfromDenvertoMiamiinFebruaryonaFridayflightsfromDenvertoMiamiinFebruaryonaFridayunder$300flightsfromDenvertoMiamiinFebruaryonaFridayunder$300withlunch
• Thisiswhycontext-freegrammarsareappealing!IfyouhavearulelikeVP->VNP• ItonlycaresthatthethingaXertheverbisanNPItdoesn’thavetoknowabouttheinternalaffairsofthatNP
![Page 66: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/66.jpg)
GrammarEquivalence• Canhavedifferentgrammarsthatgeneratesamesetofstrings(weakequivalence)• Grammar1:NP→DetPNandDetP→a|the• Grammar2:NP→aN|NP→theN
• Canhavedifferentgrammarsthathavesamesetofderiva@ontrees(strongequivalence)• WithCFGs,possibleonlywithuselessrules• Grammar2:NP→aN|NP→theN• Grammar3:NP→aN|NP→theN,DetP→many
• Strongequivalenceimpliesweakequivalence
![Page 67: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/67.jpg)
NormalForms&c• Thereareweaklyequivalentnormalforms(ChomskyNormalForm,GreibachNormalForm)
• Therearewaystoeliminateuselessproduc@onsandsoon
![Page 68: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/68.jpg)
ChomskyNormalFormACFGisinChomskyNormalForm(CNF)ifallproduc@onsareofoneoftwoforms:
• A→BCwithA,B,Cnonterminals• A→a,withAanonterminalandaaterminal
EveryCFGhasaweaklyequivalentCFGinCNF
![Page 69: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/69.jpg)
“GenerativeGrammar”• Formallanguages:formaldevicetogenerateasetofstrings(suchasaCFG)
• Linguis@cs(Chomskyanlinguis@csinpar@cular):approachinwhichalinguis@ctheoryenumeratesallpossiblestrings/structuresinalanguage(=competence)
• Chomskyantheoriesdonotreallyuseformaldevices–theyuseCFG+informallydefinedtransforma@ons
![Page 70: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/70.jpg)
NobodyUsesSimpleCFGs(ExceptIntroNLPCourses)
• Allmajorsyntac@ctheories(Chomsky,LFG,HPSG,TAG-basedtheories)representbothphrasestructureanddependency,inonewayoranother
• Allsuccessfulparserscurrentlyusesta@s@csaboutphrasestructureandaboutdependency
• Derivedependencythrough“headpercola@on”:foreachrule,saywhichdaughterishead
![Page 71: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/71.jpg)
MassiveAmbiguityofSyntax• Forastandardsentence,andagrammarwithwidecoverage,thereare1000sofderiva@ons!
• Example:• Thelargeportraitpaintertoldthedelega@onthathesentmoneyordersinaleberonWednesday
![Page 72: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/72.jpg)
PennTreebank(PTB)• Syntac@callyannotatedcorpusofnewspapertexts(phrasestructure)
• Thenewspapertextsarenaturallyoccurringdata,butthePTBisnot!
• PTBannota@onrepresentsapar@cularlinguis@ctheory(butafairly“vanilla”one)
• Par@culari@es• Veryindirectrepresenta@onofgramma@calrela@ons(needforheadpercola@ontables)
• CompletelyflatstructureinNP(brownbaglunch,pink-and-yellowchildseat)
• HasflatSs,flatVPs
![Page 73: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/73.jpg)
ExamplefromPTB((S(NP-SBJIt)(VP's(NP-PRD(NP(NPthelatestinvestmentcraze) (VPsweeping (NPWallStreet))) : (NP(NParash) (PPof (NP(NPnewclosed-endcountryfunds) , (NP(NPthose (ADJPpubliclytraded) porEolios) (SBAR(WHNP-37that) (S(NP-SBJ*T*-37) (VPinvest (PP-CLRin (NP(NPstocks) (PPof (NPasingleforeigncountry)))))))))))
![Page 74: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/74.jpg)
Typesofsyntacticconstructions• Isthisthesameconstruc@on?
• Anelfdecidedtocleanthekitchen• AnelfseemedtocleanthekitchenAnelfcleanedthekitchen
• Isthisthesameconstruc@on?• Anelfdecidedtobeinthekitchen• AnelfseemedtobeinthekitchenAnelfwasinthekitchen
![Page 75: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/75.jpg)
Typesofsyntacticconstructions(ctd)
• Isthisthesameconstruc@on?Thereisanelfinthekitchen• Theredecidedtobeanelfinthekitchen• Thereseemedtobeanelfinthekitchen
• Isthisthesameconstruc@on?Itisraining/itrains• Itdecidedtorain/beraining• Itseemedtorain/beraining
![Page 76: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/76.jpg)
Typesofsyntacticconstructions(ctd)
• Isthisthesameconstruc@on?• Anelfdecidedthathewouldcleanthekitchen• AnelfseemedthathewouldcleanthekitchenAnelfcleanedthekitchen
![Page 77: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/77.jpg)
Typesofsyntacticconstructions(ctd)Conclusion:• toseem:whateverisembeddedsurfacesubjectcanappearinupperclause
• todecide:onlyfullnounsthatarereferen@alcanappearinupperclause
• Twotypesofverbs
![Page 78: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/78.jpg)
Typesofsyntacticconstructions:Analysis
an elf
S
NP VP
V
to decide
S
NP VP
V
to be
PP
in the kitchen
S
VP
V
to seem
S
NP VP
V
to be
PP
in the kitchen
an elf an elf
![Page 79: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/79.jpg)
Typesofsyntacticconstructions:Analysis
an elf
S
NP VP
V
decided
S
NP
PRO
VP
V
to be
PP
in the kitchen
S
VP
V
seemed
S
NP VP
V
to be
PP
in the kitchen
an elf
![Page 80: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/80.jpg)
Typesofsyntacticconstructions:Analysis
an elf
S
NP VP
V
decided
S
NP
PRO
VP
V
to be
PP
in the kitchen
S
VP
V
seemed
S
NP VP
V
to be
PP
in the kitchen
an elf
![Page 81: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/81.jpg)
Typesofsyntacticconstructions:Analysis
an elf
S
NP VP
V
decided
S
NP
PRO
VP
V
to be
PP
in the kitchen
S
NPi VP
V
seemed
S
NP VP
V
to be
PP
in the kitchen
an elf
ti
![Page 82: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/82.jpg)
Typesofsyntacticconstructions:Analysis
toseem:lowersurfacesubjectraisestoupperclause;raisingverbseems(theretobeanelfinthekitchen)thereseems(ttobeanelfinthekitchen)itseems(thereisanelfinthekitchen)
![Page 83: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/83.jpg)
Typesofsyntacticconstructions:Analysis(ctd)
• todecide:subjectisinupperclauseandco-referswithanemptysubjectinlowerclause;controlverb
anelfdecided(anelftocleanthekitchen)anelfdecided(PROtocleanthekitchen)anelfdecided(hecleans/shouldcleanthekitchen)*itdecided(anelfcleans/shouldcleanthekitchen)
![Page 84: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/84.jpg)
LessonsLearnedfromtheRaising/ControlIssue• Usedistribu@onofdatatogroupphenomenaintoclasses
• Usedifferentunderlyingstructureasbasisforexplana@ons
• Allowthingsto“move”aroundfromunderlyingstructure->transforma'onalgrammar
• Checkwhetherexplana@onyougivemakespredic@ons
![Page 85: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/85.jpg)
ExamplesfromPTB(S(NP-SBJ-1Theropes)(VPseem(S(NP-SBJ*-1)(VPto(VPmake(NPmuchsound))))))(S(NP-SBJ-1Theancientchurchvicar)(VPrefuses(S(NP-SBJ*-1)(VPto(VPtalk(PP-CLRabout (NPit)))))
![Page 86: Introduction to Syntax and Context-Free Grammarskathy/NLP/2017/ClassSlides/Class7-Syntax/... · Introduction to Syntax and Context-Free Grammars Slides with contributions from Owen](https://reader034.vdocument.in/reader034/viewer/2022051011/5b7a8bf17f8b9ae1328d0775/html5/thumbnails/86.jpg)
TheBigPicture Empirical Matter
Formalisms
• Data structures • Formalisms • Algorithms • Distributional Models
Maud expects there to be a riot *Teri promised there to be a riot Maud expects the shit to hit the fan *Teri promised the shit to hit the
or
Linguistic Theory Content: Relate morphology to semantics • Surface representation (eg, ps) • Deep representation (eg, dep) • Correspondence
uses
descriptive theory is
about
explanatory theory is about
predicts