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

Slides:



Advertisements
Similar presentations
LING 388: Language and Computers
Advertisements

Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.
LING 388: Language and Computers Sandiway Fong Lecture 2.
Natural Language Processing DCG and Syntax NLP DCG A “translation” example: special case A DCG recogniser.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 7: 9/12.
LING 364: Introduction to Formal Semantics Lecture 10 February 14th.
LING 364: Introduction to Formal Semantics Lecture 9 February 9th.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 9: 9/21.
Cse321, Programming Languages and Compilers 1 6/12/2015 Lecture #10, Feb. 14, 2007 Modified sets of item construction Rules for building LR parse tables.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 8: 9/18.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 7: 9/11.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 22: 11/15.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 9: 9/25.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 6: 9/6.
LING 364: Introduction to Formal Semantics Lecture 11 February 16th.
LING 388 Language and Computers Take-Home Final Examination 12/9/03 Sandiway FONG.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 5: 9/5.
LING 388: Language and Computers Sandiway Fong Lecture 13: 10/10.
LING 388 Language and Computers Lecture 6 9/18/03 Sandiway FONG.
Context-Free Grammar CSCI-GA.2590 – Lecture 3 Ralph Grishman NYU.
LING 388: Language and Computers Sandiway Fong Lecture 8.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong 1.
LING 388: Language and Computers Sandiway Fong Lecture 11.
LING 388: Language and Computers Sandiway Fong Lecture 17.
11/22/1999 JHU CS /Jan Hajic 1 Introduction to Natural Language Processing ( ) Shift-Reduce Parsing in Detail Dr. Jan Hajič CS Dept., Johns.
LING 388: Language and Computers Sandiway Fong Lecture 7.
Top-Down Parsing - recursive descent - predictive parsing
LING 388: Language and Computers Sandiway Fong Lecture 15 10/13.
LING 388: Language and Computers Sandiway Fong Lecture 3.
LING 388: Language and Computers Sandiway Fong Lecture 18.
LING 388: Language and Computers Sandiway Fong Lecture 10.
LING 388: Language and Computers Sandiway Fong Lecture 13.
LING/C SC/PSYC 438/538 Lecture 26 Sandiway Fong. Administrivia 538 Presentations – Send me your choices if you haven’t already Thanksgiving Holiday –
LING 388: Language and Computers Sandiway Fong Lecture 12.
LING/C SC/PSYC 438/538 Lecture 13 Sandiway Fong. Administrivia Reading Homework – Chapter 3 of JM: Words and Transducers.
CS 4705 Lecture 10 The Earley Algorithm. Review Top-Down vs. Bottom-Up Parsers –Both generate too many useless trees –Combine the two to avoid over-generation:
LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.
LING 388: Language and Computers Sandiway Fong Lecture 16.
LING/C SC/PSYC 438/538 Lecture 16 Sandiway Fong. SWI Prolog Grammar rules are translated when the program is loaded into Prolog rules. Solves the mystery.
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 13 (17/02/06) Prof. Pushpak Bhattacharyya IIT Bombay Top-Down Bottom-Up.
November 2009HLT: Sentence Parsing1 HLT Sentence Parsing Algorithms 2 Problems with Depth First Top Down Parsing.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong 1.
PARSING David Kauchak CS159 – Fall Admin Assignment 3 Quiz #1  High: 36  Average: 33 (92%)  Median: 33.5 (93%)
Parallel Tools for Natural Language Processing Mark Brigham Melanie Goetz Andrew Hogue / March 16, 2004.
King Faisal University جامعة الملك فيصل Deanship of E-Learning and Distance Education عمادة التعلم الإلكتروني والتعليم عن بعد [ ] 1 King Faisal University.
Basic Parsing with Context Free Grammars Chapter 13
LING/C SC/PSYC 438/538 Lecture 23 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 5 Sandiway Fong.
CS : Speech, NLP and the Web/Topics in AI
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 4 Sandiway Fong.
LING/C SC 581: Advanced Computational Linguistics
CSE322 LEFT & RIGHT LINEAR REGULAR GRAMMAR
LING/C SC/PSYC 438/538 Lecture 3 Sandiway Fong.
LING/C SC 581: Advanced Computational Linguistics
Parsing and More Parsing
LING/C SC/PSYC 438/538 Lecture 23 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 22 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 24 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 25 Sandiway Fong.
Theory of Computation Lecture #
Compiler Construction
CSA2050 Introduction to Computational Linguistics
David Kauchak CS159 – Spring 2019
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
David Kauchak CS159 – Spring 2019
LING/C SC/PSYC 438/538 Lecture 3 Sandiway Fong.
LING/C SC 581: Advanced Computational Linguistics
Parsing CSCI 432 Computer Science Theory
Presentation transcript:

LING/C SC/PSYC 438/538 Lecture 26 Sandiway Fong

Administrivia No new homework today

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

538 Presentations Check the table:

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

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

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

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 …

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 a grammar!