1 / 13

Left-Corner Grammar Transform and Incremental Parsing

Left-Corner Grammar Transform and Incremental Parsing. Aria Haghighi. Grammar Transform. A CFG G Nonterminals N Terminals T Productions (Rules) P A grammar Transform : G ! G’. Parsing Strategies. Bottom-Up e.g. CKY Top-Down Inefficient and may not terminate

freira
Download Presentation

Left-Corner Grammar Transform and Incremental Parsing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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-Corner’s 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 • It’s 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

More Related