lect12-pcfg.key - Probabilistic Context Free Grammars...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Probabilistic Context Free Grammars Lecture #14 Computational Linguistics CMPSCI 591N, Spring 2006 Andrew McCallum (including slides from Jason Eisner) ndrew McCallum, UMass Ambiguity in Parsing Time flies like an arrow. Fruit flies like a banana. I saw the man with the telescope. ndrew McCallum, UMass How to solve this combinatorial explosion of ambiguity? 1. First try parsing without any weird rules, throwing them in only if needed. 2. Better: every rule has a weight. A trees weight is total weight of all its rules. Pick the overall lightest parse of sentence. 3. Can we pick the weights automatically? Well get to this later ndrew McCallum, UMass CYK Parser Input: A string of words, grammar in CNF Output: yes/no Data structure: n x n table rows labeled 0 to n-1, columns 1 to n cell (i,j) lists constituents spanning i,j For each i from 1 to n Add to (i-1,i) all Nonterminals that could produce the word at (i-1,i) time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP ndrew McCallum, UMass CYK Parser For width from 2 to n For start from 0 to n-width Define end to be start+width For mid from start+1 to end-1 For every constituent in ( start, mid ) For every constituent in ( mid,end ) For all ways of combining them (if any) Add the resulting constituent to ( start,end ). time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 NP 10 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 NP 10 S 8 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 NP 10 S 8 S 13 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 NP 10 S 8 S 13 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 NP 10 S 8 S 13 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 NP 10 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP time 1 fies 2 like 3 an 4 arrow 5 NP 3 Vst 3 NP 10 S 8 S 13 1 NP 4 VP 4 2 P 2 V 5 3 Det 1 NP 10 4 N 8 1 S NP VP 6 S Vst NP 2 S S PP 1 VP V NP 2 VP VP PP 1 NP Det N 2 NP NP PP 3 NP NP NP 0 PP P NP time...
View Full Document

Page1 / 60

lect12-pcfg.key - Probabilistic Context Free Grammars...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online