An Exploration of Left-Corner Transformations
Preprint
Abstract
The left-corner transformation (Rosenkrantz and Lewis, 1970) is used to remove left recursion from context-free grammars, which is an important step towards making the grammar parsable top-down with simple techniques. This paper generalizes prior left-corner transformations to support semiring-weighted production rules and to provide finer-grained control over which left corners may be moved. Our generalized left-corner transformation (GLCT) arose from unifying the left-corner transformation and speculation transformation (Eisner and Blatz, 2007), originally for logic programming. Our new transformation and speculation define equivalent weighted languages. Yet, their derivation trees are structurally different in an important way: GLCT replaces left recursion with right recursion, and speculation does not. We also provide several technical results regarding the formal relationships between the outputs of GLCT, speculation, and the original grammar. Lastly, we empirically investigate the efficiency of GLCT for left-recursion elimination from grammars of nine languages.Keywords
All Related Versions
This publication has 31 references indexed in Scilit:
- On quotients of formal power seriesInformation and Computation, 2022
- Neurophysiological dynamics of phrase-structure building during sentence processingProceedings of the National Academy of Sciences, 2017
- Typed Transformations of Typed Grammars: The Left Corner TransformElectronic Notes in Theoretical Computer Science, 2010
- Semirings and Formal Power Series2009
- Computing Partition Functions of PCFGsResearch on Language and Computation, 2008
- An Extension of Newton’s Method to ω-Continuous Semirings2007
- Memory requirements and local ambiguities of parsing strategiesJournal of Psycholinguistic Research, 1991
- Context-free grammars: Covers, normal forms, and parsingLecture Notes in Computer Science, 1980
- Proving Properties of Programs by Structural InductionThe Computer Journal, 1969
- On certain formal properties of grammarsInformation and Control, 1959