|
{ |
|
"paper_id": "P02-1015", |
|
"header": { |
|
"generated_with": "S2ORC 1.0.0", |
|
"date_generated": "2023-01-19T09:30:45.015892Z" |
|
}, |
|
"title": "Parsing Non-Recursive Context-Free Grammars", |
|
"authors": [ |
|
{ |
|
"first": "Mark-Jan", |
|
"middle": [], |
|
"last": "Nederhof", |
|
"suffix": "", |
|
"affiliation": { |
|
"laboratory": "", |
|
"institution": "University of Groningen", |
|
"location": { |
|
"postBox": "P.O. Box 716", |
|
"postCode": "NL-9700 AS", |
|
"settlement": "Groningen", |
|
"country": "The Netherlands" |
|
} |
|
}, |
|
"email": "" |
|
}, |
|
{ |
|
"first": "Giorgio", |
|
"middle": [], |
|
"last": "Satta", |
|
"suffix": "", |
|
"affiliation": {}, |
|
"email": "[email protected]" |
|
} |
|
], |
|
"year": "", |
|
"venue": null, |
|
"identifiers": {}, |
|
"abstract": "We consider the problem of parsing non-recursive context-free grammars, i.e., context-free grammars that generate finite languages. In natural language processing, this problem arises in several areas of application, including natural language generation, speech recognition and machine translation. We present two tabular algorithms for parsing of non-recursive context-free grammars, and show that they perform well in practical settings, despite the fact that this problem is PSPACEcomplete.", |
|
"pdf_parse": { |
|
"paper_id": "P02-1015", |
|
"_pdf_hash": "", |
|
"abstract": [ |
|
{ |
|
"text": "We consider the problem of parsing non-recursive context-free grammars, i.e., context-free grammars that generate finite languages. In natural language processing, this problem arises in several areas of application, including natural language generation, speech recognition and machine translation. We present two tabular algorithms for parsing of non-recursive context-free grammars, and show that they perform well in practical settings, despite the fact that this problem is PSPACEcomplete.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Abstract", |
|
"sec_num": null |
|
} |
|
], |
|
"body_text": [ |
|
{ |
|
"text": "Several applications in natural language processing require \"parsing\" of a large but finite set of candidate strings. Here parsing means some computation that selects those strings out of the finite set that are wellformed according to some grammar, or that are most likely according to some language model. In these applications, the finite set is typically encoded in a compact way as a context-free grammar (CFG) that is non-recursive. This is motivated by the fact that non-recursive CFGs allow very compact representations for finite languages, since the strings derivable from single nonterminals may be substrings of many different strings in the language. Unfolding such a grammar and parsing the generated strings \u00a1 Secondary affiliation is the German Research Center for Artificial Intelligence (DFKI).", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Introduction", |
|
"sec_num": "1" |
|
}, |
|
{ |
|
"text": "one by one then leads to an unnecessary duplication of subcomputations, since each occurrence of a repeated substring has to be independently parsed. As this approach may be prohibitively expensive, it is preferable to find a parsing algorithm that shares subcomputations among different strings by working directly on the nonterminals and the rules of the non-recursive CFG. In this way, \"parsing\" a nonterminal of the grammar amounts to shared parsing of all the substrings encoded by that nonterminal.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Introduction", |
|
"sec_num": "1" |
|
}, |
|
{ |
|
"text": "To give a few examples, in some natural language generation systems (Langkilde, 2000) nonrecursive CFGs are used to encode very large sets of candidate sentences realizing some input conceptual representation (Langkilde calls such grammars forests). Each CFG is later \"parsed\" using a language model, in order to rank the sentences in the set according to their likelyhood. Similarly, in some approaches to automatic speech understanding (Corazza and Lavelli, 1994) the \u00a2 -best sentences obtained from the speech recognition module are \"compressed\" into a non-recursive CFG grammar, which is later provided as input to a parser. Finally, in some machine translation applications related techniques are exploited to obtain sentences that simultaneously realize two different conceptual representations (Knight and Langkilde, 2000) . This is done in order to produce translations that preserve syntactic or semantic ambiguity in cases where the ambiguity could not be resolved when processing the source sentence.", |
|
"cite_spans": [ |
|
{ |
|
"start": 68, |
|
"end": 85, |
|
"text": "(Langkilde, 2000)", |
|
"ref_id": "BIBREF5" |
|
}, |
|
{ |
|
"start": 438, |
|
"end": 465, |
|
"text": "(Corazza and Lavelli, 1994)", |
|
"ref_id": "BIBREF1" |
|
}, |
|
{ |
|
"start": 801, |
|
"end": 829, |
|
"text": "(Knight and Langkilde, 2000)", |
|
"ref_id": "BIBREF4" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Introduction", |
|
"sec_num": "1" |
|
}, |
|
{ |
|
"text": "To be able to describe the above applications in an abstract way, let us first fix some terminology. The term \"recognition\" refers to the process of deciding whether an input string is in the language described by a grammar, the parsing grammar \u00a3 \u00a5 \u00a4 . We will generalize this notion in a natural way to input representing a set of strings, and here the goal of recognition is to decide whether at least one of the strings in the set is in the language described by", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Introduction", |
|
"sec_num": "1" |
|
}, |
|
{ |
|
"text": ". If the input is itself given in the form of a grammar, the input grammar \u00a3 \u00a7", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ", then recognition amounts to determining whether the intersection of the languages described by", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "\u00a3 \u00a7 and \u00a3 \u00a9 \u00a4", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "is non-empty. In this paper we use the term parsing as synonymous to recognition, since the recognition algorithms we present can be easily extended to yield parse trees (with associated probabilities if either", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "\u00a3 \u00a7 or \u00a3 \u00a9 \u00a4 or both are probabilistic).", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "In what follows we consider the case where both", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "\u00a3 \u00a9 \u00a4 and \u00a3 \u00a7", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "are CFGs. General CFGs have unfavourable computational properties with respect to intersection. In particular, the problem of deciding whether the intersection of two CFGs is non-empty is undecidable (Harrison, 1978) . Following the terminology adopted above, this means that parsing a context-free input grammar", |
|
"cite_spans": [ |
|
{ |
|
"start": 200, |
|
"end": 216, |
|
"text": "(Harrison, 1978)", |
|
"ref_id": "BIBREF3" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a6 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "on the basis of a context-free parsing grammar \u00a3 \u00a6 \u00a4 is not possible in general.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "One way to make the parsing problem decidable is to place some additional restrictions on", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "\u00a3 \u00a7 or \u00a3 \u00a9 \u00a4", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". This direction is taken by Langkilde (2000) , where", |
|
"cite_spans": [ |
|
{ |
|
"start": 29, |
|
"end": 45, |
|
"text": "Langkilde (2000)", |
|
"ref_id": "BIBREF5" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "is a non-recursive CFG and", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "represents a regular language, more precisely an \u00a2 -gram model. In this way the problem can be solved using a stochastic variant of an algorithm presented by Bar-Hillel et al. (1964) , where it is shown that the intersection of a general context-free language and a regular language is still context-free.", |
|
"cite_spans": [ |
|
{ |
|
"start": 158, |
|
"end": 182, |
|
"text": "Bar-Hillel et al. (1964)", |
|
"ref_id": "BIBREF0" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "In the present paper we leave the theoretical framework of Bar-Hillel et al. (1964) , and consider parsing grammars \u00a3 \u00a5 \u00a4 that are unrestricted CFGs, and input grammars \u00a3 \u00a7 that are non-recursive context-free grammars. In this case the parsing (intersection) problem becomes PSPACE-complete. 1 Despite of this unfavourable theoretical result, algorithms for the problem at hand have been proposed in the literature and are currently used in practical applications. In (Knight and Langkilde, 2000) \u00a3 \u00a7", |
|
"cite_spans": [ |
|
{ |
|
"start": 59, |
|
"end": 83, |
|
"text": "Bar-Hillel et al. (1964)", |
|
"ref_id": "BIBREF0" |
|
}, |
|
{ |
|
"start": 468, |
|
"end": 496, |
|
"text": "(Knight and Langkilde, 2000)", |
|
"ref_id": "BIBREF4" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "is 1 The PSPACE-hardness result has been shown by Harry B. Hunt III and Dan Rosenkrantz (Harry B. Hunt III, p.c.). Membership in PSPACE is shown by Nederhof and Satta (2002) .", |
|
"cite_spans": [ |
|
{ |
|
"start": 3, |
|
"end": 4, |
|
"text": "1", |
|
"ref_id": null |
|
}, |
|
{ |
|
"start": 148, |
|
"end": 173, |
|
"text": "Nederhof and Satta (2002)", |
|
"ref_id": "BIBREF6" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "unfolded into a lattice (acyclic finite automaton) and later parsed with \u00a3 \u00a5 \u00a4 using an algorithm close to the one by Bar-Hillel et al. (1964) . The algorithm proposed by Corazza and Lavelli (1994) involves copying of charts, and this makes it very similar in behaviour to the former approach. Thus in both algorithms parts of the input grammar \u00a3 \u00a7 are copied where a nonterminal occurs more than once, which destroys the compactness of the representation. In this paper we propose two alternative tabular algorithms that exploit the compactness of \u00a3 \u00a7", |
|
"cite_spans": [ |
|
{ |
|
"start": 118, |
|
"end": 142, |
|
"text": "Bar-Hillel et al. (1964)", |
|
"ref_id": "BIBREF0" |
|
}, |
|
{ |
|
"start": 171, |
|
"end": 197, |
|
"text": "Corazza and Lavelli (1994)", |
|
"ref_id": "BIBREF1" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "as much as possible. Although a limited amount of copying is also done by our algorithms, this never happens in cases where the resulting structure is ungrammatical with respect to the parsing grammar \u00a3 \u00a4 . The structure of this paper is as follows. In Section 2 we introduce some preliminary definitions, followed in Section 3 by a first algorithm based on CKY parsing. A more sophisticated algorithm, satisfying the equivalent of the correct-prefix property and based on Earley's algorithm, is presented in Section 4. Section 5 presents our experimental results and Section 6 closes with some discussion.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a4", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "In this section we briefly recall some standard notions from formal language theory. For more details we refer the reader to textbooks such as (Harrison, 1978) .", |
|
"cite_spans": [ |
|
{ |
|
"start": 143, |
|
"end": 159, |
|
"text": "(Harrison, 1978)", |
|
"ref_id": "BIBREF3" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Preliminaries", |
|
"sec_num": "2" |
|
}, |
|
{ |
|
"text": "A context-free grammar is a 4-tuple ", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Preliminaries", |
|
"sec_num": "2" |
|
}, |
|
{ |
|
"text": "! \" # % $ ,", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Preliminaries", |
|
"sec_num": "2" |
|
}, |
|
{ |
|
"text": "& , @ A C B D B C B d enote nonterminals, E , F G C B D B D B d e- note terminals, H , I , )", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Preliminaries", |
|
"sec_num": "2" |
|
}, |
|
{ |
|
"text": "are strings in 6 P 7 3 $ and Q S R are strings in . We also assume that each CFG is reduced, i.e., no CFG contains nonterminals that do not occur in any derivation of a string in the language. Furthermore, we assume that the input grammars do not contain epsilon rules and that there is only one rule", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Preliminaries", |
|
"sec_num": "2" |
|
}, |
|
{ |
|
"text": "defining the start symbol . 2 Finally, in Section 3 we will consider parsing gram-mars in Chomsky normal form (CNF), i.e., grammars with rules of the form", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "& ( ' V @ X W or & ( ' U E", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". Instead of working with non-recursive CFGs, it will be more convenient in the specification of our algorithms to encode \u00a3 \u00a7 as a push-down automaton (PDA) with stack size bounded by some constant. Unlike many text-books, we assume PDAs do not have states; this is without loss of generality, since states can be encoded in the symbols that occur topmost on the stack. Thus, a PDA is a 5-tuple ", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "\u1ef2 a b c e d C c g f b i h d G p S q r $ ,", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b i h d G p S q", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ", and r is the set of transitions, having one of the following three forms:", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b u t ' b w v (a push transition), b w v x t ' y (a pop transition), or b t ' v", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "(a scan transition, scanning symbol E ). Throughout this paper we use the following conventions: ", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "4 b v", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b A c i d C c g f S R $ b i h d G p S q f $ .", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "T ' U )", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "In this section we present our first parsing algorithm, based on the so-called CKY algorithm (Harrison, 1978) and exploiting a decomposition of computations of PDAs cast in a specific form. We start with a construction that translates the non-recursive input CFG", |
|
"cite_spans": [ |
|
{ |
|
"start": 93, |
|
"end": 109, |
|
"text": "(Harrison, 1978)", |
|
"ref_id": "BIBREF3" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "The CKY algorithm", |
|
"sec_num": "3" |
|
}, |
|
{ |
|
"text": "into a PDA accepting the same language. Let ", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "\u00a3 \u00a7 d 6 A \" # % $ . The PDA associated with \u00a3 \u00a7 is specified as A Y a k j l 8 ' 0 m ) G n k j o T ' 0 ) p m G n q r $", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "j& ( ' U H z m \u00cb I t n t ' w j& ( ' U H \u1ebc m I t n .", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "Observe that for all PDAs constructed as above, no push transition can be immediately followed by a pop transition, i.e., there are no stack symbols", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b , v and y such that b t ' b w v and b w v 0 t ' y", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". As a consequence of this, a computation", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b c e d C c s f R $ b | h d G p S q f $", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "of the PDA can always and uniquely be decomposed into consecutive subcomputations, which we call segments, each starting with zero or more push transitions, followed by a single scan transition and by zero or more pop transitions. In what follows, we will formalize this basic idea and exploit it within our parsing algorithm.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "We write d {", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "to indicate that there is a computation 9 S E $ 9 f $", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "of the PDA such that all of the following three conditions hold:", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "(i) either \u00a6 d P or \u00a5 d r ;", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "(ii) the computation starts with zero or more push transitions, followed by one scan transition reading E and by zero or more pop transitions;", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "(iii) if \u00a6 then the top-most symbol of must be in the right-hand side of a pop or scan transition (i.e., top-most in the stack at the end of a previous segment) and if \u00a6 t", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ", then the topmost symbol of must be the left-hand side of a push or scan transition (i.e., top-most in the stack at the beginning of a following segment).", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "Let 6 d r b c e d C c g f 7 y b v j b w v y t ' y \u00a9 n 7 v b S E j b t ' v n", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ", and", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "9 d V b i h d G p S q 7 b v j b x t ' b w v n 7 b v E { j b t ' v n", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". A formal definition of relation above is provided in Figure 1 by means of a deduction system. We assign a procedural interpretation to such a system following Shieber et al. (1995) , resulting in an algorithm for the computation of the relation.", |
|
"cite_spans": [ |
|
{ |
|
"start": 161, |
|
"end": 182, |
|
"text": "Shieber et al. (1995)", |
|
"ref_id": "BIBREF7" |
|
} |
|
], |
|
"ref_spans": [ |
|
{ |
|
"start": 55, |
|
"end": 63, |
|
"text": "Figure 1", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "We now turn to an important property of segments. Any computation", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b c i d C c g f S E { C D E $ b | h d G p S q f $ , , can be computed by combining b d { v b t ' v (1) b d { v d y \u00a1 t ' \u00a2 b v r t ' \u00a3 y (2) b d v b d { y \u00a1 v \u00a4 t ' \u00a2 y b 1 w 6 (3) b d v d v \u00a1 t ' \u00a2 b v 1 \u00a5 9", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "(4) Figure 1 : Inference rules for the computation of relation", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 4, |
|
"end": 12, |
|
"text": "Figure 1", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "EQUATION", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [ |
|
{ |
|
"start": 0, |
|
"end": 8, |
|
"text": "EQUATION", |
|
"ref_id": "EQREF", |
|
"raw_str": ". b d { X \u00a6 v \u00a1 b d v b 1 \u00a5 6 \u00a7 v 1 8 \u00a9 (5) \u00aa d { X \u00a6 \u00ac \u00ab d { X \u00a6 \u00a5 \u00a4 \u00aa \u00ae \u00ab d \u00a6 (6) \u00aa d \u00a6 \u00ac \u00ab d \u00a6 z \u00a4 \u00aa q \u00ab d { X \u00a6 w", |
|
"eq_num": "(7)" |
|
} |
|
], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "Figure 2: Inference rules for combining segments", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "\u00a7 q d \u00a7 . segments represented by \" \u00a7 q d { \u00a7 , %\u00b0 \u00b1 |\u00b0 , with d b c e d C c g f , d b i h d G p S q , and for A\u00b0 r \u00b1 2 , \u00a7 is a suffix of \" \u00a7 \u00a6 or ! \u00a7 \u00a6 is a suffix of \u00a7", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". This is done by the deduction system given in Figure 2 , which defines the relation d { \u00a6", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 48, |
|
"end": 56, |
|
"text": "Figure 2", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". The second sidecondition of inference rule (5) checks whether a segment", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b d { v", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "may border on other segments, or may be the first or last segment in a computation. . Note that segments ! \u00a7 q d { \u00a7", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "abstract away from the stack symbols that are pushed and then popped again. Furthermore, in the context of the whole computation, segments abstract away from stack symbols that are not accessed during a subcomputation. As an example, the shaded area labelled III represents segment", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "v v \u00b3 d { y , for certain stack symbols v , v \u00b3 and y", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ", and this abstracts away from the stack symbols that may occur below v and y . Figure 4 illustrates how two adjacent segments are combined. The dashed box in the left-hand side of the picture represents stack symbols from the right edge of segment II that need not be explicitly represented by segment III, as discussed above. We may assume that these symbols exist, so that II and III can be combined into the larger computation in the right-hand side of the picture. Note that if a com-", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 80, |
|
"end": 88, |
|
"text": "Figure 4", |
|
"ref_id": "FIGREF1" |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "putation \u00ab d { X \u00a6", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "is obtained as the combination of two segments as in Figure 4 , then some internal details of these segments are abstracted away, i.e., stack elements that were pushed and again popped in the combined computation are no longer recorded. This abstraction is a key feature of the parsing algorithm to be presented next, in that it considerably reduces the time complexity as compared with that of an algorithm that investigates all computations of the PDA in isolation.", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 53, |
|
"end": 61, |
|
"text": "Figure 4", |
|
"ref_id": "FIGREF1" |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "We are now ready to present our parsing algorithm, which is the main result of this section. The algorithm combines the deduction system in Fig ", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 140, |
|
"end": 143, |
|
"text": "Fig", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "EQUATION", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [ |
|
{ |
|
"start": 0, |
|
"end": 8, |
|
"text": "EQUATION", |
|
"ref_id": "EQREF", |
|
"raw_str": "j& i b \u00ba v n \u00bc \u00bb \u00bd \u00be \u00bd \u00bf b d { v b 1 \u00a5 6 \u00a7 v 1 \u00a5 \u00a9 & ( ' U E (8) j o @ 3 S 9 ! n j l W \u00ba 9 n j& | S 9 n & h ' V @ X W (9) j@ 3 S 9 ! n j o W 9 n j& | \u00b9 n & ' \u00a2 @ \u00c0 W", |
|
"eq_num": "(10)" |
|
} |
|
], |
|
"section": "\u00a3 \u00a7", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "The CKY algorithm from Figure 5 can be seen to filter out a selection of the computations that may be derived by the deduction system from Figure 2 . One may however be even more selective in determining which computations of the PDA to consider. The basis for the algorithm in this section is Earley's algorithm (Earley, 1970) . This algorithm differs from the CKY algorithm in that it satisfies the correct-prefix property (Harrison, 1978) .", |
|
"cite_spans": [ |
|
{ |
|
"start": 313, |
|
"end": 327, |
|
"text": "(Earley, 1970)", |
|
"ref_id": "BIBREF2" |
|
}, |
|
{ |
|
"start": 425, |
|
"end": 441, |
|
"text": "(Harrison, 1978)", |
|
"ref_id": "BIBREF3" |
|
} |
|
], |
|
"ref_spans": [ |
|
{ |
|
"start": 23, |
|
"end": 31, |
|
"text": "Figure 5", |
|
"ref_id": null |
|
}, |
|
{ |
|
"start": 139, |
|
"end": 147, |
|
"text": "Figure 2", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "Earley's algorithm", |
|
"sec_num": "4" |
|
}, |
|
{ |
|
"text": "The new algorithm is presented by Figure 6 . There are now two types of item involved. The first item has the form", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 34, |
|
"end": 42, |
|
"text": "Figure 6", |
|
"ref_id": "FIGREF2" |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "Earley's algorithm", |
|
"sec_num": "4" |
|
}, |
|
{ |
|
"text": "j& 0 ' H \u00c2 m X I \u00c2 \u00c3 9 \u00c2 \u00c3 \u00a5 ! n , where & \u00a3 ' H \u00c4 m \u00c5 I", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Earley's algorithm", |
|
"sec_num": "4" |
|
}, |
|
{ |
|
"text": "has the same role as the dotted rules in Earley's original algorithm. The second and third components are stacks of the PDA as before, but these stacks now contain a distinguished position, indicated by", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Earley's algorithm", |
|
"sec_num": "4" |
|
}, |
|
{ |
|
"text": ". ", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "\u00c3", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". This is quite similar to the meaning we assigned to the items of the CKY algorithm, but here not all stack symbols in and are involved in this computation: only the symbols in and are now accessed, while all symbols in remain unaffected. The portion of the stack represented by is needed to ensure the correct-prefix property in subsequent computations following from this item, in case all of the symbols in are popped.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "The correct-prefix property is ensured in the following sense. The second type of item has the form", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "EQUATION", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [ |
|
{ |
|
"start": 0, |
|
"end": 8, |
|
"text": "EQUATION", |
|
"ref_id": "EQREF", |
|
"raw_str": "j& ( ' U H z m @ x I \u00c7 \u00c9 9 b n j@ r ' 0 m a ) q 5 \u00c3 b \u00ba 5 \u00c3 b } i \u00ca \u00c9 n j& ( ' U H z m @ x I % C 9 \u00ba b G | \u00ca C n (19) j& ( ' U H z m @ x I \u00c7 \u00c9 9 b n j@ r ' 0 m a ) q 5 \u00c3 b \u00ba 5 \u00c3 b } i \u00ca \u00c9 n j o @ r ' 0 m a ) G a 5 \u00c3 b q \u00c3 b n (20) j& h ' U m a H u I \u00c7 } \u00cb \u00b3 a \u00c3 b q \u00cc \u00b3 a \u00c3 b n j& h ' U H z m I \u00c7 \u00c9 \u00a9 \u00c3 \u00a5 \u00b3 b S \u00a9 \u00c3 \u00b9 \u00c0 G | \u00ca C n j& ( ' U H z m I % G \u00c3 \u00a5 \u00cc \u00b3 b \u00c3 \u00a5 u n", |
|
"eq_num": "(21)" |
|
} |
|
], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "j& v ' w H m I \u00cd \u00c3 \u00ce 9 y \u00c3 \u00c5 \u00c2 u | \u00ca C n", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". The first three components are the same as before, and indicates that we wish to know whether a stack with top-most symbols may arise after reading a prefix of a string that may also lead to expansion of nonterminal & in a left-most derivation. Such an item results if it is detected that the existence of below needs to be ensured in order to continue the computation under the constraint of the correct-prefix property.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "Our algorithm also makes use of segments, as computed by the algorithm from Figure 1 . Consistently with rule (5) from Figure 2 , we write", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 76, |
|
"end": 84, |
|
"text": "Figure 1", |
|
"ref_id": null |
|
}, |
|
{ |
|
"start": 119, |
|
"end": 127, |
|
"text": "Figure 2", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "b d \u00a6 v to represent a segment b d { v such that b 1 X 6 A \u00a7 v 1 9", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ". The use of segments that were computed bottom-up is a departure from pure left-to-right processing in the spirit of Earley's original algorithm. The motivation is that we have found empirically that the use of rule (2) was essential for avoiding a large part of the exponential behaviour; note that that rule considers at most a number of stacks that is quadratic in the size of the PDA.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "The first inference rule (11) can be easily justified: we want to investigate strings that are both generated by the grammar and recognized by the PDA, so we begin by combining the start symbol and a matching right-hand side from the grammar with the initial stack for the PDA.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "Segments are incorporated into the left-to-right computation by rules (12) and (13). These two rules are the equivalents of (9) and (10) from Figure 5 . Note that in the case of (13) we require the presence of below the marker in the antecedent. This indicates that a stack with top-most symbols and a dotted rule", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 142, |
|
"end": 150, |
|
"text": "Figure 5", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "& ( ' U H z m \u00cb I", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "can be obtained by simultaneously processing a string from left to right by the grammar and the PDA. Thereby, we may continue the derivation with the item in the consequent without violating the correct-prefix property.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "Rule 14states that if a segment presupposes the existence of stack elements that are not yet available, we produce an item that starts a backward computation. We do this one symbol at a time, starting with 3 We naturally assume that the PDA itself satisfies the correct-prefix property, which is guaranteed by the construction from Section 3 and the fact that \u00cf is reduced. the symbol just beneath the part of the stack that is already available. This will be discussed more carefully below.", |
|
"cite_spans": [ |
|
{ |
|
"start": 206, |
|
"end": 207, |
|
"text": "3", |
|
"ref_id": null |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "The predictor step of Earley's algorithm is represented by (15), and the completer step by rules (16) and (17). These latter two are very similar to (12) and (13) in that they incorporate a smaller derivation in a larger derivation.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "Rules (18) and (19) repeat computations that have been done before, but in a backward manner, in order to propagate the information that deeper stack symbols are needed than those currently available, in particular that we want to know whether a certain stack symbol may occur below the currently available parts of the stack. In (18) this query is passed on to the beginning of the context-free rule, and in (19) this query is passed on backwards through a predictor step. In the antecedent of rule (18) the position of the marker is irrelevant, and is not indicated explicitly. Similarly, for rule (19) we assume the position of the marker is copied unaltered from the first antecedent to the consequent.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "If we find the required stack symbol , we propagate the information forward that this symbol may indeed occur at the specified position in the stack. This is implemented by rules (20) and (21). Rule (20) corresponds to the predictor step (15), but (20) passes on a larger portion of the stack than (20). Rule (15) only transfers the top-most symbol b to the consequent, in order to keep the stacks as shallow as possible and to achieve a high degree of sharing of computation.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "H", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "We have implemented the two algorithms and tested them on non-recursive input CFGs and a parsing CFG. We have had access to six input CFGs of the form described by Langkilde (2000) . As parsing CFG we have taken a small hand-written grammar of about 100 rules. While this small size is not at all typical of practical grammars, it suffices to demonstrate the applicability of our algorithms.", |
|
"cite_spans": [ |
|
{ |
|
"start": 164, |
|
"end": 180, |
|
"text": "Langkilde (2000)", |
|
"ref_id": "BIBREF5" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "The results of the experiments are reported in Figure 1. We have ordered the input grammars by size, according to the number of nonterminals (or the number of nodes in the forest, following the terminology by Langkilde (2000) ).", |
|
"cite_spans": [ |
|
{ |
|
"start": 209, |
|
"end": 225, |
|
"text": "Langkilde (2000)", |
|
"ref_id": "BIBREF5" |
|
} |
|
], |
|
"ref_spans": [ |
|
{ |
|
"start": 47, |
|
"end": 56, |
|
"text": "Figure 1.", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "The second column presents the number of strings generated by the input CFG, or more accurately, the number of derivations, as the grammars contain some ambiguity. The high numbers show that without a doubt the naive solution of processing the input grammars by enumerating individual strings (derivations) is not a viable option.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "The third column shows the size, expressed as number of states, of a lattice (acyclic finite automaton) that would result by unfolding the grammar (Knight and Langkilde, 2000) . Although this approach could be of more practical interest than the naive approach of enumerating all strings, it still leads to large intermediate results. In fact, practical context-free parsing algorithms for finite automata have cubic time complexity in the number of states, and derive a number of items that is quadratic in the number of states.", |
|
"cite_spans": [ |
|
{ |
|
"start": 147, |
|
"end": 175, |
|
"text": "(Knight and Langkilde, 2000)", |
|
"ref_id": "BIBREF4" |
|
} |
|
], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "The next column presents the number of segments d {", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": ". These apply to both algorithm. We only compute segments d {", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "for terminals E that also occur in the parsing grammar. (Further obvious optimizations in the case of Earley's algorithm were found to lead to no more than a slight reduction of produced segments.) The last two columns present the number of items specific to the two algorithms in Figures 5 and 6 , respectively. Although our two algorithms are exponential in the number of stack symbols in the worst case, just as approaches that enumerate all strings or that unfold \u00a3 \u00a7 into a lattice, we see that the numbers of items are relatively moderate if we compare them to the number of strings generated by the input grammars.", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 281, |
|
"end": 296, |
|
"text": "Figures 5 and 6", |
|
"ref_id": "FIGREF2" |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "Earley's algorithm generally produces more items than the CKY algorithm. An exception is the last input CFG; it seems that the number of items that Earley's algorithm needs to consider in order to maintain the correct-prefix property is very sensitive to qualities of the particular input CFG.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "The present implementations use a trie to store stacks; the arcs in the trie closest to the root represent stack symbols closest to the top of the stacks. For example, for storing", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Empirical results", |
|
"sec_num": "5" |
|
}, |
|
{ |
|
"text": "Strictly speaking, the assumption about the absence of epsilon rules is not without loss of generality, since without epsilon rules the language cannot contain the empty string. However, this has no practical consequence.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "", |
|
"sec_num": null |
|
} |
|
], |
|
"back_matter": [ |
|
{ |
|
"text": "We are indebted to Irene Langkilde for putting to our disposal the non-recursive CFGs on which we have based our empirical evaluation.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Acknowledgements", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": ", the algorithm represents and by their corresponding nodes in the trie, and it indexes d twice, once through each associated node. Since the trie is doubly linked (i.e. we may traverse the trie upwards as well as downwards), we can always reconstruct the stacks from the corresponding nodes. This structure is also convenient for finding pairs of matching stacks, one of which may be deeper than the other, as required by the inference rules from e.g. Figure 5 , since given the first stack in such a pair, the second can be found by traversing the trie either upwards or downwards.", |
|
"cite_spans": [], |
|
"ref_spans": [ |
|
{ |
|
"start": 453, |
|
"end": 461, |
|
"text": "Figure 5", |
|
"ref_id": null |
|
} |
|
], |
|
"eq_spans": [], |
|
"section": "annex", |
|
"sec_num": null |
|
}, |
|
{ |
|
"text": "It is straightforward to give an algorithm for parsing a finite language: we may trivially parse each string in the language in isolation. However, this is not a practical solution when the number of strings in the language exceeds all reasonable bounds. Some algorithms have been described in the existing literature that parse sets of strings of exponential size in the length of the input description. These solutions have not considered context-free parsing of finite languages encoded by non-recursive CFGs, in a way that takes full advantage of the compactness of the representation. Our algorithms make this possible, relying on the compactness of the input grammars for efficiency in practical cases, and on the absence of recursion for guaranteeing termination. Our experiments also show that these algorithms are of practical interest.", |
|
"cite_spans": [], |
|
"ref_spans": [], |
|
"eq_spans": [], |
|
"section": "Discussion", |
|
"sec_num": "6" |
|
} |
|
], |
|
"bib_entries": { |
|
"BIBREF0": { |
|
"ref_id": "b0", |
|
"title": "On formal properties of simple phrase structure grammars", |
|
"authors": [ |
|
{ |
|
"first": "Y", |
|
"middle": [], |
|
"last": "Bar-Hillel", |
|
"suffix": "" |
|
}, |
|
{ |
|
"first": "M", |
|
"middle": [], |
|
"last": "Perles", |
|
"suffix": "" |
|
}, |
|
{ |
|
"first": "E", |
|
"middle": [], |
|
"last": "Shamir", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 1964, |
|
"venue": "Language and Information: Selected Essays on their Theory and Application, chapter 9", |
|
"volume": "", |
|
"issue": "", |
|
"pages": "116--150", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "Y. Bar-Hillel, M. Perles, and E. Shamir. 1964. On formal properties of simple phrase structure grammars. In Y. Bar-Hillel, editor, Language and Information: Se- lected Essays on their Theory and Application, chap- ter 9, pages 116-150. Addison-Wesley.", |
|
"links": null |
|
}, |
|
"BIBREF1": { |
|
"ref_id": "b1", |
|
"title": "An \u00d7 -best representation for bidirectional parsing strategies", |
|
"authors": [ |
|
{ |
|
"first": "A", |
|
"middle": [], |
|
"last": "Corazza", |
|
"suffix": "" |
|
}, |
|
{ |
|
"first": "A", |
|
"middle": [], |
|
"last": "Lavelli", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 1994, |
|
"venue": "Working Notes of the AAAI'94 Workshop on Integration of Natural Language and Speech Processing", |
|
"volume": "", |
|
"issue": "", |
|
"pages": "7--14", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "A. Corazza and A. Lavelli. 1994. An \u00d7 -best represen- tation for bidirectional parsing strategies. In Working Notes of the AAAI'94 Workshop on Integration of Nat- ural Language and Speech Processing, pages 7-14, Seattle, WA.", |
|
"links": null |
|
}, |
|
"BIBREF2": { |
|
"ref_id": "b2", |
|
"title": "An efficient context-free parsing algorithm", |
|
"authors": [ |
|
{ |
|
"first": "J", |
|
"middle": [], |
|
"last": "Earley", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 1970, |
|
"venue": "Communications of the ACM", |
|
"volume": "13", |
|
"issue": "2", |
|
"pages": "94--102", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "J. Earley. 1970. An efficient context-free parsing algo- rithm. Communications of the ACM, 13(2):94-102, February.", |
|
"links": null |
|
}, |
|
"BIBREF3": { |
|
"ref_id": "b3", |
|
"title": "Introduction to Formal Language Theory", |
|
"authors": [ |
|
{ |
|
"first": "M", |
|
"middle": [ |
|
"A" |
|
], |
|
"last": "Harrison", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 1978, |
|
"venue": "", |
|
"volume": "", |
|
"issue": "", |
|
"pages": "", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "M.A. Harrison. 1978. Introduction to Formal Language Theory. Addison-Wesley.", |
|
"links": null |
|
}, |
|
"BIBREF4": { |
|
"ref_id": "b4", |
|
"title": "Preserving ambiguities in generation via automata intersection", |
|
"authors": [ |
|
{ |
|
"first": "K", |
|
"middle": [], |
|
"last": "Knight", |
|
"suffix": "" |
|
}, |
|
{ |
|
"first": "I", |
|
"middle": [], |
|
"last": "Langkilde", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 2000, |
|
"venue": "Proceedings of the Seventeenth National Conference on Artificial Intelligence and Twelfth Conference on Innovative Applications of Artificial Intelligence", |
|
"volume": "", |
|
"issue": "", |
|
"pages": "697--702", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "K. Knight and I. Langkilde. 2000. Preserving ambigu- ities in generation via automata intersection. In Pro- ceedings of the Seventeenth National Conference on Artificial Intelligence and Twelfth Conference on In- novative Applications of Artificial Intelligence, pages 697-702, Austin, Texas, USA, July-August.", |
|
"links": null |
|
}, |
|
"BIBREF5": { |
|
"ref_id": "b5", |
|
"title": "Forest-based statistical sentence generation", |
|
"authors": [ |
|
{ |
|
"first": "I", |
|
"middle": [], |
|
"last": "Langkilde", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 2000, |
|
"venue": "6th Applied Natural Language Processing Conference and 1st Meeting of the North American Chapter of the Association for Computational Linguistics", |
|
"volume": "2", |
|
"issue": "", |
|
"pages": "170--177", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "I. Langkilde. 2000. Forest-based statistical sentence gen- eration. In 6th Applied Natural Language Processing Conference and 1st Meeting of the North American Chapter of the Association for Computational Linguis- tics, pages Section 2, 170-177, Seattle, Washington, USA, April-May.", |
|
"links": null |
|
}, |
|
"BIBREF6": { |
|
"ref_id": "b6", |
|
"title": "The emptiness problem for intersection of a CFG and a nonrecursive CFG is PSPACE-complete", |
|
"authors": [ |
|
{ |
|
"first": "M.-J", |
|
"middle": [], |
|
"last": "Nederhof", |
|
"suffix": "" |
|
}, |
|
{ |
|
"first": "G", |
|
"middle": [], |
|
"last": "Satta", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 2002, |
|
"venue": "", |
|
"volume": "", |
|
"issue": "", |
|
"pages": "", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "M.-J. Nederhof and G. Satta. 2002. The emptiness prob- lem for intersection of a CFG and a nonrecursive CFG is PSPACE-complete. In preparation.", |
|
"links": null |
|
}, |
|
"BIBREF7": { |
|
"ref_id": "b7", |
|
"title": "Principles and implementation of deductive parsing", |
|
"authors": [ |
|
{ |
|
"first": "S", |
|
"middle": [ |
|
"M" |
|
], |
|
"last": "Shieber", |
|
"suffix": "" |
|
}, |
|
{ |
|
"first": "Y", |
|
"middle": [], |
|
"last": "Schabes", |
|
"suffix": "" |
|
}, |
|
{ |
|
"first": "F", |
|
"middle": [ |
|
"C N" |
|
], |
|
"last": "Pereira", |
|
"suffix": "" |
|
} |
|
], |
|
"year": 1995, |
|
"venue": "Journal of Logic Programming", |
|
"volume": "24", |
|
"issue": "", |
|
"pages": "3--36", |
|
"other_ids": {}, |
|
"num": null, |
|
"urls": [], |
|
"raw_text": "S.M. Shieber, Y. Schabes, and F.C.N. Pereira. 1995. Principles and implementation of deductive parsing. Journal of Logic Programming, 24:3-36.", |
|
"links": null |
|
} |
|
}, |
|
"ref_entries": { |
|
"FIGREF0": { |
|
"type_str": "figure", |
|
"uris": null, |
|
"text": "line segment in the curve represents a scan transition, an upward line segment represents a push transition, and a downward line segment a pop transition. The shaded areas", |
|
"num": null |
|
}, |
|
"FIGREF1": { |
|
"type_str": "figure", |
|
"uris": null, |
|
"text": "ure 2, as applied to the PDA encoding the input grammar ) The parsing algorithm may rule out many combinations of segments fromFigure 2that are inconsistent with the language generated by Combining two segments using rule (6) fromFigure 2.", |
|
"num": null |
|
}, |
|
"FIGREF2": { |
|
"type_str": "figure", |
|
"uris": null, |
|
"text": "Inference rules based on Earley'a left-most derivation and some stack can be obtained of which represent the top-most elements, and (ii)", |
|
"num": null |
|
} |
|
} |
|
} |
|
} |