CS 182 Sections 103 - 104 Leon Barrett with slides inspired by Eva Mok and Joe Makin April 18, 2007.

Slides:



Advertisements
Similar presentations
CSCTR Session 8 Dana Retová. group at UC Berkeley & Uni of Hawaii Nancy Chang Benjamin Bergen Jerome Feldman, … General assumption Semantic relations.
Advertisements

Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Feature Structures and Parsing Unification Grammars Algorithms for NLP 18 November 2014.
Syntactic analysis using Context Free Grammars. Analysis of language Morphological analysis – Chairs, Part Of Speech (POS) tagging – The/DT man/NN left/VBD.
Natural Language Processing - Parsing 1 - Language, Syntax, Parsing Problems in Parsing Ambiguity, Attachment / Binding Bottom vs. Top Down Parsing.
Statistical NLP: Lecture 3
LING NLP 1 Introduction to Computational Linguistics Martha Palmer April 19, 2006.
For Monday Read Chapter 23, sections 3-4 Homework –Chapter 23, exercises 1, 6, 14, 19 –Do them in order. Do NOT read ahead.
Natural Language Processing - Feature Structures - Feature Structures and Unification.
Artificial Intelligence 2004 Natural Language Processing - Syntax and Parsing - Language, Syntax, Parsing Problems in Parsing Ambiguity, Attachment.
NLP and Speech Course Review. Morphological Analyzer Lexicon Part-of-Speech (POS) Tagging Grammar Rules Parser thethe – determiner Det NP → Det.
 Christel Kemke /08 COMP 4060 Natural Language Processing PARSING.
CS 182 Sections slides created by: Eva Mok modified by jgm April 26, 2006.
CS 182 Sections Eva Mok April 21, 2004.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Features and Unification
Artificial Intelligence 2004 Natural Language Processing - Syntax and Parsing - Language Syntax Parsing.
CPSC 503 Computational Linguistics
CS 4705 Lecture 11 Feature Structures and Unification Parsing.
Stochastic POS tagging Stochastic taggers choose tags that result in the highest probability: P(word | tag) * P(tag | previous n tags) Stochastic taggers.
Linguistics II Syntax. Rules of how words go together to form sentences What types of words go together How the presence of some words predetermines others.
Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books עיבוד שפות טבעיות - שיעור תשע Bottom Up Parsing עידו דגן.
Context-Free Grammar CSCI-GA.2590 – Lecture 3 Ralph Grishman NYU.
1 Basic Parsing with Context Free Grammars Chapter 13 September/October 2012 Lecture 6.
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
Context Free Grammars Reading: Chap 12-13, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
PARSING David Kauchak CS457 – Fall 2011 some slides adapted from Ray Mooney.
1 Features and Unification Chapter 15 October 2012 Lecture #10.
1 CPE 480 Natural Language Processing Lecture 5: Parser Asst. Prof. Nuttanart Facundes, Ph.D.
CS : Language Technology for the Web/Natural Language Processing Pushpak Bhattacharyya CSE Dept., IIT Bombay Constituent Parsing and Algorithms (with.
Parsing I: Earley Parser CMSC Natural Language Processing May 1, 2003.
Context Free Grammars Reading: Chap 9, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Rada Mihalcea.
Introduction to Embodied Construction Grammar March 4, 2003 Ben Bergen
For Wednesday Read chapter 23 Homework: –Chapter 22, exercises 1,4, 7, and 14.
Linguistic Essentials
CPE 480 Natural Language Processing Lecture 4: Syntax Adapted from Owen Rambow’s slides for CSc Fall 2006.
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.
Natural Language - General
PARSING 2 David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
1 Context Free Grammars October Syntactic Grammaticality Doesn’t depend on Having heard the sentence before The sentence being true –I saw a unicorn.
Section 11.3 Features structures in the Grammar ─ Jin Wang.
CS 4705 Lecture 7 Parsing with Context-Free Grammars.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
English Syntax Read J & M Chapter 9.. Two Kinds of Issues Linguistic – what are the facts about language? The rules of syntax (grammar) Algorithmic –
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
PARSING David Kauchak CS159 – Fall Admin Assignment 3 Quiz #1  High: 36  Average: 33 (92%)  Median: 33.5 (93%)
Roadmap Probabilistic CFGs –Handling ambiguity – more likely analyses –Adding probabilities Grammar Parsing: probabilistic CYK Learning probabilities:
Natural Language Processing Vasile Rus
Context Free Grammars. Slide 1 Syntax Syntax = rules describing how words can connect to each other * that and after year last I saw you yesterday colorless.
The Neural Basis of Thought and Language Final Review Session.
The Neural Basis of Thought and Language Final Review Session.
CS182 Leon Barrett with slides inspired by Eva Mok and Joe Makin April 25, 2008.
The Neural Basis of Thought and Language Week 12 Metaphor and Automatic Reasoning, plus Grammars.
CS 182 Sections slide credit to Eva Mok and Joe Makin Updated by Leon Barrett April 25, 2007.
Natural Language Processing Vasile Rus
Lecture – VIII Monojit Choudhury RS, CSE, IIT Kharagpur
Statistical NLP: Lecture 3
Basic Parsing with Context Free Grammars Chapter 13
Natural Language Processing
Syntax.
CKY Parser 0Book 1 the 2 flight 3 through 4 Houston5 11/16/2018
CS 388: Natural Language Processing: Syntactic Parsing
Instructor: Nick Cercone CSEB -
Natural Language - General
CSCI 5832 Natural Language Processing
Linguistic Essentials
CPSC 503 Computational Linguistics
David Kauchak CS159 – Spring 2019
Artificial Intelligence 2004 Speech & Natural Language Processing
Presentation transcript:

CS 182 Sections Leon Barrett with slides inspired by Eva Mok and Joe Makin April 18, 2007

Announcements a8 out, due Tuesday, April 24 th, in class BBS articles are assigned for the final paper

Schedule Last Week –Inference in Bayes Net –Metaphor understanding using KARMA This Week –Formal Grammar and Parsing –Construction Grammar, ECG Next Week –Psychological model of sentence processing –Grammar Learning

Questions What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Pat ate the kiwi”? How well can CFGs represent English? What are some mechanisms for improvement? What are constructions? How does ECG use constructions?

Grammar A grammar is a set of rules defining a formal language an example is right-regular grammar a more common example is Context-Free Grammar   β  : single non-terminal β : any combination of terminals and non-terminals S  NP VP NP  Det Noun | ProperNoun VP  Verb NP | Verb PP PP  Preposition NP Noun  kiwi | orange | store ProperNoun  Pat | I Det  a | an | the Verb  ate | went | shop Preposition  to | at

Top Down Parsing: Pat ate the kiwi start from S and apply all applicable rules forward search (use your favorite search algorithm…) S  NP VP NP  Det Noun | ProperNoun VP  Verb NP | Verb PP PP  Preposition NP Noun  kiwi | orange | store ProperNoun  Pat | I Det  a | an | the Verb  ate | went | shop Preposition  to | at S NP VP Det Noun VPProperNoun VP a Noun VPan Noun VPthe Noun VP a kiwi VPa orange VPa store VP … succeed when you encounter Pat ate the kiwi in a state without any non- terminals (DFS)

Bottom Up Parsing: Pat ate the kiwi start from the sentence and try to match non-teriminals to it backward search (use your favorite search algorithm…) S  NP VP NP  Det Noun | ProperNoun VP  Verb NP | Verb PP PP  Preposition NP Noun  kiwi | orange | store ProperNoun  Pat | I Det  a | an | the Verb  ate | went | shop Preposition  to | at succeed when you encounter S in a state by itself Pat ate the kiwi ProperNoun ate the kiwi NP Verb the kiwi NP Verb Det kiwi NP Verb Det Noun NP Verb NP NP VP NP ate the kiwi (DFS) S

Questions What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Harry likes the cafe”? How well can CFGs represent English? What are some mechanisms for improvement? What are constructions? How does ECG use constructions?

Notice the ungrammatical and/or odd sentences that we can generate? * Pat ate a orange * Pat shop at the store * Pat went a store ? Pat ate a store ? The kiwi went to an orange S  NP VP NP  Det Noun | ProperNoun VP  Verb NP | Verb PP PP  Preposition NP Noun  kiwi | orange | store ProperNoun  Pat | I Det  a | an | the Verb  ate | went | shop Preposition  to | at need to capture agreement, subcategorization, etc you could make many versions of verbs, nouns, dets  cumbersome

Unification Grammar Basic idea: capture these agreement features for each non-terminal in feature structures Enforce constraints on these features using unification rules Pat number : SG person : 3rd agreement I number : SG person : 1st agreement Went agreement Shop agreement number : person : 1st VP  Verb NP VP.agreement ↔ Verb.agreement S  NP VP NP.agreement ↔ VP.agreement

Questions What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Harry likes the cafe”? How well can CFGs represent English? What are some mechanisms for improvement? What are constructions? How does ECG use constructions?

Embodied constructions construction H ARRY form : /hEriy/ meaning : Harry construction C AFE form : /k h aefej/ meaning : Cafe Harry CAFE cafe ECG Notation FormMeaning Constructions have form and meaning poles that are subject to type constraints.

Questions 1.What is top-down parsing? Using a plausible CFG grammar, what is the top down parse of “Harry likes the cafe”? 2.How well can CFGs represent English? What are some mechanisms for improvement? 3.What are constructions? How does ECG use constructions?

A schema hierarchy of objects (Nomi) schema Referent subcase of Entity roles category distribution boundedness number gender accessibility resolved-ref schema Referent subcase of Entity roles category distribution boundedness number gender accessibility resolved-ref schema Object subcase of Entity schema Object subcase of Entity schema Entity schema Place schema Physical-Object subcase of Object, Place schema Physical-Object subcase of Object, Place schema Animate subcase of Physical-Object roles animacy constraints animacy ← true schema Animate subcase of Physical-Object roles animacy constraints animacy ← true schema Human subcase of Animate roles sex schema Human subcase of Animate roles sex schema Nomi subcase of Human sex ← female schema Nomi subcase of Human sex ← female schema Manipulable-Object subcase of Physical-Object schema Manipulable-Object subcase of Physical-Object schema Toy subcase of Manipulable-Object schema Toy subcase of Manipulable-Object schema Ball subcase of Toy schema Ball subcase of Toy slot filler schema Cup subcase of Manipulable-Object schema Cup subcase of Manipulable-Object

The schemas we just defined Entity Place Object Physical- Object Referent Animat e Manipulable- Object HumanToy Nom i MotherFatherBook Cup Bal l Block Food DollBed Cak e Juice

A schema hierarchy of actions (Nomi) schema DirectedAction subcase of Action roles patient : Entity schema DirectedAction subcase of Action roles patient : Entity schema Action roles agent : Entity schema Action roles agent : Entity schema Move subcase of Action roles mover : Entity direction : Place schema Move subcase of Action roles mover : Entity direction : Place schema CauseMove subcase of DirectedAction, Move roles causer : Human mover : Physical-Object motion : Move constraints motion.mover ↔ mover motion.agent ↔ causer motion.direction ↔ direction agent ↔ causer patient ↔ mover schema CauseMove subcase of DirectedAction, Move roles causer : Human mover : Physical-Object motion : Move constraints motion.mover ↔ mover motion.agent ↔ causer motion.direction ↔ direction agent ↔ causer patient ↔ mover identification constraint type constraint

The schemas we just defined Action Directed Action Cause-Move Move JointMoveTransfer

Constructions, finally (Nomi) construction Ref-Expr form : Schematic-Form meaning : Referent construction Ref-Expr form : Schematic-Form meaning : Referent construction Nomi-Cn level 0 subcase of Ref-Expr form : Word self.f.orth ← "Nomi" meaning evokes Nomi as n self.m.category ↔ n self.m.resolved-ref ↔ n construction Nomi-Cn level 0 subcase of Ref-Expr form : Word self.f.orth ← "Nomi" meaning evokes Nomi as n self.m.category ↔ n self.m.resolved-ref ↔ n local name fancy way of saying that the category of the referent is Nomi construction Cup-Cn level 0 subcase of Ref-Expr form : Word self.f.orth ← “cup" meaning evokes Cup as n self.m.category ↔ n self.m.resolved-ref ↔ n construction Cup-Cn level 0 subcase of Ref-Expr form : Word self.f.orth ← “cup" meaning evokes Cup as n self.m.category ↔ n self.m.resolved-ref ↔ n

Constructions, finally (Nomi) construction Cause-Motion-Verb subcase of Motion-Verb meaning : CauseMove construction Cause-Motion-Verb subcase of Motion-Verb meaning : CauseMove construction Motion-Verb meaning : Move construction Motion-Verb meaning : Move construction Get-Cn level 0 subcase of Cause-Motion-Verb form : Word self.f.orth ← "get" construction Get-Cn level 0 subcase of Cause-Motion-Verb form : Word self.f.orth ← "get" lexical constructio n

Constructions, finally (Nomi) construction Transitive-Cn level 2 constructional constituents agt : Ref-Expr v : Cause-Motion-Verb obj : Ref-Expr form agt.f before v.f v.f before obj.f meaning v.m.agent ↔ agt.m.resolved-ref v.m.patient ↔ obj.m.resolved-ref construction Transitive-Cn level 2 constructional constituents agt : Ref-Expr v : Cause-Motion-Verb obj : Ref-Expr form agt.f before v.f v.f before obj.f meaning v.m.agent ↔ agt.m.resolved-ref v.m.patient ↔ obj.m.resolved-ref smaller constructions that it takes ordering constraints on the constituents

Phonetics Semantics Pragmatics Morphology Syntax Traditional Levels of Analysis