LING 388: Language and Computers Sandiway Fong Lecture 10.

Slides:



Advertisements
Similar presentations
LING 388: Language and Computers
Advertisements

Review of Homework 4 November 20, Exercise 1 (A) 1 pt Modify the DCG to accept the omission of the complementizer that for object relative clauses.
LING 388: Language and Computers Sandiway Fong Lecture 5: 9/8.
CSA4050: Advanced Topics in NLP Semantics IV Partial Execution Proper Noun Adjective.
LING 388: Language and Computers Sandiway Fong Lecture 28 12/1.
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 388: Language and Computers Sandiway Fong Lecture 15.
LING 364: Introduction to Formal Semantics Lecture 8 February 7th.
Natural Language Processing - Feature Structures - Feature Structures and Unification.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 7: 9/12.
LING 364: Introduction to Formal Semantics Lecture 9 February 9th.
LING 388 Language and Computers Lecture 19 11/04/03 Sandiway FONG.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 9: 9/21.
LING 388: Language and Computers Sandiway Fong Lecture 15: 10/17.
LING 364: Introduction to Formal Semantics
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 8: 9/18.
LING 364: Introduction to Formal Semantics Lecture 4 January 24th.
LING 388: Language and Computers Sandiway Fong Lecture 14: 10/13.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 9: 9/25.
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 364: Introduction to Formal Semantics Lecture 7 February 2nd.
LING 388 Language and Computers Lecture 20 11/6/03 Sandiway FONG.
LING 388 Language and Computers Lecture 18 10/30/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 17: 10/25.
LING 364: Introduction to Formal Semantics Lecture 13 February 23rd.
LING 388: Language and Computers Sandiway Fong Lecture 16: 10/19.
LING 388 Language and Computers Lecture 13 10/14/03 Sandiway FONG.
LING 364: Introduction to Formal Semantics Lecture 5 January 26th.
LING 388: Language and Computers Sandiway Fong Lecture 13: 10/10.
LING 388 Language and Computers Lecture 12 10/9/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 8.
LING 388: Language and Computers Sandiway Fong 10/4 Lecture 12.
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
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 14 10/11.
LING 388: Language and Computers Sandiway Fong Lecture 17.
LING 388: Language and Computers Sandiway Fong Lecture 27.
LING 388: Language and Computers Sandiway Fong Lecture 7.
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
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 26 11/22.
NLP. Introduction to NLP Is language more than just a “bag of words”? Grammatical rules apply to categories and groups of words, not individual words.
LING 388: Language and Computers Sandiway Fong Lecture 19.
Today Phrase structure rules, trees Constituents Recursion Conjunction
LING 388: Language and Computers Sandiway Fong Lecture 13.
LING 388: Language and Computers Sandiway Fong Lecture 20: 11/3.
LING 388: Language and Computers Sandiway Fong Lecture 12.
LING 388: Language and Computers Sandiway Fong Lecture 11: 10/4.
Rules, Movement, Ambiguity
The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites the dog V N NP S VP A 1. Sentence  noun-phrase verb-phrase.
LING 388: Language and Computers Sandiway Fong Lecture 21.
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 18 Sandiway Fong. Adminstrivia Homework 7 out today – due Saturday by midnight.
1 Chapter 4 Syntax Part III. 2 The infinity of language pp The number of sentences in a language is infinite. 2. The length of sentences is.
LING 388: Language and Computers Sandiway Fong Lecture 20.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong 1.
CKY Parser 0Book 1 the 2 flight 3 through 4 Houston5 6/19/2018
Natural Language Processing
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong.
CKY Parser 0Book 1 the 2 flight 3 through 4 Houston5 11/16/2018
LING/C SC 581: Advanced Computational Linguistics
LING/C SC/PSYC 438/538 Lecture 23 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 24 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 26 Sandiway Fong.
Presentation transcript:

LING 388: Language and Computers Sandiway Fong Lecture 10

Administrivia Homework 4 is out today – due next Wednesday by midnight – Ben Martin – one PDF file please (grammar and screenshots)

Last Time Computing parse trees original DCG – sentence --> np, vp. – vp --> verb, np. – verb --> [took]. – np --> det, [man]. – np --> det, [book]. – det --> [the]. revised DCG – sentence(s(NP,VP)) --> np(NP), vp(VP). – vp(vp(V,NP)) --> verb(V), np(NP). – verb(v(took)) --> [took]. – np(np(D,man)) --> det(D), [man]. – np(np(D,book)) --> det(D), [book]. – det(det(the)) --> [the]. ?- sentence(List,[]). true/false ?- sentence(List,[]). true/false ?- sentence(Parse,List,[]). Parse = … true/false ?- sentence(Parse,List,[]). Parse = … true/false Arity = 2 Arity = 3 [the,man,took,the,book]

Exercise 1 Idiom chunks – kicked the bucket – has both a literal meaning – and is also a VP (verb phrase) idiom – meaning: – died

Exercise 1 let's take the file grammar.pl from lecture 9 add new rule – “kicked the bucket” is a VP idiom meaning “died” – vp(vp(v(died))) --> [kicked,the,bucket]. – example illustrates the ability to return any parse we like for a given rule query – what are the possible parses for “the man kicked the bucket”? – ?- sentence(Parse,[the,man,kicked,the,bucket],[]). – Parse = s(np(det(the),man),vp(v(died))) ? ; – false – computes idiomatic meaning only

Exercise 2 add new rules – for “kicked” and “bucket” as a verb and noun, respectively – verb(v(kicked)) --> [kicked]. – np(np(D,bucket)) --> det(D), [bucket]. – provides the ability to return the literal parse for “kicked the bucket”

Exercise 2 query – what are the possible parses for “the man kicked the bucket”? – ?- sentence(Parse,[the,man,kicked,the,bucket],[]). – Parse = s(np(det(the),man),vp(v(kicked),np(det(the),bucket))) ? ; – Parse = s(np(det(the),man),vp(v(died))) ? ; – false – both idiomatic and literal meanings are now possible – Which one comes first? – Which one is preferred?

A Note on Encoding Idioms Our ability to handle the idiom neatly depends on the fact that the idiom is a constituent – this means we can encode it in just one rule Example: – “kicked the bucket” is a VP idiom meaning “died” – vp(vp(v(died))) --> [kicked,the,bucket]. – very common... V + Object(s) – jump the gun – walk the plank – turn the other cheek Asymmetry: – Subject+V idioms are practically non-existent – The vultures appear to be circling NP[Linguist List, Vol-4-43]

Homework 4 Recursion type 1: – we can stack adjectives… – the bus – the big bus – the big red bus – the shiny big red bus – (cf. the big shiny red bus) – adjective modifies noun – adjective can modify already modified noun – and so on… Recursive rule: – right recursive rule – nn --> a, nn.

Homework 4 Recursion type 2: – some verbs can select for clauses (and NPs): e.g. notice I noticed the big red bus I noticed that John noticed the big red bus I noticed that John noticed that Mary noticed the big red bus … [ S I noticed [ SBAR that [ S John noticed [ SBAR that [ S Mary noticed the big red bus]]]]]

Homework 4 [ S I noticed [ SBAR that [ S John noticed [ SBAR that [ S Mary noticed the big red bus]]]]] Stanford parser output implies rules: VP  VBD SBAR SBAR  IN S

Homework 4 Implement a grammar that can parse examples of both types of recursion and output a parse tree Submit your grammar Submit example runs (including at least the examples on the previous page) Remember: – put everything in one PDF file