Roadmap Probabilistic CFGs –Handling ambiguity – more likely analyses –Adding probabilities Grammar Parsing: probabilistic CYK Learning probabilities:

Slides:



Advertisements
Similar presentations
Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.
Advertisements

Albert Gatt Corpora and Statistical Methods Lecture 11.
Probabilistic and Lexicalized Parsing CS Probabilistic CFGs: PCFGs Weighted CFGs –Attach weights to rules of CFG –Compute weights of derivations.
Chapter 12 Lexicalized and Probabilistic Parsing Guoqiang Shan University of Arizona November 30, 2006.
10. Lexicalized and Probabilistic Parsing -Speech and Language Processing- 발표자 : 정영임 발표일 :
1 Statistical NLP: Lecture 12 Probabilistic Context Free Grammars.
Introduction and Jurafsky Model Resource: A Probabilistic Model of Lexical and Syntactic Access and Disambiguation, Jurafsky 1996.
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing Probabilistic Context Free Grammars (Chapter 14) Muhammed Al-Mulhem March 1,
Probabilistic Parsing: Enhancements Ling 571 Deep Processing Techniques for NLP January 26, 2011.
PCFG Parsing, Evaluation, & Improvements Ling 571 Deep Processing Techniques for NLP January 24, 2011.
6/9/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 11 Giuseppe Carenini.
Parsing with CFG Ling 571 Fei Xia Week 2: 10/4-10/6/05.
Parsing with PCFG Ling 571 Fei Xia Week 3: 10/11-10/13/05.
Context-Free Grammar Parsing by Message Passing Paper by Dekang Lin and Randy Goebel Presented by Matt Watkins.
Features and Unification
Basic Parsing with Context- Free Grammars 1 Some slides adapted from Julia Hirschberg and Dan Jurafsky.
Syntactic Parsing with CFGs CMSC 723: Computational Linguistics I ― Session #7 Jimmy Lin The iSchool University of Maryland Wednesday, October 14, 2009.
Fall 2004 Lecture Notes #5 EECS 595 / LING 541 / SI 661 Natural Language Processing.
Parsing SLP Chapter 13. 7/2/2015 Speech and Language Processing - Jurafsky and Martin 2 Outline  Parsing with CFGs  Bottom-up, top-down  CKY parsing.
Probabilistic Parsing Ling 571 Fei Xia Week 4: 10/18-10/20/05.
Probabilistic Parsing Ling 571 Fei Xia Week 5: 10/25-10/27/05.
Context-Free Grammar CSCI-GA.2590 – Lecture 3 Ralph Grishman NYU.
SI485i : NLP Set 9 Advanced PCFGs Some slides from Chris Manning.
1 Basic Parsing with Context- Free Grammars Slides adapted from Dan Jurafsky and Julia Hirschberg.
BİL711 Natural Language Processing1 Statistical Parse Disambiguation Problem: –How do we disambiguate among a set of parses of a given sentence? –We want.
Probabilistic Parsing Reading: Chap 14, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
December 2004CSA3050: PCFGs1 CSA305: Natural Language Algorithms Probabilistic Phrase Structure Grammars (PCFGs)
1 Semi-Supervised Approaches for Learning to Parse Natural Languages Rebecca Hwa
Natural Language Processing Artificial Intelligence CMSC February 28, 2002.
Parsing I: Earley Parser CMSC Natural Language Processing May 1, 2003.
11 Chapter 14 Part 1 Statistical Parsing Based on slides by Ray Mooney.
Page 1 Probabilistic Parsing and Treebanks L545 Spring 2000.
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2007 Lecture August 2007.
Albert Gatt Corpora and Statistical Methods Lecture 11.
Lexicalized and Probabilistic Parsing Read J & M Chapter 12.
CPE 480 Natural Language Processing Lecture 4: Syntax Adapted from Owen Rambow’s slides for CSc Fall 2006.
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.
Quick Speech Synthesis CMSC Natural Language Processing April 29, 2003.
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:
CPSC 422, Lecture 28Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 28 Nov, 18, 2015.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
11 Project, Part 3. Outline Basics of supervised learning using Naïve Bayes (using a simpler example) Features for the project 2.
December 2011CSA3202: PCFGs1 CSA3202: Human Language Technology Probabilistic Phrase Structure Grammars (PCFGs)
Instructor: Nick Cercone CSEB - 1 Parsing and Context Free Grammars Parsers, Top Down, Bottom Up, Left Corner, Earley.
PARSING David Kauchak CS159 – Fall Admin Assignment 3 Quiz #1  High: 36  Average: 33 (92%)  Median: 33.5 (93%)
Natural Language Processing : Probabilistic Context Free Grammars Updated 8/07.
Chapter 12: Probabilistic Parsing and Treebanks Heshaam Faili University of Tehran.
Probabilistic and Lexicalized Parsing. Probabilistic CFGs Weighted CFGs –Attach weights to rules of CFG –Compute weights of derivations –Use weights to.
General Information on Context-free and Probabilistic Context-free Grammars İbrahim Hoça CENG784, Fall 2013.
Natural Language Processing Vasile Rus
1 Statistical methods in NLP Diana Trandabat
CSC 594 Topics in AI – Natural Language Processing
CSC 594 Topics in AI – Natural Language Processing
Basic Parsing with Context Free Grammars Chapter 13
CS 388: Natural Language Processing: Statistical Parsing
Probabilistic and Lexicalized Parsing
CSCI 5832 Natural Language Processing
Probabilistic and Lexicalized Parsing
CSCI 5832 Natural Language Processing
CPSC 503 Computational Linguistics
CPSC 503 Computational Linguistics
David Kauchak CS159 – Spring 2019
CPSC 503 Computational Linguistics
Parsing I: CFGs & the Earley Parser
CPSC 503 Computational Linguistics
David Kauchak CS159 – Spring 2019
CPSC 503 Computational Linguistics
Presentation transcript:

Roadmap Probabilistic CFGs –Handling ambiguity – more likely analyses –Adding probabilities Grammar Parsing: probabilistic CYK Learning probabilities: Treebanks & Inside-Outside Issues with probabilities –Resolving issues Lexicalized grammars –Independence assumptions –Alternative grammar formalisms Dependency Grammar

Representation: Probabilistic Context-free Grammars PCFGs: 5-tuple –A set of terminal symbols: Σ –A set of non-terminal symbols: N –A set of productions P: of the form A -> α Where A is a non-terminal and α in (Σ U N)* –A designated start symbol S –A function assigning probabilities to rules: D L = W|w in Σ* and S=>*w –Where S=>*w means S derives w by some seq

Parse Ambiguity Two parse trees S NP VP N V NP PP Det N P NP Det N I saw the man with the duck S NP VP N V NP NP PP Det N P NP Det N I saw the man with the duck

Small Probabilistic Grammar NP -> N NP -> Det N NP -> Det Adj N NP -> NP PP VP -> V VP -> V NP VP -> V NP PP S -> NP VP S -> S conj S PP -> P NP

Parse Probabilities –T(ree),S(entence),n(ode),R(ule) –T1 = 0.85*0.2*0.1*0.65*1*0.65 = –T2 = 0.85*0.2*0.45*0.05*0.65*1*0.65 = Select T1 Best systems achieve 92-93% accuracy

Probabilistic CYK Parsing Augmentation of Cocke-Younger-Kasami –Bottom-up parsing Inputs –PCFG in CNF G={N,Σ,P,S,D}, N have indices –N words w1…wn DS:Dynamic programming array: π[i,j,a] Holding max prob index a spanning i,j Output: Parse π[1,n,1] with S and w1..wn

Probabilistic CYK Parsing Base case: Input strings of length 1 –In CNF, prob must be from A=>wi Recursive case: For strings > 1, A=>*wij iff there is rule A->BC and some k, 1<=k<j st B derives the first k symbols and C the last j-k. Since len < |wij|, probability in table. Multiply subparts; compute max over all subparts.

Inside-Outside Algorithm EM approach –Similar to Forward-Backward training of HMM Estimate number of times production used –Base on sentence parses –Issue: Ambiguity Distribute across rule possibilities –Iterate to convergence

Issues with PCFGs Non-local dependencies –Rules are context-free; language isn’t Example: –Subject vs non-subject NPs Subject: 90% pronouns (SWB) NP-> Pron vs NP-> Det Nom: doesn’t know if subj Lexical context: –Verb subcategorization: Send NP PP vs Saw NP PP –One approach: lexicalization

Probabilistic Lexicalized CFGs Key notion: “head” –Each non-terminal assoc w/lexical head E.g. verb with verb phrase, noun with noun phrase –Each rule must identify RHS element as head Heads propagate up tree –Conceptually like adding 1 rule per head value VP(dumped) -> VBD(dumped)NP(sacks)PP(into) VP(dumped) -> VBD(dumped)NP(cats)PP(into)

PLCFG with head features S(dumped) NP(workers) VP(dumped) NNS(workers) VBD(dumped) NP(sacks) PP(into) NNS(sacks) P(into) NP(bin) DT(a) NN(bin) Workers dumped sacks into a bin

PLCFGs Issue: Too many rules –No way to find corpus with enough examples (Partial) Solution: Independence assumed –Condition rule on Category of LHS, head –Condition head on Category of LHS and parent’s head

Disambiguation Example S(dumped) NP(workers) VP(dumped) NNS(workers) VBD(dumped) NP(sacks) PP(into) NNS(sacks) P(into) NP(bin) Workers dumped sacks into a bin NP(sacks) Dt(a) NN(bin)

Disambiguation Example II

Evaluation Compare to “Gold Standard” manual parse –Correct if constituent has same start, end, label Three measures: –Labeled Recall: # correct constituents in candidate parse of s # correct constituents in treebank parse of c –Labeled Precision: # correct constituents in candidate parse of s # total constituents in candidate parse of c –Cross-brackets: (A (B C)) vs ((A B) C) Standard: 90%,90%,1%

Dependency Grammars Pure lexical dependency –Relate words based on binary syntactic relns –No constituency, phrase structure rules Why? –Better for languages with flexible word orders –Abstracts away from surface form/order Root node + word nodes –Link with dependency relations – fixed set E.g. subj, obj, dat, loc, attr, mode, comp,…

Dependency Grammar Example Dumped Workers Sacks Into bin a Main: obj subj loc pcomp det