| { |
| "paper_id": "P91-1032", |
| "header": { |
| "generated_with": "S2ORC 1.0.0", |
| "date_generated": "2023-01-19T09:03:14.361916Z" |
| }, |
| "title": "FINITE-STATE APPROXIMATION OF PHRASE STRUCTURE GRAMMARS", |
| "authors": [ |
| { |
| "first": "Fernando", |
| "middle": [ |
| "C N" |
| ], |
| "last": "Pereira", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "AT&T Bell Laboratories", |
| "institution": "", |
| "location": { |
| "addrLine": "600 Mountain Ave. Murray Hill", |
| "postCode": "07974", |
| "region": "NJ" |
| } |
| }, |
| "email": "" |
| }, |
| { |
| "first": "Rebecca", |
| "middle": [ |
| "N" |
| ], |
| "last": "Wright", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "", |
| "institution": "Yale University", |
| "location": { |
| "addrLine": "Yale Station New Haven", |
| "postBox": "PO Box 2158", |
| "postCode": "06520", |
| "region": "CT" |
| } |
| }, |
| "email": "" |
| } |
| ], |
| "year": "", |
| "venue": null, |
| "identifiers": {}, |
| "abstract": "Phrase-structure grammars are an effective representation for important syntactic and semantic aspects of natural languages, but are computationally too demanding for use as language models in real-time speech recognition. An algorithm is described that computes finite-state approximations for context-free grammars and equivalent augmented phrase-structure grammar formalisms. The approximation is exact for certain contextfree grammars generating regular languages, including all left-linear and right-linear context-free grammars. The algorithm has been used to construct finite-state language models for limiteddomain speech recognition tasks.", |
| "pdf_parse": { |
| "paper_id": "P91-1032", |
| "_pdf_hash": "", |
| "abstract": [ |
| { |
| "text": "Phrase-structure grammars are an effective representation for important syntactic and semantic aspects of natural languages, but are computationally too demanding for use as language models in real-time speech recognition. An algorithm is described that computes finite-state approximations for context-free grammars and equivalent augmented phrase-structure grammar formalisms. The approximation is exact for certain contextfree grammars generating regular languages, including all left-linear and right-linear context-free grammars. The algorithm has been used to construct finite-state language models for limiteddomain speech recognition tasks.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Abstract", |
| "sec_num": null |
| } |
| ], |
| "body_text": [ |
| { |
| "text": "Grammars for spoken language systems are subject to the conflicting requirements of language modeling for recognition and of language analysis for sentence interpretation. Current recognition algorithms can most directly use finite-state acceptor (FSA) language models. However, these models are inadequate for language interpretation, since they cannot express the relevant syntactic and semantic regularities. Augmented phrase structure grammar (APSG) formalisms, such as unification-based grammars (Shieber, 1985a) , can express many of those regularities, but they are computationally less suitable for language modeling, because of the inherent cost of computing state transitions in APSG parsers.", |
| "cite_spans": [ |
| { |
| "start": 501, |
| "end": 517, |
| "text": "(Shieber, 1985a)", |
| "ref_id": "BIBREF10" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Motivation", |
| "sec_num": "1" |
| }, |
| { |
| "text": "The above problems might be circumvented by using separate grammars for language modeling and language interpretation. Ideally, the recognition grammar should not reject sentences acceptable by the interpretation grammar and it should contain as much as reasonable of the constraints built into the interpretation grammar.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Motivation", |
| "sec_num": "1" |
| }, |
| { |
| "text": "However, if the two grammars are built independently, those goals are difficult to maintain. For this reason, we have developed a method for constructing automatically a finite-state approximation for an APSG. Since the approximation serves as language model for a speech-recognition frontend to the real parser, we require it to be sound in the sense that the it accepts all strings in the language defined by the APSG. Without qualification, the term \"approximation\" will always mean here \"sound approximation.\"", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Motivation", |
| "sec_num": "1" |
| }, |
| { |
| "text": "If no further constraints were placed on the closeness of the approximation, the trivial algorithm that assigns to any APSG over alphabet E the regular language E* would do, but of course this language model is useless. One possible criterion for \"goodness\" of approximation arises from the observation that many interesting phrase-structure grammars have substantial parts that accept regular languages. That does not mean that the grammar rules are in the standard forms for defining regular languages (leftlinear or right-linear), because syntactic and semantic considerations often require that strings in a regular set be assigned structural descriptions not definable by left-or right-linear rules. A useful criterion is thus that if a grammar generates a regular language, the approximation algorithm yields an acceptor for that regular language. In other words, one would like the algorithm to be exact for APSGs yielding regular languages. 1 While we have not proved that in general our method satisfies the above exactness criterion, we show in Section 3.2 that the method is exact for left-linear and right-linear grammars, two important classes of context-free grammars generating regular languages.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Motivation", |
| "sec_num": "1" |
| }, |
| { |
| "text": "Our approximation method applies to any context-free grammar (CFG), or any unificationbased grammar (Shieber, 1985a ) that can be fully expanded into a context-free grammar. 2 The resulting FSA accepts all the sentences accepted by the input grammar, and possibly some nonsentences as well.", |
| "cite_spans": [ |
| { |
| "start": 100, |
| "end": 115, |
| "text": "(Shieber, 1985a", |
| "ref_id": "BIBREF10" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "The current implementation accepts as input a form of unification grammar in which features can take only atomic values drawn from a specified finite set. Such grammars can only generate context-free languages, since an equivalent CFG can be obtained by instantiating features in rules in all possible ways.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "The heart of our approximation method is an algorithm to convert the LR(0) characteristic machine .Ad(G) (Aho and Ullman, 1977; Backhouse, 1979 ) of a CFG G into an FSA for a superset of the language L(G) defined by G. The characteristic machine for a CFG G is an FSA for the viable prefixes of G, which are just the possible stacks built by the standard shift-reduce recognizer for G when recognizing strings in L(G).", |
| "cite_spans": [ |
| { |
| "start": 105, |
| "end": 127, |
| "text": "(Aho and Ullman, 1977;", |
| "ref_id": "BIBREF0" |
| }, |
| { |
| "start": 128, |
| "end": 143, |
| "text": "Backhouse, 1979", |
| "ref_id": "BIBREF1" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "This is not the place to review the characteristic machine construction in detail. However, to explain the approximation algorithm we will need to recall the main aspects of the construction. The states of .~4(G) are sets of dotted rules A ---* a . [3 where A ---, a/~ is some rule of G..A4(G) is the determinization by the standard subset construction (Aho and Ullman, 1977) of the FSA defined as follows:", |
| "cite_spans": [ |
| { |
| "start": 353, |
| "end": 375, |
| "text": "(Aho and Ullman, 1977)", |
| "ref_id": "BIBREF0" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "\u2022 The initial state is the dotted rule ff ---, -S where S is the start symbol of G and S' is a new auxiliary start symbol.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "\u2022 The final state is S' --~ S..", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "\u2022 The other states are all the possible dotted rules of G.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "\u2022 There is a transition labeled X, where X is a terminal or nonterminal symbol, from dotted rule A -+ a. X~ to A --+ c~X.//.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "\u2022 There is an e-transition from A --~ a \u2022 B/~ to B --~ \"7, where B is a nonterminal symbol and B -+ 7 a rule in G.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "2Unification-based grammars not in this class would have to be weakened first, using techniques akin to those of Sato and Tamaki (1984) , Shieber (1985b) and Haas (1989) .", |
| "cite_spans": [ |
| { |
| "start": 113, |
| "end": 135, |
| "text": "Sato and Tamaki (1984)", |
| "ref_id": "BIBREF9" |
| }, |
| { |
| "start": 138, |
| "end": 153, |
| "text": "Shieber (1985b)", |
| "ref_id": "BIBREF11" |
| }, |
| { |
| "start": 158, |
| "end": 169, |
| "text": "Haas (1989)", |
| "ref_id": "BIBREF6" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "I S' ->. S S ->. Ab A ->. A a A->. 1 Is'->s.]", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "'Aqk~ SA'>A'.ba Ja~[A.>Aa. j .A~(G) can be seen as the finite state control for a nondeterministic shift-reduce pushdown recognizer TO(G) for G. A state transition labeled by a terminal symbol z from state s to state s' licenses a shift move, pushing onto the stack of the recognizer the pair (s, z). Arrival at a state containing a completed dotted rule A --~ a. licenses a reduction move. This pops from the stack as many pairs as the symbols in a, checking that the symbols in the pairs match the corresponding elements of a, and then takes the transition out of the last state popped s labeled by A, pushing (s, A) onto the stack. (Full definitions of those concepts are given in Section 3.)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "The basic ingredient of our approximation algorithm is the flattening of a shift-reduce recognizer for a grammar G into an FSA by eliminating the stack and turning reduce moves into e-transitions. It will be seen below that flattening 7~(G) directly leads to poor approximations in many interesting cases. Instead, .bq(G) must first be unfolded into a larger machine whose states carry information about the possible stacks of g(G). The quality of the approximation is crucially influenced by how much stack information is encoded in the states of the unfolded machine: too little leads to coarse approximations, while too much leads to redundant automata needing very expensive optimization.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "The algorithm is best understood with a simple example. Consider the left-linear grammar G1 S---. Ab A---* Aa Je AJ(G1) is shown on Figure 1 . Unfolding is not required for this simple example, so the approximating FSA is obtained from .Ad(G1) by the flattening method outlined above. The reducing states in AJ(G1), those containing completed dotted rules, are states 0, 3 and 4. For instance, the reduction at state 4 would lead to a transition on nonter- minal A, to state 2, from the state that activated the rule being reduced. Thus the corresponding e-transition goes from state 4 to state 2. Adding all the transitions that arise in this way we obtain the FSA in Figure 2 . From this point on, the arcs labeled with nonterminals can be deleted, and after simplification we obtain the deterministic finite automaton (DFA) in Figure 3 , which is the minimal DFA for L(G1).", |
| "cite_spans": [], |
| "ref_spans": [ |
| { |
| "start": 132, |
| "end": 140, |
| "text": "Figure 1", |
| "ref_id": "FIGREF0" |
| }, |
| { |
| "start": 669, |
| "end": 677, |
| "text": "Figure 2", |
| "ref_id": null |
| }, |
| { |
| "start": 830, |
| "end": 838, |
| "text": "Figure 3", |
| "ref_id": null |
| } |
| ], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "If flattening were always applied to the LR(0) characteristic machine as in the example above, even simple grammars defining regular languages might be inexactly approximated by the algorithm. The reason for this is that in general the reduction at a given reducing state in the characteristic machine transfers to different states depending on context. In other words, the reducing state might be reached by different routes which use the result of the reduction in different ways. Consider for example the grammar G2 S ~ aXa ] bXb X -'* c which accepts just the two strings aca and bcb. Flattening J~4(G2) will produce an FSA that will also accept acb and bca, an undesirable outcome. The reason for this is that the e-transitions leaving the reducing state containing X ~ c. do not distinguish between the different ways of reaching that state, which are encoded in the stack of One way of solving the above problem is to unfold each state of the characteristic machine into a set of states corresponding to different stacks at that state, and flattening the corresponding recognizer rather than the original one. However, the set of possible stacks at a state is in general infinite. Therefore, it is necessary to do the unfolding not with respect to stacks, but with respect to a finite partition of the set of stacks possible at the state, induced by an appropriate equivalence relation. The relation we use currently makes two stacks equivalent if they can be made identical by collapsing loops, that is, removing portions of stack pushed between two arrivals at the same state in the finite-state control of the shift-reduce recognizer. The purpose of collapsing loops is to ~forget\" stack segments that may be arbitrarily repeated, s Each equivalence class is uniquely defined by the shortest stack in the class, and the classes can be constructed without having to consider all the (infinitely) many possible stacks.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The Algorithm", |
| "sec_num": "2" |
| }, |
| { |
| "text": "In this section, we will show here that the approximation method described informally in the previous section is sound for arbitrary CFGs and is exact for left-linear and right-linear CFGs.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Formal Properties", |
| "sec_num": "3" |
| }, |
| { |
| "text": "In what follows, G is a fixed CFG with terminal vocabulary ~, nonterminal vocabulary N, and start symbol S; V = ~ U N.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Formal Properties", |
| "sec_num": "3" |
| }, |
| { |
| "text": "Let J~4 be the characteristic machine for G, with state set Q, start state so, set of final states F, and transition function ~ : S x V --* S. As usual, transition functions such as 6 are extended from input symbols to input strings by defining 6(s, e) -s and 6is , a/~) = 5(6(s, a),/~). The shift-reduce recognizer 7~ associated to A4 has the same states, start state and final states. Its configurations are triples Is, a, w) of a state, a stack and an input string. The stack is a sequence of pairs / s, X) of a state and a symbol. The transitions of the shiftreduce recognizer are given as follows:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Shift: is, a, zw) t-(s', a/s, z), w) if 6(s, z) = s' Reduce: is, err, w) ~-/5( s', A), cr/s', A/, w) if ei- ther (1) A --~ \u2022 is a completed dotted rule", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "3Since possible stacks can be shown to form a regular language, loop collapsing has a direct connection to the pumping lemma for regular languages. in s, s\" = s and r is empty, or (2) A X1...Xn.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "is a completed dotted rule in s, T = is1, Xl) .. .(sn,Xn) and s\" = 81.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "The initial configurations of ~ are (so, e, w} for some input string w, and the final configurations are ( s, (so, S), e) for some state s E F. A derivation of a string w is a sequence of configurations c0,...,cm such that c0 = (s0,e,w), c,~ = ( s, (so, S), e) for some final state s, and ei-1 l-ci for l<i<n.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Let s be a state. We define the set Stacks(s) to contain every sequence (s0,X0)... (sk,Xk) such that si = 6(si-l,Xi-1),l < i < k and s = 6(st, Xk). In addition, Stacks(s0) contains the empty sequence e. By construction, it is clear that if ( s, a, w) is reachable from an initial configuration in ~, then o-E Stacks(s).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "A stack congruence on 7\u00a2 is a family of equivalence relations _=o on Stacks That this is well-defined follows immediately from the definition of stack congruence.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "The definitions of dotted rules in states, configurations, shift and reduce transitions given above carry over immediately to unfolded recognizers. Also, the characteristic recognizer can also be seen as an unfolded recognizer for the trivial coarsest congruence.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Unfolding a characteristic recognizer does not change the language accepted: Proposition 1 Let G be a CFG, 7~ its characteristic recognizer with transition function ~, and = a stack congruence on T\u00a2. Then the unfolded recognizer ~=_ and 7~ are equivalent recognizers.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Proof: We show first that any string w accepted by T\u00a2---is accepted by 7~. Let do,...,dm be a derivation of w in ~=.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Each di has the form di = ([P/]\", o'i, ul), and can be mapped to an T\u00a2 configuration di = (sl, 8i, ul) , where \u00a3 = E and ((s, C), X) = 8i s, X). It is straightforward to verify that do,..., d,, is a derivation of w in ~.", |
| "cite_spans": [ |
| { |
| "start": 90, |
| "end": 102, |
| "text": "(sl, 8i, ul)", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Conversely, let w E L(G), and c0,...,em be a derivation of w in 7~, with ci = isl,o-i, ui). We define el = ([~ri] s~, hi, ui), where ~ = e and o-is, x) = aito-]', x). We now define a pair sequence ~ to play the same role in 7~-as r does in ~. In case (a) above, ~ = e. Otherwise, let rl = e and ri = ri-l(qi-l,Xi-1) for 2 < i ( n, and define ~ by -(q1,X1)...(q.-x,x.-x) Thus", |
| "cite_spans": [], |
| "ref_spans": [ |
| { |
| "start": 347, |
| "end": 369, |
| "text": "-(q1,X1)...(q.-x,x.-x)", |
| "ref_id": "FIGREF0" |
| } |
| ], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "= ([d q', xl)... @hi q', xi) \u2022 \u2022 \u2022 ([~.p-, x.) Then O'i--1 --~-0\"7\" = o", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "x.)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "--\u00a2r (q~,X,}...(qi-hXi-l) xd--.", |
| "cite_spans": [ |
| { |
| "start": 5, |
| "end": 25, |
| "text": "(q~,X,}...(qi-hXi-l)", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "x.)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "= = a([d',A) = a(#,A) ~i = (~f=(&A),a(~,A),ui)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "which by construction of e immediately entails that ~_ 1 ~-Ci is a reduce move in ~=. fl For any unfolded state p, let Pop(p) be the set of states reachable from p by a reduce transition. More precisely, Pop(p) contains any state pl such that there is a completed dotted rule A --* (~. in p and a state pll such that 6-(p I~, ~) -p and 6-(f*,A) --f. Then the flattening ~r= of~-is a nondeterministic FSA with the same state set, start state and final states as ~-and nondeterministic transition function @= defined as follows:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "\u2022 If 6=(p,z) -pt for some z E E, then f E \u2022 If p~ E Pop(p) then f E ~b=(p, ~).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Let co,..., cm be a derivation of string w in ~, and put ei --(q~,~q, wl), and p~ = [~]~'. By construction, if ci_~ F ci is a shift move on z (wi-x --zw~), then 6=(pi-l,Z) = Pi, and thus p~ ~ ~-(p~_~, z). Alternatively, assume the transition is a reduce move associated to the completed dotted rule A --* a.. We consider first the case a ~ ~. Put a --X1... X~. By definition of reduce move, there is a sequence of states rl,..., r~ and", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "a stack # such that o'i-x = \u00a2(r~, X1)... (rn, Xn),", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "qi --#(r~,A), 5(r~,A) = qi, and 5(rj,X1) -ri+~ for 1 ~ j < n. By definition of stack congruence, we will then have = where rx = \u2022 and rj = (r~,X,)... (r~-x,X~-,) for j > 1. Furthermore, again by definition of stack congruence we have 6=([cr] r*, A) = Pi. Therefore, Pi 6 Pop(pi_l) and thus pi e ~_--(pi-x,\u2022). A similar but simpler argument allows us to reach the same conclusion for the case a = e. Finally, the definition of final state for g= and ~r__ makes Pm a final state. Therefore the sequence P0,.-.,Pm is an accepting path for w in ~r_. We have thus proved Proposition 2 For any CFG G and stack congruence =_ on the canonical", |
| "cite_spans": [], |
| "ref_spans": [ |
| { |
| "start": 150, |
| "end": 161, |
| "text": "(r~-x,X~-,)", |
| "ref_id": null |
| } |
| ], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "LR(0) shift-reduce rec- ognizer 7~(G) of G, L(G) C_ L(~r-(G)), where ~r-(G) is the flattening of ofT~(G)--.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "Finally, we should show that the stack collapsing equivalence described informally earlier is indeed a stack congruence. A stack r is a loop if '/\"", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "-\"", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "(81, X1)... (sk, Xk) and 6(sk, Xt) = sz. A stack ~ collapses to a stack ~' if cr = pry, cr ~ = pv and r is a loop. Two stacks are equivalent if they can be collapsed to the same stack. This equivalence relation is closed under suffixing, therefore it is a stack congruence.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Soundness", |
| "sec_num": "3.1" |
| }, |
| { |
| "text": "While it is difficult to decide what should be meant by a \"good\" approximation, we observed earlier that a desirable feature of an approximation algorithm would be that it be exact for a wide class of CFGs generating regular languages. We show in this section that our algorithm is exact both for left-linear and for right-linear context-free grammars, which as is well-known generate regular languages.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Exactness", |
| "sec_num": "3.2" |
| }, |
| { |
| "text": "The proofs that follow rely on the following basic definitions and facts about the LR(0) construction. Each LR(0) state s is the closure of a set of a certain set of dotted rules, its core. The closure [R] of a set R of dotted rules is the smallest set of dotted rules containing R that contains B --~ \"7 whenever it contains A --~ a \u2022 Bfl and B ---* 7 is in G. The core of the initial state so contains just the dotted rule ff ~ .S. For any other state s, there is a state 8 ~ and a symbol X such that 8 is the closure of the set core consisting of all dotted rules A ~ aX./~ where A --* a. X/~ belongs to s'.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Exactness", |
| "sec_num": "3.2" |
| }, |
| { |
| "text": "In this section, we assume that the CFG G is leftlinear, that is, each rule in G is of the form A B/~ or A --+/~, where A, B E N and/3 E ~*.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Left-Linear Grammars", |
| "sec_num": "3.3" |
| }, |
| { |
| "text": "Proposition 3 Let G be a left-linear CFG, and let gz be the FSA produced by the approximation algorithm from G. Then L(G) = L(3r).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Left-Linear Grammars", |
| "sec_num": "3.3" |
| }, |
| { |
| "text": "The proof hinges on the observation that each state s of At(G) can be identified with a string E V* such that every dotted rule in s is of the formA ~ ~.a for some A E N and c~ E V*.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Proof: By Proposition 2, L(G) C. L(.~'). Thus we need only show L(~) C_ L(G).", |
| "sec_num": null |
| }, |
| { |
| "text": "Clearly, this is true for so = [S' --* .S], with ~0 = e. The core k of any other state s will by construction contain only dotted rules of the form A ~ a. with a ~ e. Since G is left linear, /3 must be a terminal string, ensuring that s = [h]. Therefore, every dotted rule A --* a. f in s must result from dotted rule A ~ .aft in so by the sequence of transitions determined by a (since \u00a2tq(G) is deterministic). This means that if A ~ a. f and A' --* a'. fl' are in s, it must be the case that a -a ~. In the remainder of this proof, let ~ = s whenever a = ~.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Proof: By Proposition 2, L(G) C. L(.~'). Thus we need only show L(~) C_ L(G).", |
| "sec_num": null |
| }, |
| { |
| "text": "To go from the characteristic machine .M(G) to the FSA ~', the algorithm first unfolds Ad(G) using the stack congruence relation, and then flattens the unfolded machine by replacing reduce moves with e-transitions. However, the above argument shows that the only stack possible at a state s is the one corresponding to the transitions given by $, and thus there is a single stack congruence state at each state. Therefore, .A4(G) will only be flattened, not unfolded. Hence the transition function \u00a2 for the resulting flattened automaton ~\" is defined as follows, where a E N~* U ]~*,a E ~, and A E N: We will establish the connection between Y~ derivations and G derivations. We claim that if there is a path from ~ to S labeled by w then either there is a rule A --* a such that w = xy and S :~ Ay =~ azy, or a = S and w = e. The claim is proved by induction on Iw[. For the base case, suppose. [w I = 0 and there is a path from & to .~ labeled by w. Then w = e, and either a -S, or there is a path of e-transitions from ~ to S. In the latter case, S =~ A =~ e for some A E N and rule A --~ e, and thus the claim holds.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Proof: By Proposition 2, L(G) C. L(.~'). Thus we need only show L(~) C_ L(G).", |
| "sec_num": null |
| }, |
| { |
| "text": "Now, assume that the claim is true for all Iwl < k, and suppose there is a path from & to ,~ labeled w I, for some [wl[ = k. Then w I -aw for some terminal a and Iw[ < k, and there is a path from ~-~ to S labeled by w. By the induction hypothesis, S =~. Ay =~ aaz'y, where A --.* aaz ~ is a rule and zly -w (since aa y\u00a3 S). Letting z --ax I, we have the desired result.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Proof: By Proposition 2, L(G) C. L(.~'). Thus we need only show L(~) C_ L(G).", |
| "sec_num": null |
| }, |
| { |
| "text": "If w E L(~), then there is a path from ~ to labeled by w. Thus, by claim just proved, S =~ Ay ::~ :cy, where A ~ \u2022 is a rule and w = ~y (since e # S). Therefore, S =~ w, so w ~ L(G), as desired.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Proof: By Proposition 2, L(G) C. L(.~'). Thus we need only show L(~) C_ L(G).", |
| "sec_num": null |
| }, |
| { |
| "text": "A CFG G is right linear if each rule in G is of the form A --~ fB or A --* /3, where A, B E N and Proposition 4 Let G be a right-linear CFG and 9 e be the unfolded, flattened automaton produced by the approximation algorithm on input G. Then L(G) = L(Yz).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "Proof: As before, we need only show L(~') C", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "L(G).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "Let ~ be the shift-reduce recognizer for G. The key fact to notice is that, because G is right-linear, no shift transition may follow a reduce transition. Therefore, no terminal transition in 3 c may follow an e-transition, and after any e-transition, there is a sequence of G-transitions leading to the final state [$' --* S.]. Hence ~\" has the following kinds of states: the start state, the final state, states with terminal transitions entering or leaving them (we call these reading states), states with e-transitions entering and leaving them (prefinal states), and states with terminal transitions entering them and e-transitions leaving them (cr0ssover states). Any accepting path through ~\" will consist of a sequence of a start state, reading states, a crossover state, prefinal states, and a final state. The exception to this is a path accepting the empty string, which has a start state, possibly some prefinal states, and a final state.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "The above argument also shows that unfolding does not change the set of strings accepted by ~, because any reduction in 7~= (or e-transition in jc), is guaranteed to be part of a path of reductions (e-transitions) leading to a final state of 7~_-(~).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "Suppose now that w = w: ... wn is accepted by ~'. Then there is a path from the start state So through reading states sl,..., s,,-1, to crossover state sn, followed by e-transitions to the final state. We claim that if there there is a path from sl to sn labeled wi+l...wn, then there is a dot- We prove the claim by induction on n -i. For the base case, suppose there is an empty path from Sn to s,. Because sn is the crossover state, there must be some dotted rule A ~ x. in sn. Letting y = z = B = e, we get that A ---* z. yB is a dotted rule of s, and B = z. The dotted rule A --', z. yB must have either been added to 8n by closure or by shifts. If it arose from a shift, z must be a nonempty suffix of wl ...wn. If the dotted rule arose by closure, z = e, and there is some dotted rule A ~ --~ z t \u2022 A\" such that A\" =~ A and ~l is a nonempty suffix of Wl ... wn. Now suppose that the claim holds for paths from si to sn, and look at a path labeled wi...wn from si-1 to sn. By the induction hypothesis, A ~ z \u2022 yB is a dotted rule of st, where B =~ z, uz = wi+l...wn, and (since st ~ s0), either z is a nonempty suffix of wl ... wi or z = e, A ~ -. z ~. A\" is a dotted rule of si, A\" :~ A, and z ~ is a nonempty suffix of wl ... wl.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "In the former case, when z is a nonempty suffix of wl ... wl, then z = wj ... wi for some 1 < j < i. Then A ---, wj ...wl \u2022 yB is a dotted rule of sl, and thus A ---* wj ...wi-1 \u2022 wiyB is a dotted rule ofsi_l. Ifj < i-1, then wj...wi_l is a nonempty suffix of wl...wi-1, and we are done. Otherwise, wj ...wi-1 = e, and so A --* .wiyB is a dotted rule ofsi-1. Let y~ = wiy. Then A ~ .yJB is a dotted rule of si-1, which must have been added by closure. Hence there are nonterminals A I and A\" such that A\" :~ A and A I ~ z I \u2022 A\" is a dotted rule of st-l, where z ~ is a nonempty sUtTLX of Wl .. \u2022 wi-1.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "In the latter case, there must be a dotted rule A ~ ~ wj ...wi-1", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "\u2022 wiA\" in si-1. The rest of the conditions are exactly as in the previous case.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "Thus, if w -wl...wn is accepted by ~c, then there is a path from so to sn labeled by wl ... w,. Hence, by the claim just proved, A ~ z. yB is a dotted rule of sn, and B :~ z, where yz -\" wl...wa --w. Because the st in the claim is so, and all the dotted rules of si can have nothing before the dot, and z must be the empty string. Therefore, the only possible case is case 3. Thus, S :~ A ---, yz = w, and hence w E L(G). The proof that the empty string is accepted by ~\" only if it is in L(G) is similar to the proof of the claim. D", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Right-Linear Grammars", |
| "sec_num": "3.4" |
| }, |
| { |
| "text": "The appendix shows an APSG for a small fragment of English, written in the notation accepted by the current version of our grammar compiler. The categories and features used in the grammar are described in Tables 1 and 2 (categories without features are omitted) . Features enforce personnumber agreement, personal pronoun case, and a limited verb subcategorization scheme. Grammar compilation has three phrases: (i) construction of an equivalent CFG, (ii) approximation, and (iii) determinization and minimization of the resulting FSA. The equivalent CFG is derived by finding all full instantiations of the initial APSG rules that are actually reachable in a derivation from the grammar's start symbol. In the current implementation, the construction of the equivalent CFG is is done by a Prolog program, while the approximator, determinizer and minimizer are written in C.", |
| "cite_spans": [], |
| "ref_spans": [ |
| { |
| "start": 206, |
| "end": 263, |
| "text": "Tables 1 and 2 (categories without features are omitted)", |
| "ref_id": "TABREF1" |
| } |
| ], |
| "eq_spans": [], |
| "section": "A Complete Example", |
| "sec_num": "4" |
| }, |
| { |
| "text": "For the example grammar, the equivalent CFG has 78 nonterminals and 157 rules, the unfolded and flattened FSA 2615 states and 4096 transitions, and the determinized and minimized final DFA 16 states and 97 transitions. The runtime for the whole process is 4.91 seconds on a Sun SparcStation 1.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Complete Example", |
| "sec_num": "4" |
| }, |
| { |
| "text": "Substantially larger grammars, with thousands of instantiated rules, have been developed for a speech-to-speech translation project. Compilation times vary widely, but very long compilations appear to be caused by a combinatorial explosion in the unfolding of right recursions that will be discussed further in the next section.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Complete Example", |
| "sec_num": "4" |
| }, |
| { |
| "text": "In addition to the cases of left-linear and rightlinear grammars discussed in Section 3, our algorithm is exact in a variety of interesting cases, including the examples of Church and Patil (1982) , which illustrate how typical attachment ambiguities arise as structural ambiguities on regular string sets.", |
| "cite_spans": [ |
| { |
| "start": 173, |
| "end": 196, |
| "text": "Church and Patil (1982)", |
| "ref_id": "BIBREF4" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "The algorithm is also exact for some selfembedding grammars 4 of regular languages, such as S --+ aS l Sb l c defining the regular language a*eb*.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "A more interesting example is the following simplified grammar for the structure of English noun The symbols Art, N, PN and P correspond to the parts of speech article, noun, proper noun and preposition. From this grammar, the algorithm derives the DFA in Figure 4 .", |
| "cite_spans": [], |
| "ref_spans": [ |
| { |
| "start": 256, |
| "end": 264, |
| "text": "Figure 4", |
| "ref_id": "FIGREF6" |
| } |
| ], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "As an example of inexact approximation, consider the the self-embedding CFG S -+ aSb I ~ for the nonregular language a'~b'~,n > O. This grammar is mapped by the algorithm into an FSA accepting ~ I a+b+. The effect of the algorithm is thus to \"forget\" the pairing between a's and b's mediated by the stack of the grammar's characteristic recognizer.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "Our algorithm has very poor worst-case performance. First, the expansion of an APSG into a CFG, not described here, can lead to an exponential blow-up in the number of nonterminals and rules. Second, the subset calculation implicit in the LR(0) construction can make the number of states in the characteristic machine exponential on the number of CF rules. Finally, unfolding can yield another exponential blow-up in the number of states.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "However, in the practical examples we have considered, the first and the last problems appear to be the most serious.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "The rule instantiation problem may be alleviated by avoiding full instantiation of unification grammar rules with respect to \"don't care\" features, that is, features that are not constrained by the rule.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "The unfolding problem is particularly serious in grammars with subgrammars of the form", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Informal Analysis", |
| "sec_num": "5" |
| }, |
| { |
| "text": "It is easy to see that the number of unfolded states in the subgrammar is exponential in n. This kind of situation often arises indirectly in the expansion of an APSG when some features in the righthand side of a rule are unconstrained and thus lead to many different instantiated rules. In fact, from the proof of Proposition 4 it follows immediately that unfolding is unnecessary for right-linear grammars. Ultimately, by dividing the grammar into non-mutually recursive (strongly connected) components and only unfolding centerembedded components, this particular problem could he avoided, s In the meanwhile, the problem can be circumvented by left factoring (1) as follows:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "S -+ XIS I\"\" J X,,S J Y (I)", |
| "sec_num": null |
| }, |
| { |
| "text": "S -+ ZS[Y z-+x, I...IX.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "S -+ XIS I\"\" J X,,S J Y (I)", |
| "sec_num": null |
| }, |
| { |
| "text": "Our work can be seen as an algorithmic realization of suggestions of Church and Patil (1980; 1982) on algebraic simplifications of CFGs of regular languages. Other work on finite state approximations of phrase structure grammars has typically relied on arbitrary depth cutoffs in rule application. While this is reasonable for psycholinguistic modeling of performance restrictions on center embedding (Pulman, 1986), it does not seem appropriate for speech recognition where the approximating FSA is intended to work as a filter and not reject inputs acceptable by the given grammar. For instance, depth cutoffs in the method described by Black (1989) lead to approximating FSAs whose language is neither a subset nor a superset of the language of the given phrase-structure grammar. In contrast, our method will produce an exact FSA for many interesting grammars generating regular languages, such as those arising from systematic attachment ambiguities (Church and Patil, 1982) . It important to note, however, that even when the result FSA accepts the same language, the original grammar is still necessary because interpreta-SWe have already implemented a version of the algorithm that splits the grammar into strongly connected components, approximates and minimizes separately each component and combines the results, but the main purpose of this version is to reduce approximation and determinization costs for some grmmmars. tion algorithms are generally expressed in terms of phrase structures described by that grammar, not in terms of the states of the FSA.", |
| "cite_spans": [ |
| { |
| "start": 69, |
| "end": 92, |
| "text": "Church and Patil (1980;", |
| "ref_id": null |
| }, |
| { |
| "start": 93, |
| "end": 98, |
| "text": "1982)", |
| "ref_id": "BIBREF4" |
| }, |
| { |
| "start": 639, |
| "end": 651, |
| "text": "Black (1989)", |
| "ref_id": "BIBREF2" |
| }, |
| { |
| "start": 955, |
| "end": 979, |
| "text": "(Church and Patil, 1982)", |
| "ref_id": "BIBREF4" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Related Work and Conclusions", |
| "sec_num": "6" |
| }, |
| { |
| "text": "Although the algorithm described here has mostly been adequate for its intended application --grammars sufficiently complex not to be approximated within reasonable time and space bounds usually yield automata that are far too big for our current real-time speech recognition hardware --it would be eventually of interest to handle right-recursion in a less profligate way. In a more theoretical vein, it would also be interesting to characterize more tightly the class of exactly approximable grammars. Finally, and most speculatively, one would like to develop useful notions of degree of approximation of a language by a regular language. Formal-language-theoretic notions such as the rational index (Boason et al., 1981) or probabilistic ones (Soule, 1974) declares cat as the start symbol of the grammar.", |
| "cite_spans": [ |
| { |
| "start": 703, |
| "end": 724, |
| "text": "(Boason et al., 1981)", |
| "ref_id": "BIBREF3" |
| }, |
| { |
| "start": 747, |
| "end": 760, |
| "text": "(Soule, 1974)", |
| "ref_id": "BIBREF12" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Related Work and Conclusions", |
| "sec_num": "6" |
| }, |
| { |
| "text": "In the grammar rules, the symbol \"'\" prefixes terminal symbols, commas are used for sequencing and [\" for alternation. start s.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Related Work and Conclusions", |
| "sec_num": "6" |
| }, |
| { |
| "text": "At first sight, this requirement may be seen as conflicting with the undecidability of determining whether a CFG generates a regular language(Harrison, 1978). However, note that the algorithm just produces an approximation, but cannot say whether the approximation is exact.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "A grammar is self-embedding if and only if licenses the derivation X ~ c~X~ for nonempty c~ and/3. A language is regular if and only if it can be described by some nonself-embedding grammar.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| } |
| ], |
| "back_matter": [ |
| { |
| "text": "We thank Mark Liberman for suggesting that we look into finite-state approximations and Pedro Moreno, David Roe, and Richard Sproat for trying out several prototypes of the implementation and supplying test grammars.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Acknowledgments", |
| "sec_num": null |
| }, |
| { |
| "text": "Nonterminal symbols (syntactic categories) may have features that specify variants of the category (eg. singular or plural noun phrases, intransitive or transitive verbs). A category cat with feature constraints is writ-Feature constraints for feature f have one of the forms.f = (c~ ..... c.)where v is a variable name (which must be capitalized) and c, cl,..., c, are feature values. All occurrences of a variable v in a rule stand for the same unspecified value. A constraint with form (2) specifies a feature as having that value. A constraint of form (3) specifies an actual value for a feature, and a constraint of form (4) specifies that a feature may have any value from the specified set of values. The symbol \"!\" appearing as the value of a feature in the right-hand side of a rule indicates that that feature must have the same value as the feature of the same name of the category in the left-hand side of the rule. This notation, as well as variables, can be used to enforce feature agreement between categories in a rule,", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Appendix APSG Formalism and Example", |
| "sec_num": null |
| } |
| ], |
| "bib_entries": { |
| "BIBREF0": { |
| "ref_id": "b0", |
| "title": "Princi. pies of Compiler Design", |
| "authors": [ |
| { |
| "first": "Alfred", |
| "middle": [ |
| "V" |
| ], |
| "last": "Aho", |
| "suffix": "" |
| }, |
| { |
| "first": "Jeffrey", |
| "middle": [ |
| "D" |
| ], |
| "last": "Ullman", |
| "suffix": "" |
| } |
| ], |
| "year": 1977, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Alfred V. Aho and Jeffrey D. Ullman. 1977. Princi. pies of Compiler Design. Addison-Wesley, Reading, Massachusetts.", |
| "links": null |
| }, |
| "BIBREF1": { |
| "ref_id": "b1", |
| "title": "Syntaz o] Programming Languages--Theorll and Practice", |
| "authors": [ |
| { |
| "first": "Roland", |
| "middle": [ |
| "C" |
| ], |
| "last": "Backhouse", |
| "suffix": "" |
| } |
| ], |
| "year": 1979, |
| "venue": "Series in Computer Science", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Roland C. Backhouse. 1979. Syntaz o] Programming Languages--Theorll and Practice. Series in Com- puter Science. Prentice-Hall, Englewood Cliffs, New Jersey.", |
| "links": null |
| }, |
| "BIBREF2": { |
| "ref_id": "b2", |
| "title": "Finite state machines from feature grammars", |
| "authors": [ |
| { |
| "first": "Alan", |
| "middle": [ |
| "W" |
| ], |
| "last": "Black", |
| "suffix": "" |
| } |
| ], |
| "year": 1989, |
| "venue": "Inter. national Workshop on Parsing Technologies", |
| "volume": "", |
| "issue": "", |
| "pages": "277--285", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Alan W. Black. 1989. Finite state machines from fea- ture grammars. In Masaru Tomita, editor, Inter. national Workshop on Parsing Technologies, pages 277-285, Pittsburgh, Pennsylvania. Carnegie Mel- lon University.", |
| "links": null |
| }, |
| "BIBREF3": { |
| "ref_id": "b3", |
| "title": "The rational index: a complexity measure for languages", |
| "authors": [ |
| { |
| "first": "Luc", |
| "middle": [], |
| "last": "Boason", |
| "suffix": "" |
| }, |
| { |
| "first": "Bruno", |
| "middle": [], |
| "last": "Courcelle", |
| "suffix": "" |
| }, |
| { |
| "first": "Maurice", |
| "middle": [], |
| "last": "Nivat", |
| "suffix": "" |
| } |
| ], |
| "year": 1981, |
| "venue": "SIAM Journal o] Computing", |
| "volume": "10", |
| "issue": "2", |
| "pages": "284--296", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Luc Boason, Bruno Courcelle, and Maurice Nivat. 1981. The rational index: a complexity measure for languages. SIAM Journal o] Computing, 10(2):284- 296.", |
| "links": null |
| }, |
| "BIBREF4": { |
| "ref_id": "b4", |
| "title": "Coping with syntactic ambiguity or how to put the block in the box on the table", |
| "authors": [ |
| { |
| "first": "W", |
| "middle": [], |
| "last": "Kenneth", |
| "suffix": "" |
| }, |
| { |
| "first": "Ramesh", |
| "middle": [], |
| "last": "Church", |
| "suffix": "" |
| }, |
| { |
| "first": "", |
| "middle": [], |
| "last": "Patil", |
| "suffix": "" |
| } |
| ], |
| "year": 1982, |
| "venue": "Computational Linguistics", |
| "volume": "8", |
| "issue": "", |
| "pages": "139--149", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Kenneth W. Church and Ramesh Patil. 1982. Coping with syntactic ambiguity or how to put the block in the box on the table. Computational Linguistics, 8(3--4):139-149.", |
| "links": null |
| }, |
| "BIBREF5": { |
| "ref_id": "b5", |
| "title": "On memory ]imitations in \u2022 natural language processing", |
| "authors": [ |
| { |
| "first": "Kenneth", |
| "middle": [ |
| "W" |
| ], |
| "last": "Church", |
| "suffix": "" |
| } |
| ], |
| "year": 1980, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Kenneth W. Church. 1980. On memory ]imitations in \u2022 natural language processing. Master's thesis, M.I.T. Published as Report MIT/LCS/TR-245.", |
| "links": null |
| }, |
| "BIBREF6": { |
| "ref_id": "b6", |
| "title": "A parsing algorithm for unification grammar", |
| "authors": [ |
| { |
| "first": "Andrew", |
| "middle": [], |
| "last": "Haas", |
| "suffix": "" |
| } |
| ], |
| "year": 1989, |
| "venue": "Computational Linguistics", |
| "volume": "15", |
| "issue": "4", |
| "pages": "219--232", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Andrew Haas. 1989. A parsing algorithm for unification grammar. Computational Linguistics, 15(4):219-232.", |
| "links": null |
| }, |
| "BIBREF7": { |
| "ref_id": "b7", |
| "title": "Introduction to Formal Language Theor~l", |
| "authors": [ |
| { |
| "first": "Michael", |
| "middle": [ |
| "A" |
| ], |
| "last": "Harrison", |
| "suffix": "" |
| } |
| ], |
| "year": 1978, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Michael A. Harrison. 1978. Introduction to Formal Language Theor~l. Addison-Wesley, Reading, Mas- sachussets.", |
| "links": null |
| }, |
| "BIBREF8": { |
| "ref_id": "b8", |
| "title": "Grammars, parsers, and memory limitations. Language and Cognitive Processes", |
| "authors": [ |
| { |
| "first": "G", |
| "middle": [], |
| "last": "Steven", |
| "suffix": "" |
| }, |
| { |
| "first": "", |
| "middle": [], |
| "last": "Pulman", |
| "suffix": "" |
| } |
| ], |
| "year": 1986, |
| "venue": "", |
| "volume": "1", |
| "issue": "", |
| "pages": "197--225", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Steven G. Pulman. 1986. Grammars, parsers, and memory limitations. Language and Cognitive Pro- cesses, 1(3):197-225.", |
| "links": null |
| }, |
| "BIBREF9": { |
| "ref_id": "b9", |
| "title": "Enumeration of success patterns in logic programs", |
| "authors": [ |
| { |
| "first": "Taisuke", |
| "middle": [], |
| "last": "Sato", |
| "suffix": "" |
| }, |
| { |
| "first": "Hisao", |
| "middle": [], |
| "last": "Tamaki", |
| "suffix": "" |
| } |
| ], |
| "year": 1984, |
| "venue": "Theoretical Computer Science", |
| "volume": "34", |
| "issue": "", |
| "pages": "227--240", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Taisuke Sato and Hisao Tamaki. 1984. Enumeration of success patterns in logic programs. Theoretical Computer Science, 34:227-240.", |
| "links": null |
| }, |
| "BIBREF10": { |
| "ref_id": "b10", |
| "title": "An Introduction to Unification-Based Approaches to Grammar", |
| "authors": [ |
| { |
| "first": "M", |
| "middle": [], |
| "last": "Stuart", |
| "suffix": "" |
| }, |
| { |
| "first": "", |
| "middle": [], |
| "last": "Shieber", |
| "suffix": "" |
| } |
| ], |
| "year": 1985, |
| "venue": "Number 4 in CSLI Lecture Notes. Center for the Study of Language and Information", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Stuart M. Shieber. 1985a. An Introduction to Unification-Based Approaches to Grammar. Num- ber 4 in CSLI Lecture Notes. Center for the Study of Language and Information, Stanford, California. Distributed by Chicago University Press.", |
| "links": null |
| }, |
| "BIBREF11": { |
| "ref_id": "b11", |
| "title": "Using restriction to extend parsing algorithms for complex-feature-based formalisms", |
| "authors": [ |
| { |
| "first": "M", |
| "middle": [], |
| "last": "Stuart", |
| "suffix": "" |
| }, |
| { |
| "first": "", |
| "middle": [], |
| "last": "Shieber", |
| "suffix": "" |
| } |
| ], |
| "year": 1985, |
| "venue": "~3rd Annual Meeting of the Association ]or Computational Linguistics", |
| "volume": "", |
| "issue": "", |
| "pages": "145--152", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Stuart M. Shieber. 1985b. Using restriction to ex- tend parsing algorithms for complex-feature-based formalisms. In ~3rd Annual Meeting of the Asso- ciation ]or Computational Linguistics, pages 145- 152, Chicago, Illinois. Association for Computa- tionai Linguistics, Morristown, New Jersey.", |
| "links": null |
| }, |
| "BIBREF12": { |
| "ref_id": "b12", |
| "title": "Entropies of probabilistic grammars", |
| "authors": [ |
| { |
| "first": "Stephen", |
| "middle": [], |
| "last": "Soule", |
| "suffix": "" |
| } |
| ], |
| "year": 1974, |
| "venue": "ormation and Control", |
| "volume": "25", |
| "issue": "", |
| "pages": "57--74", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Stephen Soule. 1974. Entropies of probabilistic gram- mars. In]ormation and Control, 25:57-74. cat sg[n=Cs,p),p=(1,2,3)].", |
| "links": null |
| }, |
| "BIBREF13": { |
| "ref_id": "b13", |
| "title": "> pn. np => prong In= !, p= !, c= !", |
| "authors": [], |
| "year": null, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "nl~[n=s,p-3] -> pn. np => prong In= !, p= !, c= ! ].", |
| "links": null |
| }, |
| "BIBREF14": { |
| "ref_id": "b14", |
| "title": "=> 'he I 'she. prong[n-s,p-3] => 'it. prong[nffip,l~l,c-s] => 'vs", |
| "authors": [ |
| { |
| "first": "]", |
| "middle": [], |
| "last": "=> ' I", |
| "suffix": "" |
| } |
| ], |
| "year": null, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "prong [n=s,p-1, c=s] => ' i. prong [p=2] => ' you. prong[n=s,p=3,c=s] => 'he I 'she. prong[n-s,p-3] => 'it. prong[nffip,l~l,c-s] => 'vs. prong[n=p,p=3,c=s] => 'they. prong[n=s,p-l,c=o] => 'me. prong[n=s,p=3,c=o] => 'him [ prong[n=p,p=1,c=o] => 'us. prong[n=p,p-3,c=o] => 'them. 'her.", |
| "links": null |
| } |
| }, |
| "ref_entries": { |
| "FIGREF0": { |
| "text": "Characteristic Machine for G1", |
| "type_str": "figure", |
| "uris": null, |
| "num": null |
| }, |
| "FIGREF1": { |
| "text": "Figure 2: Flattened FSA", |
| "type_str": "figure", |
| "uris": null, |
| "num": null |
| }, |
| "FIGREF2": { |
| "text": "(s) for each state s E 8 such that if o-=, a' and/f(s, X) = d then o-(s,X} =,, ,r(s,X). A stack congruence ----partitions each set Stacks(s) into equivalence classes [<r]\u00b0 of the stacks in Stacks(s) equivalent to o-under --_,. Each stack congruence -on ~ induces a corresponding unfolded recognizer 7~-. The states of the unfolded recognizer axe pairs i s, M,), notated more concisely as [~]\u00b0, of a state and stack equivalence class at that state. The initial state is [e],o, and the final states are all [o-]\u00b0 with s E F and o-E Stacks(s). The transition function 6-of the unfolded recognizer is defined by t-([o-]', x) = [o-is, x)] '(''x)", |
| "type_str": "figure", |
| "uris": null, |
| "num": null |
| }, |
| "FIGREF3": { |
| "text": "If ci-1 P ci is a shift move, then ui-1 = zui and 6(si-l, z) = si. Therefore, -l-d\"-',ai-x,*u,)~, = @d\",e~-l(P~-d\"-',*),~'~) with 6_=([o-i-1]\"-', z) = [o-i]\". Thus, by definition of shift move, 6i-1 I-6i in 7\u00a2_--.Assume now that ei-1 I-ci is a reduce move in ~. Then ui = ui-1 and we have a state s in 7~, a symbol A E N, a stack o-and a sequence r of state-symbol pairs such that si = A --* \u2022 is in si-t, s = si-1 and r = e, or(b) A ---, XI...Xn. is in si-1 , r = (ql, Xd... (q., X.) and s = ql-Let ~ = [o-]*. Then 6=(~,A) = [o-(s,A)p0,A) = [o-d\"", |
| "type_str": "figure", |
| "uris": null, |
| "num": null |
| }, |
| "FIGREF4": { |
| "text": "(a) \u00a2(~,a) = {~} (b) \u00a2(5, e) = {.4 I A --, a e G} The start state of ~\" is ~. The only final state is S.", |
| "type_str": "figure", |
| "uris": null, |
| "num": null |
| }, |
| "FIGREF5": { |
| "text": "ted rule A ---* x \u2022 yB in si such B :~ z and yz = w~+1...wn, where A E N,B E NU~*,y,z ~ ~*, and one of the following holds: (a) z is a nonempty suffix of wt... wi, (b) z = e, A\" =~ A, A' --* z'. A\" is a dotted rule in sl, and z t is a nonempty suffix ofT1 ...wi, or (c) z=e, si=s0, andS=~A.", |
| "type_str": "figure", |
| "uris": null, |
| "num": null |
| }, |
| "FIGREF6": { |
| "text": "Acceptor for Noun Phrases phrases: NP -+ Det Nom [ PN Det -+ Art ] NP's Nom -+ N I Nom PP J Adj Nom PP --* P NP", |
| "type_str": "figure", |
| "uris": null, |
| "num": null |
| }, |
| "TABREF0": { |
| "text": "might be profitably investigated for this purpose.", |
| "type_str": "table", |
| "num": null, |
| "html": null, |
| "content": "<table><tr><td colspan=\"2\">Symbol Category</td><td>Features</td></tr><tr><td>s</td><td>sentence</td><td>n (number), p</td></tr><tr><td/><td/><td>(person)</td></tr><tr><td>np</td><td>noun phrase</td><td>n, p, c (case)</td></tr><tr><td>vp</td><td>verb phrase</td><td>n, p, t (verb type)</td></tr><tr><td>args</td><td>verb arguments</td><td>t</td></tr><tr><td>det</td><td>determiner</td><td>n</td></tr><tr><td>n</td><td>noun</td><td>n</td></tr><tr><td>pron</td><td>pronoun</td><td>n, p, C</td></tr><tr><td>V</td><td>verb</td><td>n, p, t</td></tr></table>" |
| }, |
| "TABREF1": { |
| "text": "", |
| "type_str": "table", |
| "num": null, |
| "html": null, |
| "content": "<table><tr><td colspan=\"2\">: Categories of Example Grammar</td></tr><tr><td>Feature</td><td>Values</td></tr><tr><td>n' (number)</td><td>s (singular), p (plural)</td></tr><tr><td>p (person)</td><td>! (first), 2 (second), 3 (third)</td></tr><tr><td>c (case)</td><td>s (subject), o (nonsubject)</td></tr><tr><td>t (verb type)</td><td>i (intransitive), t (transitive), d</td></tr><tr><td/><td>(ditransitive)</td></tr></table>" |
| }, |
| "TABREF2": { |
| "text": "Features of Example Grammar for instance, number agreement between Subject and verb. It is convenient to declare the features and possible values of categories with category declarations appearing before the grammar rules. Category declarations have the form cat CatS[ /1 = (Vll .... ,V2kl), ..o, fm = (vml .... ,Vmk,) ].giving all the possible values of all the features for the category.", |
| "type_str": "table", |
| "num": null, |
| "html": null, |
| "content": "<table><tr><td>The declaration</td></tr><tr><td>start cat.</td></tr></table>" |
| } |
| } |
| } |
| } |