ling/c sc/psyc 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • english...

17
LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1

Upload: others

Post on 30-Oct-2019

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

LING/CSC/PSYC438/538

Lecture20SandiwayFong

1

Page 2: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

538PresentaAons

Name Column1Last FirstRomeroDiaz DamianMuriel JorgePike AmmonJohnsonFarahnak FaridehLee PuayLengPatriciaBrown RachelSullivan TrevorXu Dongfang

•  SofarI'vereceivedresponsesfromthefollowingpeople:

Page 3: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

LastTimeCoursewebpage:g19.pl !Johnkickedtheball

themenkickedtheballamankickedtheball

Page 4: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

PhraseStructureGrammars

•  BerkeleyParser:Johnkickedtheball

Page 5: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

PhraseStructureGrammars

•  BerkeleyParser:themenkickedtheball

Page 6: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

PhraseStructureGrammars

•  BerkeleyParser:amankickedtheball

Page 7: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

g19.pl

rejects

Page 8: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

PhraseStructureGrammars

•  BerkeleyParser:amenkickedtheball

Page 9: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

ExtraArguments:Agreement

•  Englishexhibitssubject-verbagreement

•  Examples:–  Johnkickedtheball–  Themenkickedtheball–  Johnkickstheballs–  Themen*kicks/kicktheball

Constraint:1.  -sformoftheverbiscompaAblewith3rdpersonsingular

onlyforthesubjectNP2.  uninflectedformisnotcompaAblewith3rdpersonsingular

forthesubjectNP

Page 10: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

SubjectVerbAgreement•  WeneedfeaturepercolaAon:

eats*eat

Form Ending Commenteat uninflected not3rdperson

singulareats -s 3rdpersonsingularate -ed pasteaten -en pastparAcipleea;ng -ing gerund

Person !Number !

Ending !

SubjectandVPcometogetheratthisrule

Person !Number ! Ending !

POStags

Page 11: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

SubjectVerbAgreement•  ImplementaAon:usingPOStags

•  Constrainttable:–  % table of Person Number Tag possible combinations–  table(3,plural,vb).–  table(3,plural,vbd).–  table(3,singular,vbz).–  table(3,singular,vbd).

Person,NumberfromSubjectNP

POStagfromverb

Page 12: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

Topics

•  Mechanisms:1.  ExtraargumentforPrologtermrepresentaAon

ofaparse2.  Extraargumentsforfeaturevalueagreement3.   Dealingwithle<recursiverules:grammar

transformaAon

Page 13: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

Le_recursionandProlog

Le_recursivegrammars:•  weknowfromanearlierlecturethatle_recursiverulesareano-nogivenProlog’sle_-to-rightdepth-firstcomputaAonrule…

•  Example:1.  s --> a, [!].2.  a --> ba, [a]. 3.  a --> a, [a].4.  ba --> b, [a].5.  b --> [b].

?- s([b,a,!],[]).ERROR: Out of local stack

s

a

a

a

a ...

Page 14: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

PreposiAonPhrase(PP)Aeachment

•  ThepreferredsyntacAcanalysisisale_recursiveparse•  Examples:

–  Johnsawtheboywithatelescope–  (structuralambiguity:automaAcallyhandledbyProlog)

withpossessive

withinstrument

Page 15: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

PreposiAonPhrase(PP)Aeachment

•  ThepreferredsyntacAcanalysisisale_recursiveparseCan“stack”PPs:–  JohnsawtheboywithalimpwithMarywithatelescope–  ambiguity:withpossessive,withaccompaniment,withinstrument

Page 16: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

PreposiAonPhraseAeachment•  LinguisAcally:–  PP(recursively)adjoinstoNPorVP–  np(np(NP,PP)) --> np(NP), pp(PP).–  vp(vp(VP,PP)) --> vp(VP), pp(PP).

•  Le_recursiongivesPrologproblems•  DerivaAon(top-down,le_-to-right):

1.  vp2.  vppp3.  vppppp4.  vppppppp5.  vppppppppp infiniteloop…

otherextraargumentsnotshownhere…

Page 17: LING/C SC/PSYC 438/538 - dingo.sbs.arizona.edusandiway/ling538-15/lecture20.pdf · • English exhibits subject-verb agreement • Examples: – John kicked the ball – The men kicked

TransformaAon

•  ApplythegeneraltransformaAon:

•  toNPandVPrules:1.  np(np(DT,NN))-->dt(DT,Number),nn(NN,Number).2.  np(np(NP,PP))-->np(NP),pp(PP).

3.  vp(vp(VBD,NP))-->vbd(VBD),np(NP).4.  vp(vp(VP,PP))-->vp(VP),pp(PP).

x(x(X,y))-->x(X),[y].x(x(z))-->[z].

[z]

[y]xx

x(X)-->[z],w(X,x(z)).x(x(z))-->[z].w(W,X)-->[y],w(W,x(X,y)).w(x(X,y),X)-->[y].

[z]

[y]xx

Note:wisafreshnon-terminalthattakes2arguments

xistherecursivenonterminal