Efficient Semiring-Weighted Earley Parsing

7Citations
Citations of this article
17Readers
Mendeley users who have this article in their library.
Get full text

Abstract

This paper provides a reference description, in the form of a deduction system, of Earley's (1970) context-free parsing algorithm with various speed-ups. Our presentation includes a known worst-case runtime improvement from Earley's O(N3|G||R|), which is unworkable for the large grammars that arise in natural language processing, to O(N3|G|), which matches the runtime of CKY on a binarized version of the grammar G. Here N is the length of the sentence, |R| is the number of productions in G, and |G| is the total length of those productions. We also provide a version that achieves runtime of O(N3|M|) with |M| ≤ |G| when the grammar is represented compactly as a single finite-state automaton M (this is partly novel). We carefully treat the generalization to semiring-weighted deduction, preprocessing the grammar like Stolcke (1995) to eliminate deduction cycles, and further generalize Stolcke's method to compute the weights of sentence prefixes. We also provide implementation details for efficient execution, ensuring that on a preprocessed grammar, the semiring-weighted versions of our methods have the same asymptotic runtime and space requirements as the unweighted methods, including sub-cubic runtime on some grammars. https://github.com/rycolab/earleys-algo.

Cite

CITATION STYLE

APA

Opedal, A., Zmigrod, R., Vieira, T., Cotterell, R., & Eisner, J. (2023). Efficient Semiring-Weighted Earley Parsing. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (Vol. 1, pp. 3687–3713). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2023.acl-long.204

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free