LeftCorner Grammar Transform and Incremental Parsing PowerPoint PPT Presentation

presentation player overlay
1 / 13
About This Presentation
Transcript and Presenter's Notes

Title: LeftCorner Grammar Transform and Incremental Parsing


1
Left-Corner Grammar TransformandIncremental
Parsing
  • Aria Haghighi

2
Grammar Transform
  • A CFG G
  • Nonterminals N
  • Terminals T
  • Productions (Rules) P
  • A grammar Transform
  • G ! G

3
Parsing Strategies
  • Bottom-Up
  • e.g. CKY
  • Top-Down
  • Inefficient and may not terminate
  • Left-Corner
  • Recognize Left-Child predict parent

4
Left-Corners Arch-Nemesis
  • Left recursion
  • X ! X ?
  • Nontermination
  • Recognize X starting at position 1
  • Recognize X starting at position 1
  • Recognize X starting at position 1
  • Recognize X starting at position 1
  • ..

5
Old School Left-Recursion Removal
  • Due to Hopcraft and Ullman
  • For
  • A ! ?1 ?m (?i ? A ?)
  • A ! A ?1 A ?k (?i ? ?)
  • Add
  • A ! ?1 ?1 A?m ?m A
  • A ! ?1 ?1 A . ?k ?k A

6
Problem with the old school
  • Its a big school!!
  • Can have exponential
  • Blowup in number of productions
  • PCFG Estimation
  • Lots of sparse rules

7
Select Left-Corner Transform
  • Left-corner productions L
  • Add states D-X

8
Example Transform
9
Keeping it Small
  • Do we need each D-X ?
  • Only if D !L X ?
  • How do we choose L ?
  • Need all left recursive rules
  • Suffice to have rules where
  • first child is a non-terminal

10
Binarizing the Output
For Top-Down Rules (td)
For Left-Corner Rules (lc)
11
Grammar Sizes
12
Incremental Parsing
13
Incremental Parsing
  • Operate on flattened selective left-corner
    algorithm
  • Partial Parses include left-chain with heuristic
    filtering
  • Beam Search
Write a Comment
User Comments (0)
About PowerShow.com