SlideShare a Scribd company logo
Probabilistic Parsing
Chapter 14, Part 2
•This slide set was adapted from J. Martin, R. Mihalcea, Rebecca Hwa, and Ray
Mooney
2
Vanilla PCFG Limitations
• Since probabilities of productions do not rely on
specific words or concepts, only general structural
disambiguation is possible (e.g. prefer to attach
PPs to Nominals).
• Consequently, vanilla PCFGs cannot resolve
syntactic ambiguities that require semantics to
resolve, e.g. ate with fork vs. meatballs.
• In order to work well, PCFGs must be lexicalized,
Example of Importance of Lexicalization
• A general preference for attaching PPs to NPs
rather than VPs can be learned by a vanilla PCFG.
• But the desired preference can depend on specific
words.
3
S → NP VP
S → VP
NP → Det A N
NP → NP PP
NP → PropN
A → ε
A → Adj A
PP → Prep NP
VP → V NP
VP → VP PP
0.9
0.1
0.5
0.3
0.2
0.6
0.4
1.0
0.7
0.3
English
PCFG
Parser
S
NP VP
John V NP PP
put the dog in the pen
John put the dog in the pen.
3
4
Example of Importance of Lexicalization
• A general preference for attaching PPs to NPs
rather than VPs can be learned by a vanilla PCFG.
• But the desired preference can depend on specific
words.
S → NP VP
S → VP
NP → Det A N
NP → NP PP
NP → PropN
A → ε
A → Adj A
PP → Prep NP
VP → V NP
VP → VP PP
0.9
0.1
0.5
0.3
0.2
0.6
0.4
1.0
0.7
0.3
English
PCFG
Parser
S
NP VP
John V NP
put the dog in the pen
X
John put the dog in the pen.
4
5
Head Words
• Syntactic phrases usually have a word in them that
is most “central” to the phrase.
• Linguists have defined the concept of a lexical
head of a phrase.
• Simple rules can identify the head of any phrase
by percolating head words up the parse tree.
– Head of a VP is the main verb
– Head of an NP is the main noun
– Head of a PP is the preposition
– Head of a sentence is the head of its VP
6
Head propagation in parse trees
VP (bought)
bought
NP (book)
the
NN (book)
book
S (bought)
the
NN (man)
man DT (the)
V (bought)DT (the)
NP (man)
7
Lexicalized Productions
• Specialized productions can be generated by
including the head word and its POS of each non-
terminal as part of that non-terminal’s symbol.
S
VP
VBD NP
DT Nominal
Nominal PP
liked
IN NP
in
the
dog
NN
DT Nominal
NNthe
pen
NNP
NP
John
pen-NN
pen-NN
in-IN
dog-NN
dog-NN
dog-NN
liked-VBD
liked-VBD
John-NNP
Nominaldog-NN → Nominaldog-NN PPin-IN
8
Lexicalized Productions
S
VP
VP PP
DT Nominalput
IN NP
in
the
dog
NN
DT Nominal
NNthe
pen
NNP
NP
John
pen-NN
pen-NN
in-IN
dog-NN
dog-NN
put-VBD
put-VBD
John-NNP
NPVBD
put-VBD
VPput-VBD → VPput-VBD PPin-IN
9
Parameters
• We used to have
– VP -> V NP PP P(r|VP)
• That’s the count of this rule divided by the number
of VPs in a treebank
• Now we have
– VP(dumped-VBD)-> V(dumped-VBD) NP(sacks-NNS)PP(into-P)
– P(r where dumped is the verb ^ sacks is the head of the NP ^ into is the head of the
PP|VP whose head is dumped-VBD)
– Not likely to have significant counts in any
treebank
10
Challenges for Probabilistic Lexicalized
Grammar
• Huge number of rules
• Most rules are too specific, so it is hard to make good
probability estimates for them
• Need to make more manageable independence
assumptions
• Many approaches have been developed; We’ll look at one
(simplified version)
11
Collins Parser [1997]
• Replaces production rules with a model of
bilexical relationships
• Focus on head and dependency relationship
(see notes in lecture)
• Generate parses in smaller steps; generate
the head, then generate siblings assuming
they are conditionally independent given
the head
12
Dependency Representation
• Represented as an 8 tuple:
(head word, head tag, modifier word, modifier tag,
parent non-terminal, head non-terminal,
modifier non-terminal, direction)
Example CFG rule:
VP(bought, VBD)  V(bought, VBD) NP(book,NN) PP(with,Prep)
Decomposes into two dependencies
(bought, VBD, book, NN, VP, V, NP, right)
(bought, VBD, with, Prep, VP, V, PP, right)
13
Collins: (see lecture)
VP(bought, VBD)  V(bought, VBD) NP(book,NN) PP(with,Prep)
(head word, head tag, modifier word, modifier tag,parent non-terminal, head non-
terminal, modifier non-terminal, direction)
1. Prhead(headNT| parentNT, headword, headtag)x
2. Prleft(modNT, modword, modtag | parentNT, headNT, headword, headtag) x … x
3. Prleft(STOP| parentNT, headNT, headword, headtag)x
4. Prright(modNT, modword, modtag | parentNT, headNT, headword, headtag) x … x
5. Prright(STOP| parentNT, headNT, headword, headtag)
6. Prhead(V| VP, bought, VBD) x
7. Prleft(STOP| VP, V, bought, VBD)x
8. Prright(NP, book, NN | VP, V, bought, VBD) x
9. Prright(PP, with, Prep | VP, V, bought, VBD) x
10. Prright(STOP| VP, V, bought, VBD)
14
Estimating Production Generation Parameters
• Smooth estimates by linearly interpolating with
simpler models conditioned on just POS tag or no
lexical info. Using the version in the text:
smPR(PPin-IN | VPput-VBD) = λ1 PR(PPin-IN | VPput-VBD)
+ (1− λ1) (λ2 PR(PPin-IN | VPVBD) +
(1− λ2) PR(PPin-IN | VP))
15
Missed Context Dependence
• Another problem with CFGs is that which
production is used to expand a non-terminal
is independent of its context.
• However, this independence is frequently
violated for normal grammars.
– NPs that are subjects are more likely to be
pronouns than NPs that are objects.
16
Splitting Non-Terminals
• To provide more contextual information,
non-terminals can be split into multiple new
non-terminals based on their parent in the
parse tree using parent annotation.
– A subject NP becomes NP^S since its parent
node is an S.
– An object NP becomes NP^VP since its parent
node is a VP
17
Parent Annotation Example
18
S
VP
VBD NP
DT Nominal
Nominal PP
liked
IN NP
in
the
dog
NN
DT Nominal
NNthe
pen
NNP
NP
John
^NP
^PP
^Nominal
^Nominal
^NP
^VP
^S^S
^Nominal
^NP
^PP
^Nominal
^NP
^VP^NP
VP^S → VBD^VP NP^VP
Split and Merge
• Non-terminal splitting greatly increases the size of
the grammar and the number of parameters that need
to be learned from limited training data.
• Best approach is to only split non-terminals when it
improves the accuracy of the grammar.
• May also help to merge some non-terminals to
remove some un-helpful distinctions and learn more
accurate parameters for the merged productions.
• Method: Heuristically search for a combination of
splits and merges that produces a grammar that
maximizes the likelihood of the training treebank.
19
20
Treebanks
• English Penn Treebank: Standard corpus for
testing syntactic parsing consists of 1.2 M words
of text from the Wall Street Journal (WSJ).
• Typical to train on about 40,000 parsed sentences
and test on an additional standard disjoint test set
of 2,416 sentences.
• Chinese Penn Treebank: 100K words from the
Xinhua news service.
• Other corpora existing in many languages, see the
Wikipedia article “Treebank”
First WSJ Sentence
21
( (S
(NP-SBJ
(NP (NNP Pierre) (NNP Vinken) )
(, ,)
(ADJP
(NP (CD 61) (NNS years) )
(JJ old) )
(, ,) )
(VP (MD will)
(VP (VB join)
(NP (DT the) (NN board) )
(PP-CLR (IN as)
(NP (DT a) (JJ nonexecutive) (NN director) ))
(NP-TMP (NNP Nov.) (CD 29) )))
(. .) ))
WSJ Sentence with Trace (NONE)
22
( (S
(NP-SBJ (DT The) (NNP Illinois) (NNP Supreme) (NNP Court) )
(VP (VBD ordered)
(NP-1 (DT the) (NN commission) )
(S
(NP-SBJ (-NONE- *-1) )
(VP (TO to)
(VP
(VP (VB audit)
(NP
(NP (NNP Commonwealth) (NNP Edison) (POS 's) )
(NN construction) (NNS expenses) ))
(CC and)
(VP (VB refund)
(NP (DT any) (JJ unreasonable) (NNS expenses) ))))))
(. .) ))
23
Parsing Evaluation Metrics
• PARSEVAL metrics measure the fraction of the
constituents that match between the computed and
human parse trees. If P is the system’s parse tree and T
is the human parse tree (the “gold standard”):
– Recall = (# correct constituents in P) / (# constituents in T)
– Precision = (# correct constituents in P) / (# constituents in P)
• Labeled Precision and labeled recall require getting the
non-terminal label on the constituent node correct to
count as correct.
• F1 is the harmonic mean of precision and recall.
Computing Evaluation Metrics
Correct Tree T
S
VP
Verb NP
Det Nominal
Nominal PP
book
Prep NP
through
Houston
Proper-Noun
the
flight
Noun
Computed Tree P
VP
Verb NP
Det Nominalbook
Prep NP
through
Houston
Proper-Noun
the
flight
Noun
S
VP
PP
# Constituents: 12 # Constituents: 12
# Correct Constituents: 10
Recall = 10/12= 83.3% Precision = 10/12=83.3% F1 = 83.3%
24
25
Treebank Results
• Results of current state-of-the-art systems on the
English Penn WSJ treebank are slightly greater than
90% labeled precision and recall.
Discriminative Parse Reranking
• Motivation: Even when the top-ranked
parse not correct, frequently the correct
parse is one of those ranked highly by a
statistical parser.
• Use a classifier that is trained to select the
best parse from the N-best parses produced
by the original parser.
• Reranker can exploit global features of the
entire parse whereas a PCFG is restricted to
making decisions based on local info. 26
2-Stage Reranking Approach
• Adapt the PCFG parser to produce an N-
best list of the most probable parses in
addition to the most-likely one.
• Extract from each of these parses, a set of
global features that help determine if it is a
good parse tree.
• Train a classifier (e.g. logistic regression)
using the best parse in each N-best list as
positive and others as negative.
27
Parse Reranking
28
sentence
N-Best
Parse Trees
PCFG Parser
Parse Tree
Feature
Extractor
Parse Tree
Descriptions
Parse Tree
ClassifierBest
Parse
Tree
Sample Parse Tree Features
• Probability of the parse from the PCFG.
• The number of parallel conjuncts.
– “the bird in the tree and the squirrel on the ground”
– “the bird and the squirrel in the tree”
• The degree to which the parse tree is right branching.
– English parses tend to be right branching (cf. parse of
“Book the flight through Houston”)
• Frequency of various tree fragments, i.e. specific
combinations of 2 or 3 rules.
29
Evaluation of Reranking
• Reranking is limited by oracle accuracy,
i.e. the accuracy that results when an
omniscient oracle picks the best parse from
the N-best list.
• Typical current oracle accuracy is around
F1=97%
• Reranking can generally improve test
accuracy of current PCFG models a
percentage point or two.
30
Dependency Grammars
• An alternative to phrase-structure grammar is to
define a parse as a directed graph between the
words of a sentence representing dependencies
between the words.
31
liked
John dog
pen
inthe
the
liked
John dog
pen
in
the
the
nsubj dobj
det
det
Typed
dependency
parse
Dependency Graph from Parse Tree
• Can convert a phrase structure parse to a dependency
tree by making the head of each non-head child of a
node depend on the head of the head child.
32
S
VP
VBD NP
DT Nominal
Nominal PP
liked
IN NP
in
the
dog
NN
DT Nominal
NNthe
pen
NNP
NP
John
pen-NN
pen-NN
in-IN
dog-NN
dog-NN
dog-NN
liked-VBD
liked-VBD
John-NNP
liked
John dog
pen
inthe
the
Statistical Parsing Conclusions
• Statistical models such as PCFGs allow for
probabilistic resolution of ambiguities.
• PCFGs can be easily learned from treebanks.
• Lexicalization and non-terminal splitting are
required to effectively resolve many
ambiguities.
• Current statistical parsers are quite accurate but
not yet at the level of human-expert agreement.
33

More Related Content

Similar to Chapter14part2

[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...
[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...
[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...
NAIST Machine Translation Study Group
 
Nlp2
Nlp2Nlp2
Towards OpenLogos Hybrid Machine Translation - Anabela Barreiro
Towards OpenLogos Hybrid Machine Translation - Anabela BarreiroTowards OpenLogos Hybrid Machine Translation - Anabela Barreiro
Towards OpenLogos Hybrid Machine Translation - Anabela Barreiro
INESC-ID (Spoken Language Systems Laboratory - L2F)
 
Retrieving Correct Semantic Boundaries in Dependency Structure
Retrieving Correct Semantic Boundaries in Dependency StructureRetrieving Correct Semantic Boundaries in Dependency Structure
Retrieving Correct Semantic Boundaries in Dependency Structure
Jinho Choi
 
CS571: Phrase Structure Grammar
CS571: Phrase Structure GrammarCS571: Phrase Structure Grammar
CS571: Phrase Structure Grammar
Jinho Choi
 
stats-parsing.ppt
stats-parsing.pptstats-parsing.ppt
stats-parsing.ppt
VAISHNAVIVANKUDOTH
 
stats-parsing.ppt
stats-parsing.pptstats-parsing.ppt
stats-parsing.ppt
naima768128
 
Knowing Your NGS Upstream: Alignment and Variants
Knowing Your NGS Upstream: Alignment and VariantsKnowing Your NGS Upstream: Alignment and Variants
Knowing Your NGS Upstream: Alignment and Variants
Golden Helix Inc
 
RNA sequencing analysis tutorial with NGS
RNA sequencing analysis tutorial with NGSRNA sequencing analysis tutorial with NGS
RNA sequencing analysis tutorial with NGS
HAMNAHAMNA8
 
CL-NLP
CL-NLPCL-NLP
RNASeq Experiment Design
RNASeq Experiment DesignRNASeq Experiment Design
RNASeq Experiment Design
Yaoyu Wang
 
NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...
NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...
NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...
QIAGEN
 
Recursive Neural Networks
Recursive Neural NetworksRecursive Neural Networks
Recursive Neural Networks
Sangwoo Mo
 
N20190729
N20190729N20190729
N20190729
TMU, Japan
 
Bioinformatica t4-alignments
Bioinformatica t4-alignmentsBioinformatica t4-alignments
Bioinformatica t4-alignments
Prof. Wim Van Criekinge
 
Aspect Detection for Sentiment / Emotion Analysis
Aspect Detection for Sentiment / Emotion AnalysisAspect Detection for Sentiment / Emotion Analysis
Aspect Detection for Sentiment / Emotion Analysis
Seth Grimes
 
Bioinformatics t4-alignments wim_vancriekingev2013
Bioinformatics t4-alignments wim_vancriekingev2013Bioinformatics t4-alignments wim_vancriekingev2013
Bioinformatics t4-alignments wim_vancriekingev2013
Prof. Wim Van Criekinge
 
Sequencing run grief counseling: counting kmers at MG-RAST
Sequencing run grief counseling: counting kmers at MG-RASTSequencing run grief counseling: counting kmers at MG-RAST
Sequencing run grief counseling: counting kmers at MG-RAST
wltrimbl
 
Databases short nucletide polymorphism
Databases short nucletide polymorphismDatabases short nucletide polymorphism
Databases short nucletide polymorphism
Iram Wains
 
Efficient Query Processing in Web Search Engines
Efficient Query Processing in Web Search EnginesEfficient Query Processing in Web Search Engines
Efficient Query Processing in Web Search Engines
Simon Lia-Jonassen
 

Similar to Chapter14part2 (20)

[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...
[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...
[Paper Introduction] Efficient Lattice Rescoring Using Recurrent Neural Netwo...
 
Nlp2
Nlp2Nlp2
Nlp2
 
Towards OpenLogos Hybrid Machine Translation - Anabela Barreiro
Towards OpenLogos Hybrid Machine Translation - Anabela BarreiroTowards OpenLogos Hybrid Machine Translation - Anabela Barreiro
Towards OpenLogos Hybrid Machine Translation - Anabela Barreiro
 
Retrieving Correct Semantic Boundaries in Dependency Structure
Retrieving Correct Semantic Boundaries in Dependency StructureRetrieving Correct Semantic Boundaries in Dependency Structure
Retrieving Correct Semantic Boundaries in Dependency Structure
 
CS571: Phrase Structure Grammar
CS571: Phrase Structure GrammarCS571: Phrase Structure Grammar
CS571: Phrase Structure Grammar
 
stats-parsing.ppt
stats-parsing.pptstats-parsing.ppt
stats-parsing.ppt
 
stats-parsing.ppt
stats-parsing.pptstats-parsing.ppt
stats-parsing.ppt
 
Knowing Your NGS Upstream: Alignment and Variants
Knowing Your NGS Upstream: Alignment and VariantsKnowing Your NGS Upstream: Alignment and Variants
Knowing Your NGS Upstream: Alignment and Variants
 
RNA sequencing analysis tutorial with NGS
RNA sequencing analysis tutorial with NGSRNA sequencing analysis tutorial with NGS
RNA sequencing analysis tutorial with NGS
 
CL-NLP
CL-NLPCL-NLP
CL-NLP
 
RNASeq Experiment Design
RNASeq Experiment DesignRNASeq Experiment Design
RNASeq Experiment Design
 
NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...
NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...
NGS Targeted Enrichment Technology in Cancer Research: NGS Tech Overview Webi...
 
Recursive Neural Networks
Recursive Neural NetworksRecursive Neural Networks
Recursive Neural Networks
 
N20190729
N20190729N20190729
N20190729
 
Bioinformatica t4-alignments
Bioinformatica t4-alignmentsBioinformatica t4-alignments
Bioinformatica t4-alignments
 
Aspect Detection for Sentiment / Emotion Analysis
Aspect Detection for Sentiment / Emotion AnalysisAspect Detection for Sentiment / Emotion Analysis
Aspect Detection for Sentiment / Emotion Analysis
 
Bioinformatics t4-alignments wim_vancriekingev2013
Bioinformatics t4-alignments wim_vancriekingev2013Bioinformatics t4-alignments wim_vancriekingev2013
Bioinformatics t4-alignments wim_vancriekingev2013
 
Sequencing run grief counseling: counting kmers at MG-RAST
Sequencing run grief counseling: counting kmers at MG-RASTSequencing run grief counseling: counting kmers at MG-RAST
Sequencing run grief counseling: counting kmers at MG-RAST
 
Databases short nucletide polymorphism
Databases short nucletide polymorphismDatabases short nucletide polymorphism
Databases short nucletide polymorphism
 
Efficient Query Processing in Web Search Engines
Efficient Query Processing in Web Search EnginesEfficient Query Processing in Web Search Engines
Efficient Query Processing in Web Search Engines
 

Recently uploaded

gastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptxgastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptx
Shekar Boddu
 
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Creative-Biolabs
 
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
ABHISHEK SONI NIMT INSTITUTE OF MEDICAL AND PARAMEDCIAL SCIENCES , GOVT PG COLLEGE NOIDA
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Selcen Ozturkcan
 
Discovery of An Apparent Red, High-Velocity Type Ia Supernova at 𝐳 = 2.9 wi...
Discovery of An Apparent Red, High-Velocity Type Ia Supernova at  𝐳 = 2.9  wi...Discovery of An Apparent Red, High-Velocity Type Ia Supernova at  𝐳 = 2.9  wi...
Discovery of An Apparent Red, High-Velocity Type Ia Supernova at 𝐳 = 2.9 wi...
Sérgio Sacani
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
Scintica Instrumentation
 
2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf
lucianamillenium
 
Methods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdfMethods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdf
PirithiRaju
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
Carl Bergstrom
 
Embracing Deep Variability For Reproducibility and Replicability
Embracing Deep Variability For Reproducibility and ReplicabilityEmbracing Deep Variability For Reproducibility and Replicability
Embracing Deep Variability For Reproducibility and Replicability
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
PirithiRaju
 
Holsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdf
Holsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdfHolsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdf
Holsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdf
frank0071
 
23PH301 - Optics - Unit 1 - Optical Lenses
23PH301 - Optics  -  Unit 1 - Optical Lenses23PH301 - Optics  -  Unit 1 - Optical Lenses
23PH301 - Optics - Unit 1 - Optical Lenses
RDhivya6
 
Injection: Risks and challenges - Injection of CO2 into geological rock forma...
Injection: Risks and challenges - Injection of CO2 into geological rock forma...Injection: Risks and challenges - Injection of CO2 into geological rock forma...
Injection: Risks and challenges - Injection of CO2 into geological rock forma...
Oeko-Institut
 
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptxBIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
goluk9330
 
Clinical periodontology and implant dentistry 2003.pdf
Clinical periodontology and implant dentistry 2003.pdfClinical periodontology and implant dentistry 2003.pdf
Clinical periodontology and implant dentistry 2003.pdf
RAYMUNDONAVARROCORON
 
Lattice Defects in ionic solid compound.pptx
Lattice Defects in ionic solid compound.pptxLattice Defects in ionic solid compound.pptx
Lattice Defects in ionic solid compound.pptx
DrRajeshDas
 
Male reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptxMale reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptx
suyashempire
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
Frédéric Baudron
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
frank0071
 

Recently uploaded (20)

gastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptxgastroretentive drug delivery system-PPT.pptx
gastroretentive drug delivery system-PPT.pptx
 
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
Mechanisms and Applications of Antiviral Neutralizing Antibodies - Creative B...
 
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
 
Discovery of An Apparent Red, High-Velocity Type Ia Supernova at 𝐳 = 2.9 wi...
Discovery of An Apparent Red, High-Velocity Type Ia Supernova at  𝐳 = 2.9  wi...Discovery of An Apparent Red, High-Velocity Type Ia Supernova at  𝐳 = 2.9  wi...
Discovery of An Apparent Red, High-Velocity Type Ia Supernova at 𝐳 = 2.9 wi...
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
 
2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf2001_Book_HumanChromosomes - Genéticapdf
2001_Book_HumanChromosomes - Genéticapdf
 
Methods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdfMethods of grain storage Structures in India.pdf
Methods of grain storage Structures in India.pdf
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
 
Embracing Deep Variability For Reproducibility and Replicability
Embracing Deep Variability For Reproducibility and ReplicabilityEmbracing Deep Variability For Reproducibility and Replicability
Embracing Deep Variability For Reproducibility and Replicability
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
 
Holsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdf
Holsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdfHolsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdf
Holsinger, Bruce W. - Music, body and desire in medieval culture [2001].pdf
 
23PH301 - Optics - Unit 1 - Optical Lenses
23PH301 - Optics  -  Unit 1 - Optical Lenses23PH301 - Optics  -  Unit 1 - Optical Lenses
23PH301 - Optics - Unit 1 - Optical Lenses
 
Injection: Risks and challenges - Injection of CO2 into geological rock forma...
Injection: Risks and challenges - Injection of CO2 into geological rock forma...Injection: Risks and challenges - Injection of CO2 into geological rock forma...
Injection: Risks and challenges - Injection of CO2 into geological rock forma...
 
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptxBIRDS  DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
BIRDS DIVERSITY OF SOOTEA BISWANATH ASSAM.ppt.pptx
 
Clinical periodontology and implant dentistry 2003.pdf
Clinical periodontology and implant dentistry 2003.pdfClinical periodontology and implant dentistry 2003.pdf
Clinical periodontology and implant dentistry 2003.pdf
 
Lattice Defects in ionic solid compound.pptx
Lattice Defects in ionic solid compound.pptxLattice Defects in ionic solid compound.pptx
Lattice Defects in ionic solid compound.pptx
 
Male reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptxMale reproduction physiology by Suyash Garg .pptx
Male reproduction physiology by Suyash Garg .pptx
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
 

Chapter14part2

  • 1. Probabilistic Parsing Chapter 14, Part 2 •This slide set was adapted from J. Martin, R. Mihalcea, Rebecca Hwa, and Ray Mooney
  • 2. 2 Vanilla PCFG Limitations • Since probabilities of productions do not rely on specific words or concepts, only general structural disambiguation is possible (e.g. prefer to attach PPs to Nominals). • Consequently, vanilla PCFGs cannot resolve syntactic ambiguities that require semantics to resolve, e.g. ate with fork vs. meatballs. • In order to work well, PCFGs must be lexicalized,
  • 3. Example of Importance of Lexicalization • A general preference for attaching PPs to NPs rather than VPs can be learned by a vanilla PCFG. • But the desired preference can depend on specific words. 3 S → NP VP S → VP NP → Det A N NP → NP PP NP → PropN A → ε A → Adj A PP → Prep NP VP → V NP VP → VP PP 0.9 0.1 0.5 0.3 0.2 0.6 0.4 1.0 0.7 0.3 English PCFG Parser S NP VP John V NP PP put the dog in the pen John put the dog in the pen. 3
  • 4. 4 Example of Importance of Lexicalization • A general preference for attaching PPs to NPs rather than VPs can be learned by a vanilla PCFG. • But the desired preference can depend on specific words. S → NP VP S → VP NP → Det A N NP → NP PP NP → PropN A → ε A → Adj A PP → Prep NP VP → V NP VP → VP PP 0.9 0.1 0.5 0.3 0.2 0.6 0.4 1.0 0.7 0.3 English PCFG Parser S NP VP John V NP put the dog in the pen X John put the dog in the pen. 4
  • 5. 5
  • 6. Head Words • Syntactic phrases usually have a word in them that is most “central” to the phrase. • Linguists have defined the concept of a lexical head of a phrase. • Simple rules can identify the head of any phrase by percolating head words up the parse tree. – Head of a VP is the main verb – Head of an NP is the main noun – Head of a PP is the preposition – Head of a sentence is the head of its VP 6
  • 7. Head propagation in parse trees VP (bought) bought NP (book) the NN (book) book S (bought) the NN (man) man DT (the) V (bought)DT (the) NP (man) 7
  • 8. Lexicalized Productions • Specialized productions can be generated by including the head word and its POS of each non- terminal as part of that non-terminal’s symbol. S VP VBD NP DT Nominal Nominal PP liked IN NP in the dog NN DT Nominal NNthe pen NNP NP John pen-NN pen-NN in-IN dog-NN dog-NN dog-NN liked-VBD liked-VBD John-NNP Nominaldog-NN → Nominaldog-NN PPin-IN 8
  • 9. Lexicalized Productions S VP VP PP DT Nominalput IN NP in the dog NN DT Nominal NNthe pen NNP NP John pen-NN pen-NN in-IN dog-NN dog-NN put-VBD put-VBD John-NNP NPVBD put-VBD VPput-VBD → VPput-VBD PPin-IN 9
  • 10. Parameters • We used to have – VP -> V NP PP P(r|VP) • That’s the count of this rule divided by the number of VPs in a treebank • Now we have – VP(dumped-VBD)-> V(dumped-VBD) NP(sacks-NNS)PP(into-P) – P(r where dumped is the verb ^ sacks is the head of the NP ^ into is the head of the PP|VP whose head is dumped-VBD) – Not likely to have significant counts in any treebank 10
  • 11. Challenges for Probabilistic Lexicalized Grammar • Huge number of rules • Most rules are too specific, so it is hard to make good probability estimates for them • Need to make more manageable independence assumptions • Many approaches have been developed; We’ll look at one (simplified version) 11
  • 12. Collins Parser [1997] • Replaces production rules with a model of bilexical relationships • Focus on head and dependency relationship (see notes in lecture) • Generate parses in smaller steps; generate the head, then generate siblings assuming they are conditionally independent given the head 12
  • 13. Dependency Representation • Represented as an 8 tuple: (head word, head tag, modifier word, modifier tag, parent non-terminal, head non-terminal, modifier non-terminal, direction) Example CFG rule: VP(bought, VBD)  V(bought, VBD) NP(book,NN) PP(with,Prep) Decomposes into two dependencies (bought, VBD, book, NN, VP, V, NP, right) (bought, VBD, with, Prep, VP, V, PP, right) 13
  • 14. Collins: (see lecture) VP(bought, VBD)  V(bought, VBD) NP(book,NN) PP(with,Prep) (head word, head tag, modifier word, modifier tag,parent non-terminal, head non- terminal, modifier non-terminal, direction) 1. Prhead(headNT| parentNT, headword, headtag)x 2. Prleft(modNT, modword, modtag | parentNT, headNT, headword, headtag) x … x 3. Prleft(STOP| parentNT, headNT, headword, headtag)x 4. Prright(modNT, modword, modtag | parentNT, headNT, headword, headtag) x … x 5. Prright(STOP| parentNT, headNT, headword, headtag) 6. Prhead(V| VP, bought, VBD) x 7. Prleft(STOP| VP, V, bought, VBD)x 8. Prright(NP, book, NN | VP, V, bought, VBD) x 9. Prright(PP, with, Prep | VP, V, bought, VBD) x 10. Prright(STOP| VP, V, bought, VBD) 14
  • 15. Estimating Production Generation Parameters • Smooth estimates by linearly interpolating with simpler models conditioned on just POS tag or no lexical info. Using the version in the text: smPR(PPin-IN | VPput-VBD) = λ1 PR(PPin-IN | VPput-VBD) + (1− λ1) (λ2 PR(PPin-IN | VPVBD) + (1− λ2) PR(PPin-IN | VP)) 15
  • 16. Missed Context Dependence • Another problem with CFGs is that which production is used to expand a non-terminal is independent of its context. • However, this independence is frequently violated for normal grammars. – NPs that are subjects are more likely to be pronouns than NPs that are objects. 16
  • 17. Splitting Non-Terminals • To provide more contextual information, non-terminals can be split into multiple new non-terminals based on their parent in the parse tree using parent annotation. – A subject NP becomes NP^S since its parent node is an S. – An object NP becomes NP^VP since its parent node is a VP 17
  • 18. Parent Annotation Example 18 S VP VBD NP DT Nominal Nominal PP liked IN NP in the dog NN DT Nominal NNthe pen NNP NP John ^NP ^PP ^Nominal ^Nominal ^NP ^VP ^S^S ^Nominal ^NP ^PP ^Nominal ^NP ^VP^NP VP^S → VBD^VP NP^VP
  • 19. Split and Merge • Non-terminal splitting greatly increases the size of the grammar and the number of parameters that need to be learned from limited training data. • Best approach is to only split non-terminals when it improves the accuracy of the grammar. • May also help to merge some non-terminals to remove some un-helpful distinctions and learn more accurate parameters for the merged productions. • Method: Heuristically search for a combination of splits and merges that produces a grammar that maximizes the likelihood of the training treebank. 19
  • 20. 20 Treebanks • English Penn Treebank: Standard corpus for testing syntactic parsing consists of 1.2 M words of text from the Wall Street Journal (WSJ). • Typical to train on about 40,000 parsed sentences and test on an additional standard disjoint test set of 2,416 sentences. • Chinese Penn Treebank: 100K words from the Xinhua news service. • Other corpora existing in many languages, see the Wikipedia article “Treebank”
  • 21. First WSJ Sentence 21 ( (S (NP-SBJ (NP (NNP Pierre) (NNP Vinken) ) (, ,) (ADJP (NP (CD 61) (NNS years) ) (JJ old) ) (, ,) ) (VP (MD will) (VP (VB join) (NP (DT the) (NN board) ) (PP-CLR (IN as) (NP (DT a) (JJ nonexecutive) (NN director) )) (NP-TMP (NNP Nov.) (CD 29) ))) (. .) ))
  • 22. WSJ Sentence with Trace (NONE) 22 ( (S (NP-SBJ (DT The) (NNP Illinois) (NNP Supreme) (NNP Court) ) (VP (VBD ordered) (NP-1 (DT the) (NN commission) ) (S (NP-SBJ (-NONE- *-1) ) (VP (TO to) (VP (VP (VB audit) (NP (NP (NNP Commonwealth) (NNP Edison) (POS 's) ) (NN construction) (NNS expenses) )) (CC and) (VP (VB refund) (NP (DT any) (JJ unreasonable) (NNS expenses) )))))) (. .) ))
  • 23. 23 Parsing Evaluation Metrics • PARSEVAL metrics measure the fraction of the constituents that match between the computed and human parse trees. If P is the system’s parse tree and T is the human parse tree (the “gold standard”): – Recall = (# correct constituents in P) / (# constituents in T) – Precision = (# correct constituents in P) / (# constituents in P) • Labeled Precision and labeled recall require getting the non-terminal label on the constituent node correct to count as correct. • F1 is the harmonic mean of precision and recall.
  • 24. Computing Evaluation Metrics Correct Tree T S VP Verb NP Det Nominal Nominal PP book Prep NP through Houston Proper-Noun the flight Noun Computed Tree P VP Verb NP Det Nominalbook Prep NP through Houston Proper-Noun the flight Noun S VP PP # Constituents: 12 # Constituents: 12 # Correct Constituents: 10 Recall = 10/12= 83.3% Precision = 10/12=83.3% F1 = 83.3% 24
  • 25. 25 Treebank Results • Results of current state-of-the-art systems on the English Penn WSJ treebank are slightly greater than 90% labeled precision and recall.
  • 26. Discriminative Parse Reranking • Motivation: Even when the top-ranked parse not correct, frequently the correct parse is one of those ranked highly by a statistical parser. • Use a classifier that is trained to select the best parse from the N-best parses produced by the original parser. • Reranker can exploit global features of the entire parse whereas a PCFG is restricted to making decisions based on local info. 26
  • 27. 2-Stage Reranking Approach • Adapt the PCFG parser to produce an N- best list of the most probable parses in addition to the most-likely one. • Extract from each of these parses, a set of global features that help determine if it is a good parse tree. • Train a classifier (e.g. logistic regression) using the best parse in each N-best list as positive and others as negative. 27
  • 28. Parse Reranking 28 sentence N-Best Parse Trees PCFG Parser Parse Tree Feature Extractor Parse Tree Descriptions Parse Tree ClassifierBest Parse Tree
  • 29. Sample Parse Tree Features • Probability of the parse from the PCFG. • The number of parallel conjuncts. – “the bird in the tree and the squirrel on the ground” – “the bird and the squirrel in the tree” • The degree to which the parse tree is right branching. – English parses tend to be right branching (cf. parse of “Book the flight through Houston”) • Frequency of various tree fragments, i.e. specific combinations of 2 or 3 rules. 29
  • 30. Evaluation of Reranking • Reranking is limited by oracle accuracy, i.e. the accuracy that results when an omniscient oracle picks the best parse from the N-best list. • Typical current oracle accuracy is around F1=97% • Reranking can generally improve test accuracy of current PCFG models a percentage point or two. 30
  • 31. Dependency Grammars • An alternative to phrase-structure grammar is to define a parse as a directed graph between the words of a sentence representing dependencies between the words. 31 liked John dog pen inthe the liked John dog pen in the the nsubj dobj det det Typed dependency parse
  • 32. Dependency Graph from Parse Tree • Can convert a phrase structure parse to a dependency tree by making the head of each non-head child of a node depend on the head of the head child. 32 S VP VBD NP DT Nominal Nominal PP liked IN NP in the dog NN DT Nominal NNthe pen NNP NP John pen-NN pen-NN in-IN dog-NN dog-NN dog-NN liked-VBD liked-VBD John-NNP liked John dog pen inthe the
  • 33. Statistical Parsing Conclusions • Statistical models such as PCFGs allow for probabilistic resolution of ambiguities. • PCFGs can be easily learned from treebanks. • Lexicalization and non-terminal splitting are required to effectively resolve many ambiguities. • Current statistical parsers are quite accurate but not yet at the level of human-expert agreement. 33