October 2008CSA3180: Sentence Parsing1 CSA3180: NLP Algorithms Sentence Parsing Algorithms 2 Problems with DFTD Parser.

Slides:



Advertisements
Similar presentations
School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING Parsing: computing the grammatical structure of English sentences COMP3310.
Advertisements

Natural Language Processing - Parsing 1 - Language, Syntax, Parsing Problems in Parsing Ambiguity, Attachment / Binding Bottom vs. Top Down Parsing.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Approaches to Parsing.
PARSING WITH CONTEXT-FREE GRAMMARS
Chapter 12 Lexicalized and Probabilistic Parsing Guoqiang Shan University of Arizona November 30, 2006.
CKY Parsing Ling 571 Deep Processing Techniques for NLP January 12, 2011.
Artificial Intelligence 2004 Natural Language Processing - Syntax and Parsing - Language, Syntax, Parsing Problems in Parsing Ambiguity, Attachment.
1 Earley Algorithm Chapter 13.4 October 2009 Lecture #9.
 Christel Kemke /08 COMP 4060 Natural Language Processing PARSING.
CS Basic Parsing with Context-Free Grammars.
Parsing context-free grammars Context-free grammars specify structure, not process. There are many different ways to parse input in accordance with a given.
Albert Gatt LIN3022 Natural Language Processing Lecture 8.
Amirkabir University of Technology Computer Engineering Faculty AILAB Efficient Parsing Ahmad Abdollahzadeh Barfouroush Aban 1381 Natural Language Processing.
CS 4705 Lecture 7 Parsing with Context-Free Grammars.
Syntactic Parsing with CFGs CMSC 723: Computational Linguistics I ― Session #7 Jimmy Lin The iSchool University of Maryland Wednesday, October 14, 2009.
CS 4705 Basic Parsing with Context-Free Grammars.
Artificial Intelligence 2004 Natural Language Processing - Syntax and Parsing - Language Syntax Parsing.
Syntax Construction of phrases and sentences from morphemes and words. Usually the word syntax refers to the way words are arranged together. Syntactic.
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.
PARSING David Kauchak CS457 – Fall 2011 some slides adapted from Ray Mooney.
TEORIE E TECNICHE DEL RICONOSCIMENTO Linguistica computazionale in Python: -Analisi sintattica (parsing)
October 2008csa3180: Setence Parsing Algorithms 1 1 CSA350: NLP Algorithms Sentence Parsing I The Parsing Problem Parsing as Search Top Down/Bottom Up.
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
1 CKY and Earley Algorithms Chapter 13 October 2012 Lecture #8.
Chapter 10. Parsing with CFGs From: Chapter 10 of An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition, by.
LINGUISTICA GENERALE E COMPUTAZIONALE ANALISI SINTATTICA (PARSING)
10. Parsing with Context-free Grammars -Speech and Language Processing- 발표자 : 정영임 발표일 :
Context-Free Parsing Read J & M Chapter 10.. Basic Parsing Facts Regular LanguagesContext-Free Languages Required Automaton FSMPDA Algorithm to get rid.
Fall 2004 Lecture Notes #4 EECS 595 / LING 541 / SI 661 Natural Language Processing.
Chapter 13: Parsing with Context-Free Grammars Heshaam Faili University of Tehran.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Parsing with Context Free Grammars.
October 2005csa3180: Parsing Algorithms 11 CSA350: NLP Algorithms Sentence Parsing I The Parsing Problem Parsing as Search Top Down/Bottom Up Parsing Strategies.
Parsing I: Earley Parser CMSC Natural Language Processing May 1, 2003.
PARSING David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
For Wednesday Read chapter 23 Homework: –Chapter 22, exercises 1,4, 7, and 14.
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.
Parsing with Context-Free Grammars References: 1.Natural Language Understanding, chapter 3 (3.1~3.4, 3.6) 2.Speech and Language Processing, chapters 9,
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.
NLP. Introduction to NLP Motivation –A lot of the work is repeated –Caching intermediate results improves the complexity Dynamic programming –Building.
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:
csa3050: Parsing Algorithms 11 CSA350: NLP Algorithms Parsing Algorithms 1 Top Down Bottom-Up Left Corner.
Computerlinguistik II / Sprachtechnologie Vorlesung im SS 2010 (M-GSW-10) Prof. Dr. Udo Hahn Lehrstuhl für Computerlinguistik Institut für Germanistische.
CS 4705 Lecture 7 Parsing with Context-Free Grammars.
Natural Language Processing Lecture 15—10/15/2015 Jim Martin.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
GRAMMARS David Kauchak CS457 – Spring 2011 some slides adapted from Ray Mooney.
October 2005CSA3180: Parsing Algorithms 21 CSA3050: NLP Algorithms Parsing Algorithms 2 Problems with DFTD Parser Earley Parsing Algorithm.
November 2009HLT: Sentence Parsing1 HLT Sentence Parsing Algorithms 2 Problems with Depth First Top Down Parsing.
November 2004csa3050: Parsing Algorithms 11 CSA350: NLP Algorithms Parsing Algorithms 1 Top Down Bottom-Up Left Corner.
PARSING David Kauchak CS159 – Fall Admin Assignment 3 Quiz #1  High: 36  Average: 33 (92%)  Median: 33.5 (93%)
Parsing with Context Free Grammars. Slide 1 Outline Why should you care? Parsing Top-Down Parsing Bottom-Up Parsing Bottom-Up Space (an example) Top -
CSC 594 Topics in AI – Natural Language Processing
Basic Parsing with Context Free Grammars Chapter 13
CKY Parser 0Book 1 the 2 flight 3 through 4 Houston5 6/19/2018
Probabilistic CKY Parser
CS : Speech, NLP and the Web/Topics in AI
CPSC 503 Computational Linguistics
CKY Parser 0Book 1 the 2 flight 3 through 4 Houston5 11/16/2018
Lecture 14: Grammar and Parsing (II) November 11, 2004 Dan Jurafsky
Natural Language - General
Parsing and More Parsing
CPSC 503 Computational Linguistics
CSA2050 Introduction to Computational Linguistics
csa3180: Setence Parsing Algorithms 1
Parsing I: CFGs & the Earley Parser
David Kauchak CS159 – Spring 2019
NLP.
Presentation transcript:

October 2008CSA3180: Sentence Parsing1 CSA3180: NLP Algorithms Sentence Parsing Algorithms 2 Problems with DFTD Parser

October 2008CSA3180: Sentence Parsing2 Problems with DFTD Parser Left Recursion Handling Ambiguity Inefficiency

October 2008CSA3180: Sentence Parsing3 Left Recursion A grammar is left recursive if it contains at least one non-terminal A for which A  *  A  and   *  (n.b.  * is the transitive closure of  ) Intuitive idea: derivation of that category includes itself along its leftmost branch. NP  NP PP NP  NP and NP NP  DetP Nominal DetP  NP ' s

October 2008CSA3180: Sentence Parsing4 Left Recursion Left recursion can lead to an infinite loop [nltk demo

October 2008CSA3180: Sentence Parsing5 Dealing with Left Recursion Use different parsing strategy Reformulate the grammar to eliminate LR A  A  |  is rewritten as A   A' A'   A' | 

October 2008CSA3180: Sentence Parsing6 Rewriting the Grammar NP → NP ‘and’ NP NP → D N | D N PP

October 2008CSA3180: Sentence Parsing7 Rewriting the Grammar NP → NP ‘and’ NP β NP → D N | D N PP α

October 2008CSA3180: Sentence Parsing8 Rewriting the Grammar NP → NP ‘and’ NP β NP → D N | D N PP α New Grammar NP → α NP1 NP1 → β NP1 | ε

October 2008CSA3180: Sentence Parsing9 Rewriting the Grammar NP → NP ‘and’ NP β NP → D N | D N PP α New Grammar NP → α NP1 NP1 → β NP1 | ε α → D N | D N PP β → ‘and’ NP

October 2008CSA3180: Sentence Parsing10 New Parse Tree D N the cat α NP NP1 ε

October 2008CSA3180: Sentence Parsing11 Rewriting the Grammar Different parse tree Unnatural parse tree?

October 2008CSA3180: Sentence Parsing12 Problems with DFTD Parser Left Recursion Handling Ambiguity Inefficiency

October 2008CSA3180: Sentence Parsing13 Handling Ambiguity Coordination Ambiguity: different scope of conjunction: Hot curry and ice taste nice with rice Hot curry and rice taste nice with ice Attachment Ambiguity: a constituent can be added to the parse tree in different places: I shot an elephant in my trousers VP → VP PP NP → NP PP

October 2008CSA3180: Sentence Parsing14 Real sentences are full of ambiguities President Kennedy today pushed aside other White House business to devote all his time and attention to working on the Berlin crisis address he will deliver tomorrow night to the American people over nationwide television and radio

October 2008CSA3180: Sentence Parsing15 Prepositional Phrase Ambiguity No of PPs# parses he will deliver - to the American people - over nationwide TV - in New York - during September - for very good reasons

October 2008CSA3180: Sentence Parsing16 Growth of Number of Ambiguities The nth Catalan number counts the ways of dissecting a polygon with n+2 sides into triangles by drawing nonintersecting diagonals. No of PPs# parses

October 2008CSA3180: Sentence Parsing17 Handling Ambiguities Statistical disambiguation –which is the most probable interpretation? Semantic knowledge –which is the most sensible interpretation? –Subatomic particles such as positively charged protons and electrons

October 2008CSA3180: Sentence Parsing18 Problems with DFTD Parser Left Recursion Handling Ambiguity Inefficiency

October 2008CSA3180: Sentence Parsing19 Repeated Parsing of Subtrees Local versus global ambiguity. –NP → Det Noun –NP → NP PP Because of the top down depth first, left to right policy, the parser builds trees that fail because they do not cover all of the input. Successive parses cover larger segments of the input, but these include structures that have already been built before.

October 2008CSA3180: Sentence Parsing20 Repeated Parsing of Subtrees a flight4 from Indianapolis3 to Houston2 on TWA1 A flight from Indianapolis3 A flight from Indianapolis to Houston 2 A flight from Indianapolis to Houston on TWA 1 NP Nom Det Noun a flight NP NP PP Nom Det Noun P Noun a flight from Indianapolis

October 2008CSA3180: Sentence Parsing21 Repeated Parsing of Subtrees a flight4 from Indianapolis3 to Houston2 on TWA1 A flight from Indianapolis3 A flight from Indianapolis to Houston 2 A flight from Indianapolis to Houston on TWA 1