Lune

ACL2023顶会

Efficient Semiring-Weighted Earley Parsing

Andreas Opedal, Ran Zmigrod, Tim Vieira, Ryan Cotterell, Jason Eisner

摘要

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 N 3 |G||R| , which is unworkable for the large grammars that arise in natural language processing, to O N 3 |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 N 3 |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 7 All methods in this paper can be also applied directly to lattice parsing, in which i, j, k range over states in an acyclic lattice of possible input strings, and 0 and N refer to the unique initial and final states. A lattice edge from j to k labeled with terminal a is then encoded by the axiom [j, k, a]. 8 Assuming that all nonterminals B ∈ N are generating, i.e., ∃x ′ ∈ Σ * such that B * ⇒ x ′ . To ensure this, repeatedly mark B ∈ N as generating whenever R contains some B → ρ such that all nonterminals in ρ are already marked as generating. Then delete any unmarked nonterminals and their rules. 9 Earley (1970) also generalized the algorithm to prove this item only if it can appear in a proof of some string that begins with x 0:(j+∆) , for a fixed ∆. This is lookahead of ∆ tokens.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlo 引用了 Constrained Language Models Yield Few-Shot Semantic Parsers
  • The Whole Truth and Nothing But the Truth: Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained Decoding 引用了 Constrained Language Models Yield Few-Shot Semantic Parsers
  • Earley-Driven Dynamic Pruning for Efficient Structured Decoding 引用了 The Whole Truth and Nothing But the Truth: Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained Decoding
  • Earley-Driven Dynamic Pruning for Efficient Structured Decoding 引用了 Constrained Language Models Yield Few-Shot Semantic Parsers
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Syntactic and Semantic Control of Large Language Models via Sequential Monte CarloJoão Loula, Benjamin LeBrun, Li Du, Ben Lipkin 等ICLR 2025
  2. An Exploration of Left-Corner TransformationsAndreas Opedal, Eleftheria Tsipidi, Tiago Pimentel, Ryan Cotterell 等EMNLP 2023
  3. Earley-Driven Dynamic Pruning for Efficient Structured DecodingXintong Sun, Chi Wei, Minghao Tian, Shiwen NiICML 2025

它引用的 Paper3

  1. Constrained Language Models Yield Few-Shot Semantic ParsersRichard Shin, Christopher H. Lin, Sam Thomson, Charles Chen 等EMNLP 2021 · 131 次引用
  2. Neural Datalog Through Time: Informed Temporal Modeling via Logical SpecificationHongyuan Mei, Guanghui Qin, Minjie Xu, Jason EisnerICML 2020 · 21 次引用
  3. The Whole Truth and Nothing But the Truth: Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained DecodingHao Fang, Anusha Balakrishnan, Harsh Jhamtani, John Bufe 等ACL Findings 2023 · 2 次引用

相关 Paper

  1. Faster general parsing through context-free memoizationGrzegorz HermanPLDI 2020 · 4 次引用
  2. Algorithms for Weighted Pushdown AutomataAlexandra Butoi, Brian DuSell, Tim Vieira, Ryan Cotterell 等EMNLP 2022 · 2 次引用
  3. Zippy LL(1) parsing with derivativesRomain Edelmann, Jad Hamza, Viktor KuncakPLDI 2020 · 13 次引用
  4. A Root of a Problem: Optimizing Single-Root Dependency ParsingMilos Stanojevic, Shay B. CohenEMNLP 2021 · 5 次引用
  5. Approximating CKY with TransformersGhazal Khalighinejad, Ollie Liu, Sam WisemanEMNLP Findings 2023
黄昏的海面,两侧是细线勾勒的悬崖