Presentation is loading. Please wait.

Presentation is loading. Please wait.

LING/C SC/PSYC 438/538 Lecture 25 Sandiway Fong.

Similar presentations


Presentation on theme: "LING/C SC/PSYC 438/538 Lecture 25 Sandiway Fong."— Presentation transcript:

1 LING/C SC/PSYC 438/538 Lecture 25 Sandiway Fong

2 Today's Topics Homework 12 review 538 Presentations
Grammar transformation: solving left recursive phrase structure

3 Homework 12 Review From Homework 11:
John ate (sensibly) (intransitive eat) I fish (intransitive fish) I ate fish (transitive eat) Bill ate rice Harry ate roast beef

4 Last Time g.pl

5 Homework 12 Review From Ross (1970), English exhibits (forward) gapping: I ate fish, Bill rice, and Harry roast beef cf. I ate fish, Bill ate rice, and Harry ate roast beef Forwards only (cf. Japanese: backwards): I ate fish, Bill ate rice, and Harry roast beef *I fish, Bill rice, and Harry ate roast beef *I fish, Bill ate rice, and Harry ate roast beef (<-NOT gapping) *I fish, Bill ate rice, and Harry roast beef (<-NOT gapping) Parallelism requirement: *I ate fish, Bill, and Harry roast beef *I ate fish, Bill rice, and Harry

6 Homework 12 Review

7 Homework 12 Review

8 Homework 12 Review Stanford Parser
I ate fish, Bill rice, and Harry roast beef (=2a) (Ross 1970) Stanford Parser

9 Homework 12 Review Berkeley Parser:

10 Homework 12 Review Google AI Blog Wired magazine

11 Homework 12 Review I ate fish, Bill rice, and Harry roast beef (=2a) (Ross 1970) Google (DRAGNN, successor to SyntaxNet)

12 Homework 12 Review I fish, Bill rice, and Harry (fish) beef roast eat
UDPipe:

13 538 Presentations From the syllabus homeworks: 100% homeworks: 75%
438 homeworks: 100% 538 homeworks: 75% sub-chapter presentation: 25% If you are currently taking 438, and you plan to do the HLT Master's Program consider volunteering to do the presentation for a waiver later.

14 538 Presentations next semester this course continues as 581
We can’t cover as many topics as we’d like this semester next semester this course continues as 581 Select a topic from some sections from the textbook not a full chapter don’t pick something too big or too small … Range: chapter 14 through 25 you can’t pick the same thing as your classmate First come, first served basis

15 538 Presentations Your job: present the selected topic in class
produce slides (send to me first) you’ll be evaluated on the quality of the presentation don’t just simply copy the textbook! important: you'll be evaluated on how well you communicate the essential ideas employed communicate your understanding of the tradeoffs and limitations etc. be prepared to take questions from me and your fellow classmates

16 538 Presentations Tuesday: November 27th Thursday: November 29th
Scheduling Topic selection: begins now Talk length: 8 mins first come, first served basis me your 1st, 2nd and 3rd choices me your 1st, 2nd and 3rd choice of presentation dates: Tuesday: November 27th Thursday: November 29th Tuesday: December 4th

17 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… s a ... Example: s --> a, [!]. a --> ba, [a]. a --> a, [a]. ba --> b, [a]. b --> [b]. ?- s([b,a,!],[]). ERROR: Out of local stack rule for nonterminal a immediately calls a

18 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) withinstrument withpossessive

19 Preposition Phrase (PP) Attachment
The preferred syntactic analysis is a left recursive parse Can “stack” the PPs: John saw the boy with a limp with Mary with a telescope ambiguity: withpossessive , withaccompaniment, withinstrument

20 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) sentential forms: vp vp pp vp pp pp vp pp pp pp vp pp pp pp pp infinite loop… Note: other extra arguments not shown here …

21 Transformation Apply the general transformation: to NP and VP rules:
np(np(DT,NN)) --> dt(DT,Number), nn(NN,Number). np(np(NP,PP)) --> np(NP), pp(PP). vp(vp(VBD,NP)) --> vbd(VBD), np(NP). vp(vp(VP,PP)) --> vp(VP), pp(PP). 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]. Note: w is a fresh non-terminal that takes 2 arguments x(x(X,y)) --> x(X), [y]. x(x(z)) --> [z]. [z] [y] x x x is the recursive nonterminal [z] [y] x x Let's write some code!


Download ppt "LING/C SC/PSYC 438/538 Lecture 25 Sandiway Fong."

Similar presentations


Ads by Google