+ All Categories
Home > Documents > LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

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

Date post: 08-Jan-2018
Category:
Upload: avice-isabel-crawford
View: 217 times
Download: 1 times
Share this document with a friend
Description:
Last Time Course webpage: g19.pl John kicked the ball the men kicked the ball a man kicked the ball
17
LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1
Transcript
Page 1: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

1

LING/C SC/PSYC 438/538

Lecture 20Sandiway Fong

Page 2: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

538 Presentations

Name Column1Last FirstRomero Diaz DamianMuriel JorgePike Ammon JohnsonFarahnak FaridehLee Puay Leng PatriciaBrown RachelSullivan TrevorXu Dongfang

• So far I've received responses from the following people:

Page 3: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Last TimeCourse webpage: g19.plJohn kicked the ball

the men kicked the balla man kicked the ball

Page 4: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Phrase Structure Grammars

• Berkeley Parser: John kicked the ball

Page 5: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Phrase Structure Grammars

• Berkeley Parser: the men kicked the ball

Page 6: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Phrase Structure Grammars

• Berkeley Parser: a man kicked the ball

Page 7: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

g19.plrejects

Page 8: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Phrase Structure Grammars

• Berkeley Parser: a men kicked the ball

Page 9: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Extra Arguments: Agreement

• English exhibits subject-verb agreement

• Examples:– John kicked the ball– The men kicked the ball– John kicks the balls– The men *kicks/kick the

ballConstraint:

1. -s form of the verb is compatible with 3rd person singular only for the subject NP

2. uninflected form is not compatible with 3rd person singular for the subject NP

Page 10: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Subject Verb Agreement

• We need feature percolation:

eats*eat

Form EndingComment

eat uninflected not 3rd person singular

eats -s3rd person singular

ate -edpast

eaten -enpast participle

eating -inggerund

PersonNumber

Ending

Subject and VP come together at this rule

PersonNumber Ending

POS tags

Page 11: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Subject Verb Agreement• Implementation: using POS tags

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

Person, Numberfrom Subject NP

POS tagfrom verb

Page 12: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Topics

• Mechanisms:1. Extra argument for Prolog term representation

of a parse2. Extra arguments for feature value agreement3. Dealing with left recursive rules: grammar

transformation

Page 13: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Left recursion and Prolog

Left recursive grammars:• we know from an earlier lecture that left recursive

rules are a no-no given Prolog’s left-to-right depth-first computation rule…

• 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 Lecture 20 Sandiway Fong 1.

Preposition Phrase (PP) Attachment

• The preferred syntactic analysis is a left recursive parse• Examples:

– John saw the boy with a telescope – (structural ambiguity: automatically handled by Prolog)

withpossessive

withinstrument

Page 15: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Preposition Phrase (PP) Attachment

• The preferred syntactic analysis is a left recursive parseCan “stack” PPs:– John saw the boy with a limp with Mary with a telescope – ambiguity: withpossessive , withaccompaniment, withinstrument

Page 16: LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.

Preposition Phrase Attachment

• Linguistically: – PP (recursively) adjoins to NP or VP– np(np(NP,PP)) --> np(NP), pp(PP).– vp(vp(VP,PP)) --> vp(VP), pp(PP).

• Left recursion gives Prolog problems• Derivation (top-down, left-to-right):

1. vp2. vp pp3. vp pp pp4. vp pp pp pp5. vp pp pp pp pp infinite loop…

other extra argumentsnot shown here …

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

Transformation

• Apply the general transformation:

• to NP and VP rules: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:w is a freshnon-terminalthat takes 2arguments

x is the recursive nonterminal


Recommended