2022 · 10 citations · 20 references
ComputingComputer ScienceComputational LinguisticsNatural Language ProcessingSyntaxAnnotationContext-free LanguagesGrammarLanguage ModelingText PreprocessingContext-free GrammarsUnambiguous Context-free Grammar
We introduce annotated grammars, an extension of context-free grammars which allows annotations on terminals. Our model extends the standard notion of regular spanners, and is more expressive than the extraction grammars recently introduced by Peterfreund. We study the enumeration problem for annotated grammars: fixing a grammar, and given a string as input, enumerate all annotations of the string that form a word derivable from the grammar. Our first result is an algorithm for unambiguous annotated grammars, which preprocesses the input string in cubic time and enumerates all annotations with output-linear delay. This improves over Peterfreund's result, which needs quintic time preprocessing to achieve this delay bound. We then study how we can reduce the preprocessing time while keeping the same delay bound, by making additional assumptions on the grammar. Specifically, we present a class of grammars which only have one derivation shape for all outputs, for which we can enumerate with quadratic time preprocessing. We also give classes that generalize regular spanners for which linear time preprocessing suffices.
20
Transductions and Context-Free Languages
Jean Berstel · 1979 · 1.3K citations
Making data structures persistent
James R. Driscoll, Neil Sarnak, Daniel D. Sleator et al. · 1986 · 704 citations
Rajeev Alur, P. Madhusudan · 2004 · 555 citations · Full text
Ambiguity in context free languages
Seymour Ginsburg, Joseph S. Ullian · Journal of the ACM · 1966 · 132 citations · Full text
Answering Conjunctive Queries under Updates
Christoph Berkholz, Jens Keppeler, Nicole Schweikardt · 2017 · 100 citations