Capturing Cfls with Tree Adjoining Grammars
Total Page:16
File Type:pdf, Size:1020Kb
Capturing CFLs with Tree Adjoining Grammars James Rogers* Dept. of Computer and Information Sciences University of Delaware Newark, DE 19716, USA j rogers©cis, udel. edu Abstract items that occur in that string. There are a number We define a decidable class of TAGs that is strongly of reasons for exploring lexicalized grammars. Chief equivalent to CFGs and is cubic-time parsable. This among these are linguistic considerations--lexicalized class serves to lexicalize CFGs in the same manner as grammars reflect the tendency in many current syntac- the LC, FGs of Schabes and Waters but with consider- tic theories to have the details of the syntactic structure ably less restriction on the form of the grammars. The be projected from the lexicon. There are also practical class provides a nornlal form for TAGs that generate advantages. All lexicalized grammars are finitely am- local sets m rnuch the same way that regular grammars biguous and, consequently, recognition for them is de- provide a normal form for CFGs that generate regular cidable. Further, lexicalization supports strategies that sets. can, in practice, improve the speed of recognition algo- rithms (Schabes et M., 1988). Introduction One grammar formalism is said to lezicalize an- We introduce the notion of Regular Form for Tree Ad- other (Joshi and Schabes, 1992) if for every grammar joining (;rammars (TA(;s). The class of TAGs that in the second formalism there is a lexicalized grammar are in regular from is equivalent in strong generative in the first that generates exactly the same set of struc- capacity 1 to the Context-Free Grammars, that is, the tures. While CFGs are attractive for efficiency of recog- sets of trees generated by TAGs in this class are the local nition, Joshi and Schabes (1992) have shown that an sets--the sets of derivation trees generated by CFGs. 2 arbitrary CFG cannot, in general, be converted into a Our investigations were initially motivated by the work strongly equivalent lexiealized CFG. Instead, they show of Schabes, Joshi, and Waters in lexicalization of CFGs how CFGs can be lexicalized by LTAGS (Lexicalized via TAGs (Schabes and Joshi, 1991; Joshi and Schabes, TAGs). While the LTAG that lexicalizes a given CFG 1992; Schabes and Waters, 1993a; Schabes and Waters, must be strongly equivalent to that CFG, both the lan- 1993b; Schabes, 1990). The class we describe not only guages and sets of trees generated by LTAGs as a class serves to lexicalize CFGs in a way that is more faith- are strict supersets of the CFLs and local sets. Thus, tiff and more flexible in its encoding than earlier work, while this gives a means of constructing a lexicalized but provides a basis for using the more expressive TAG grammar from an existing CFG, it does not provide formalism to define Context-Free Languages (CFLs.) a direct method for constructing lexicalized grammars In Schabes et al. (1988) and Schabes (1990) a gen- that are known to be equivalent to (unspecified) CFGs. eral notion of lexicalized grammars is introduced. A Furthermore, the best known recognition algorithm for grammar is lexicalized in this sense if each of the ba- LTAGs runs in O(n 6) time. sic structures it manipulates is associated with a lexical Schabes and Waters (1993a; 1993b) define Lexical- item, its anchor. The set of structures relevant to a ized Context-Free Grammars (LCFGs), a class of lex- particular input string, then, is selected by the lexical icalized TAGs (with restricted adjunction) that not only lexicalizes CFGs, but is cubic-time parsable and is *The work reported here owes a great deal to extensive weakly equivalent to CFGs. These LCFGs have a cou- discussions with K. Vijay-Shanker. ple of shortcomings. First, they are not strongly equiv- 1We will refer to equivalence of the sets of trees generated by two grammars or classes of grammars as strong equiva- alent to CFGs. Since they are cubic-time parsable this lence. Equivalence of their string languages will be referred is primarily a theoretical rather than practical concern. to as weak equivalence. More importantly, they employ structures of a highly 2Technically, the sets of trees generated by TAGs in the restricted form. Thus the restrictions of the formalism, class are recognizable sets. The local and recognizable sets in some cases, may override linguistic considerations in are equivalent modulo projection. We discuss the distinction constructing the grammar. Clearly any class of TAGs in the next section. that are cubic-time parsable, or that are equivalent in 155 any sense to CFGs, must be restricted in some way. Preliminaries The question is what restrictions are necessary. Tree Adjoining Grammars In this paper we directly address the issue of iden- Formally, a TAG is a five-tuple (E, NT, I, A, S / where: tifying a class of TAGs that are strongly equivalent to CFGs. In doing so we define such a class--TAGs in E is a finite set of terminal symbols, regular form--that is decidable, cubic-time parsable, NT is a finite set of non-terminal symbols, and lexicalizes CFGs. Further, regular form is essen- I is a finite set of elementary initial trees, tially a closure condition on the elementary trees of the A is a finite set of elementary auxiliary trees, TAG. Rather than restricting the form of the trees that S is a distinguished non-terminal, can be employed, or the mechanisms by which they are the start symbol. combined, it requires that whenever a tree with a par- Every non-frontier node of a tree in I t3 A is labeled ticular form can be derived then certain other related with a non-terminal. Frontier nodes may be labeled trees must be derivable as well. The algorithm for de- with either a terminal or a non-terminal. Every tree ciding whether a given grammar is in regular form can in A has exactly one frontier node that is designated produce a set of elementary trees that will extend a as its foot. This must be labeled with the same non- grammar that does not meet the condition to one that terminal as the root. The auxiliary and initial trees are does. 3 Thus the grammar can be written largely on the distinguished by the presence (or absence, respectively) basis of the linguistic structures that it is intended to of a foot node. Every other frontier node that is la- capture. We show that, while the LCFGs that are built beled with a non-terminal is considered to be marked by Schabes and Waters's algorithm for lexicalization of for substitution. In a lexicalized TAG (LTAG) every CFGs are in regular form, the restrictions they employ tree in I tO A must have some frontier node designated are unnecessarily strong. the anchor, which must be labeled with a terminal. Unless otherwise stated, we include both elementary Regular form provides a partial answer to the more general issue of characterizing the TAGs that generate and derived trees when referring to initial trees and local sets. It serves as a normal form for these TAGs in auxiliary trees. A TAG derives trees by a sequence of substitutions and adjunctions in the elementary trees. the same way that regular grammars serve as a normal In an instance of an in which the form for CFGs that generate regular languages. While substitution initial tree root is labeled X E NT is substituted for a frontier node for every TAG that generates a local set there is a TAG (other than the foot) in an instance of either an initial in regular form that generates the same set, and every or auxiliary tree that is also labeled X. Both trees may TAG in regular form generates a local set (modulo pro- jection), there are TAGs that are not in regular form be either an elementary tree or a derived tree. In an instance of an in which that generate local sets, just as there are CFGs that adjunction auxiliary tree generate regular languages that are not regular gram- the root and foot are labeled X is inserted at a node, also labeled X, in an instance of either an initial or mars. auxiliary tree as follows: the subtree at that node is ex- The next section of this paper briefly introduces no- cised, the auxiliary tree is substituted at that node, and tation for TAGs and the concept of recognizable sets. the excised subtree is substituted at the foot of the aux- Our results on regular form are developed in the subse- iliary tree. Again, the trees may be either elementary quent section. We first define a restricted use of the ad- or derived. junction operation--derivation by regular adjunction-- The set of objects ultimately derived by a TAG 6' is which we show derives only recognizable sets. We then T(G), the set of completed initial trees derivable in (;. define the class of TAGs in regular form and show that These are the initial trees derivable in G in which tile the set of trees derivable in a TAG of this form is deriv- root is labeled S and every frontier node is labeled with able by regular adjunction in that TAG and is therefore a terminal (thus no nodes are marked for substitution.) recognizable. We next show that every local set can be We refer to the set of all trees, both initial and auxiliary, generated by a TAG in regular form and that Schabes with or without nodes marked for substitution, that are and Waters's construction for LCFGs in fact produces derivable in G as TI(G).