A Tractable Extension of Linear Indexed Grammars

A T r a c t a b l e E x t e n s i o n o f L i n e a r I n d e x e d G r a m m a r s . Bill K e l l e r and D a v i d W e i r School of Cognitive and Computing Sciences. University of Sussex Falmer, Brighton BN1 9QH. UK b±11. k e l l e r / d a v i d , w e ± r ~ l c o g s , s u s s e x . ac. uk. A b s t r a c t . Vijay-Shanker and Weir (1993) show t h a t Linear Indexed G r a m m a r s (I_IG) can be processed in p o l y n o m i a l t i m e by ex- ploiting constraints which m a k e possible the extensive use of structure-sharing. T h i s p a p e r describes a f o r m a l i s m t h a t is m o r e powerful t h a n I_IG, b u t which can also be processed in p o l y n o m i a l t i m e using similar techniques. T h e formal- ism, which we refer to as P a r t i a l l y Lin- ear PATR (PI_PATR) m a n i p u l a t e s feature s t r u c t u r e s r a t h e r t h a n stacks.. 1 I n t r o d u c t i o n . Unification-based g r a m m a r formalisms can be viewed as generalizations of C o n t e x t - F r e e G r a m - m a r s ( C F G ) where the n o n t e r m i n a l symbols are replaced by an infinite d o m a i n of feature struc- tures. Much of their p o p u l a r i t y stems f r o m t h e way in which s y n t a c t i c generalization m a y be el- egantly s t a t e d by m e a n s o f constraints a m o n g s t features and their values. U n f o r t u n a t e l y , the ex- pressivity o f these formalisms can have undesir- able consequences for their processing. In naive i m p l e m e n t a t i o n s o f unification g r a m m a r parsers, f e a t u r e s t r u c t u r e s play the same role as nonter- minals in s t a n d a r d context-free g r a m m a r parsers. P o t e n t i a l l y large f e a t u r e s t r u c t u r e s are stored at i n t e r m e d i a t e steps in the c o m p u t a t i o n , so t h a t t h e space r e q u i r e m e n t s of the a l g o r i t h m are ex- pensive. F u r t h e r m o r e , the need to p e r f o r m non- destructive unification m e a n s t h a t a large prop o r- tion of the processing t i m e is spent copying feat u re structures.. One a p p r o a c h to this p r o b l e m is to refine pars- ing a l g o r i t h m s by developing techniques such as restrictions, s t r u c t u r e - s h a r i n g , and lazy unifica- tion t h a t reduce the a m o u n t of s t r u c t u r e t h a t is stored and hence the need for copying of features. st ru ct u res (Shieber, 1985; Pereira, 1985; Kart- t u n en and Kay, 1985; Wroblewski, 1987; Gerde- m an n , 1989; G o d d e n , 1990; Kogure, 1990; Emele, 1991; To m ab ech i , 1991; Harrison and Ellison, 1992)). While these techniques can yield signifi- cant i m p r o v e m e n t s in performance, the generality o f unification-based g r a m m a r formalisms m e a n s t h a t there are still cases where expensive process- ing is unavoidable. T h i s ap p ro ach does not ad- dress the f u n d a m e n t a l issue o f the t r a d e o f f be- tween the descriptive capacity o f a fo rm al i sm an d its c o m p u t a t i o n a l power.. In this p a p e r we identify a set o f constraints t h a t can be placed on unification-based g r a m m a r formalisms in order to g u a r a n t e e the existence o f p o l y n o m i a l t i m e parsing algorithms. O u r choice of constraints is m o t i v a t e d by showing how t h e y generalize constraints inherent in Linear Indexed G r a m m a r (l_lG). We begin by describing how con- straints inherent in I.IG a d m i t t r a c t a b l e process- ing algorithms and t h e n consider how these con- straints can be generalized to a fo rm al i sm t h a t m a n i p u l a t e s trees r a t h e r t h a n stacks. T h e con- straints t h a t we identify for the tree-based sys- t e m can be regarded equally well as constraints on unification-based g r a m m a r formalisms such as PArR (Shieber, 1984).. 2 F r o m S t a c k s t o T r e e s . An Indexed G r a m m a r (IG) can be viewed as a CFG in which each n o n t e r m i n a l is associated with a stack of indices. P r o d u c t i o n s specify n o t only how n o n t e r m i n a l s can be rew ri t t en b u t also how their associated stacks are modified. 1_16, which were first described by G a z d a r (1988), are constrained such t h a t stacks are passed fro m t h e m o t h e r t o at m o st a single daughter.. For I_IG, t h e size o f the d o m a i n o f n o n t e r m i - nals an d associated stacks (the analogue o f the n o n t e r m i n a l s in CFG) is not b o u n d by the g ram - m ar. However, Vijay-Shanker and Weir (1993) d e m o n s t r a t e t h a t p o l y n o m i a l t i m e p e r f o r m a n c e . 7 5 . can b e achieved t h r o u g h t h e use o f s t r u c t u r e - s h a r i n g m a d e possible b y c o n s t r a i n t s in the way t h a t LI6 use stacks. A l t h o u g h stacks o f un- b o u n d e d size can arise d u r i n g a d e r i v a t i o n , it is n o t possible for a LIG t o specify t h a t two depen- dent, u n b o u n d e d s t a c k s m u s t a p p e a r a t distinct places in t h e d e r i v a t i o n tree. S t r u c t u r e - s h a r i n g c a n t h e r e f o r e b e used effectively b e c a u s e check- ing t h e a p p l i c a b i l i t y o f rules a t each step in the d e r i v a t i o n involves t h e c o m p a r i s o n of s t r u c t u r e s o f l i m i t e d size.. O u r goal is t o generalize t h e c o n s t r a i n t s inher- ent in LIG t o a f o r m a l i s m t h a t m a n i p u l a t e s fea- t u r e s t r u c t u r e s r a t h e r t h a n stacks. As a guidl ing h e u r i s t i c we will a v o i d f o r m a l i s m s t h a t gen- e r a t e tree sets w i t h an unbounded n u m b e r of un- b o u n d e d , d e p e n d e n t branches. I t a p p e a r s t h a t the s t r u c t u r e - s h a r i n g t e c h n i q u e s used w i t h LIG c a n n o t b e generalized in a s t r a i g h t f o r w a r d way t o such f o r m a l i s m s . . S u p p o s e t h a t we generalize LIG t o allow t h e s t a c k t o b e p a s s e d f r o m t h e m o t h e r t o two d a u g h - ters. I f this is done recursion can b e used to pro- duce a n u n b o u n d e d n u m b e r o f u n b o u n d e d , depen- d e n t b r a n c h e s . A n a l t e r n a t i v e is t o allow an un- b o u n d e d s t a c k t o b e s h a r e d b e t w e e n two (or m o r e ) d a u g h t e r s b u t not w i t h t h e m o t h e r . T h u s , rules m a y m e n t i o n m o r e t h a n one u n b o u n d e d stack, b u t t h e s t a c k a s s o c i a t e d w i t h t h e m o t h e r is still asso- c i a t e d w i t h a t m o s t one d a u g h t e r . We refer t o this e x t e n s i o n as P a r t i a l l y L i n e a r I n d e x e d G r a m - m a r s (PLIG).. E x a m p l e 1 The PLIG with the following produc- tions generates the language. { anbmcnd m In, m > 1 }. and the tree set shown in Figure 1. Because a sin- gle PUG production may mention more than one unbounded stack, variables (x, y) are introduced to distinguish between them. The notation A[xa] is used to denote the nonterminal A associated with any stack whose top symbol is ~r.. A [ x ] --+ aA[¢a], B[x~] -~ bBb], C [ ~ ] -~ c C b ] , D [ x a ] --* dD[x],. A[x] ~ B[y]C[x]D[y], B[~] - ~ b, C[~] -~ c, D[a] ---* d.. E x a m p l e 2 A PLIG with the following produc- tions generates the k-copy language over { a,b }*, i.e., the language. {w' Iwe {o,b}" }. An. a A[~]. a A[cr n ]. B[,~ m]. b B[~]. b. C[c~ n] D[~ m]. c C[o-"-'] d v [ o - " - ' ] . c c [ ~ ] d D[o-]. e d. F i g u r e 1: Tree set for { a " b m c ' d "~ I n , m >_ 1 }. where k > 1.. sD k copies. A[xch] --~ a A[x], A [ z ~ J ~ b A[x].. E x a m p l e 3 PLIG can "count" to any fixed k, i.e., a PLIG with the following productions generates the language. { a ? . . . a n In>O} where k > 1.. S~ --* A l [ z ] . . . A k [ z ] , Al[xa] ~ al Al[x], A I ~ --~ A,. Ak [x~r] --+ ak Ak [x], Ak ~ --* A.. I n PLIG, stacks s h a r e d a m o n g s t siblings c a n n o t be passed to the m o t h e r . As a consequence, t h e r e is no possibility t h a t recursion can b e used t o in- crease t h e n u m b e r o f d e p e n d e n t branches. I n fact, t h e n u m b e r o f d e p e n d e n t b r a n c h e s is b o u n d e d b y the length of the r i g h t - h a n d - s i d e of p r o d u c t i o n s . By t h e s a m e token, however, PUG m a y o n l y gen- e r a t e s t r u c t u r a l descriptions in which d e p e n d e n t . 7 6 . rll rl2. A[r, d S2[c~( r,,, r~)]. a A[rn-1]. a A [ n ] . / b B[rn-1] C[rn]. b BIll]. J b c C [ r l ] . /. where rl = ~1 a n d r i + l = ~2(ri). F i g u r e 2: Tree set for { anbncn In > 1 }. b r a n c h e s begin a t n o d e s t h a t are siblings o f one a n o t h e r . N o t e t h a t the tree shown in F i g u r e 2 is u n o b t a i n a b l e b e c a u s e the b r a n c h r o o t e d a t 7/1 is d e p e n d e n t on m o r e t h a n one o f t h e branches o r i g i n a t i n g a t its sibling r/2.. T h i s l i m i t a t i o n can b e o v e r c o m e by m o v i n g to a f o r m a l i s m t h a t m a n i p u l a t e s trees r a t h e r t h a n stacks. We consider a n extension o f CFG in which each n o n t e r m i n a l A is associated w i t h a tree r . P r o d u c t i o n s now specify how the tree associated w i t h t h e m o t h e r is r e l a t e d to the trees associ- a t e d w i t h t h e d a u g h t e r s . We d e n o t e trees w i t h first o r d e r t e r m s . For e x a m p l e , t h e following pro- d u c t i o n requires t h a t t h e x a n d y s u b t r e e s o f the m o t h e r ' s tree are s h a r e d w i t h the B a n d C d a u g h - ters, respectively. I n a d d i t i o n , t h e d a u g h t e r s have in c o m m o n the s u b t r e e z.. A[ao(x,y)] --* B[ch(z, z)] z)]. T h e r e is a need to i n c o r p o r a t e s o m e kind o f generalized n o t i o n o f linearity into such a s y s t e m . C o r r e s p o n d i n g to t h e linearity r e s t r i c t i o n in [16 we require t h a t a n y p a r t o f the m o t h e r ' s tree is p a s s e d t o a t m o s t one d a u g h t e r . C o r r e s p o n d i n g to t h e partial l i n e a r i t y o f PIAG, we p e r m i t subtrees t h a t are n o t s h a r e d w i t h t h e m o t h e r to be s h a r e d a m o n g s t t h e d a u g h t e r s . Under these conditions, the tree set shown in F i g u r e 2 can be generated.. current q • s t a t e . a i - 1 a i a i + l I I. I A t. first ' T ' last. n o n b l a n k ~ a j [ an " n o n b l a n k s y m b o l current s y m b o l . s y m b o l . Figure 3: E n c o d i n g a T u r i n g Machine. T h e nodes 71 a n d r/2 share the tree rn, which oc- curs twice a t the node r/2. At r12 the two copies o f rn are d i s t r i b u t e d across the daughters.. T h e f o r m a l i s m as c u r r e n t l y described can be used t o s i m u l a t e a r b i t r a r y T u r i n g Machine com- p u t a t i o n s . T o see this, n o t e t h a t an i n s t a n t a - neous description o f a T u r i n g Machine can b e en- coded with a tree as shown in Figure 3. Moves o f the T u r i n g Machine can be s i m u l a t e d by u n a r y productions. T h e following p r o d u c t i o n m a y b e glossed: "if in s t a t e q a n d scanning the s y m b o l X , t h e n change s t a t e to q~, write t h e s y m b o l Y a n d m o v e left" 1. A[q(W(x), X, y)] --* A[q'(x, W, r ( y ) ) ] . One solution to this p r o b l e m is to p r e v e n t a sin- gle d a u g h t e r sharing m o r e t h a n one o f its s u b t r e e s w i t h t h e m o t h e r . However, we do not i m p o s e this restriction because it still leaves open the possi- bility of g e n e r a t i n g trees in which every b r a n c h has the s a m e length, thus v i o l a t i n g the condition t h a t trees have a t m o s t a b o u n d e d n u m b e r of un- b o u n d e d , d e p e n d e n t branches. Figure 4 shows how a set o f such trees can be g e n e r a t e d by il- l u s t r a t i n g t h e effect o f the following p r o d u c t i o n . . A[c~(cr(x, y), a ( x ' , y'))] ---* A[a(z, x)] A[cr(z, y)] d [ ~ ( z , z ' ) ] . u')]. T o see this, a s s u m e (by induction) t h a t all four o f the d a u g h t e r n o n t e r m i n a l s are associated w i t h the full b i n a r y tree o f height i (v 0 . All four o f these trees are constrained to be equal b y the p r o d u c t i o n given above, which requires t h a t t h e y h a v e identical left (i.e. z) s u b t r e e s (these s u b t r e e s m u s t be the full b i n a r y tree v i - 1 ) . P a s s i n g the right subtrees (x, y, z' a n d //I) to the m o t h e r as shown allows the c o n s t r u c t i o n o f a full b i n a r y tree with height i + 1 ( r i + l ) . T h i s can b e r e p e a t e d a n . 1There will be a set of such productions for each tape symbol W.. 7 7 . A f. ~ T i + l 0. 0.. A 0. A . 0 . . V~V~ V~V~. A 0. I A 0. I. I / ' D [ B [] 77/%. A % . . r i - l = [7]. F i g u r e 4: B u i l d i n g full b i n a r y trees. u n b o u n d e d n u m b e r o f t i m e s so t h a t all full b i n a r y trees are p r o d u c e d . . T o o v e r c o m e b o t h o f these p r o b l e m s we i m p o s e the following a d d i t i o n a l c o n s t r a i n t on t h e p r o d u c - t i o n s o f a g r a m m a r . We require t h a t s u b t r e e s of t h e m o t h e r t h a t are p a s s e d t o d a u g h t e r s t h a t share s u b t r e e s w i t h one a n o t h e r m u s t a p p e a r as siblings in t h e m o t h e r ' s tree. N o t e t h a t this condition rules o u t t h e p r o d u c t i o n responsible for building full bi- n a r y trees since t h e x, y, x ' a n d y ' s u b t r e e s are n o t siblings in t h e m o t h e r ' s tree despite the f a c t t h a t all o f t h e d a u g h t e r s s h a r e a c o m m o n s u b t r e e z. Moreover, since a d a u g h t e r shares s u b t r e e s w i t h itself, a special case o f t h e c o n d i t i o n is t h a t sub- trees o c c u r r i n g w i t h i n s o m e d a u g h t e r c a n only ap- p e a r as siblings in t h e m o t h e r . T h i s condition also rules o u t t h e T u r i n g M a c h i n e s i m u l a t i o n . W e refer t o t h i s f o r m a l i s m as P a r t i a l l y L i n e a r Tree G r a m - m a r s (PLTG). As a f u r t h e r i l l u s t r a t i o n of the con- s t r a i n t s places on s h a r e d s u b t r e e s , F i g u r e 5 shows a local tree t h a t could a p p e a r in a d e r i v a t i o n tree. T h i s local t r e e is licensed b y t h e following p r o d u c - t i o n which r e s p e c t s all o f t h e c o n s t r a i n t s on PLT6 p r o d u c t i o n s . . A[0.1(f2(xl, x2, x3), f 3 ( x 4 , 0.4))1 --* B[0.~(~, ~ , x l ) ] c[0.~(0.~, ~)1 D[0.8(~=, ~ , ~ ) ] . N o t e t h a t in F i g u r e 5 t h e d a u g h t e r n o d e s labelled B a n d D s h a r e a c o m m o n s u b t r e e a n d t h e sub- trees s h a r e d b e t w e e n t h e m o t h e r a n d t h e B a n d D d a u g h t e r s a p p e a r as siblings in t h e tree associated. i f l . 0"2 0.3. [] [] [] [] f~. [] [] D I [] [] []. Figure 5: A PLTG local tree. w i t h the m o t h e r . . E x a m p l e 4 The PLTG with the following produc- tions generates the language. { a " b " c ~ In >_ 1 }. and the tree set shown in Figure 2.. S l [frO] ""+ A[x] $2 If(x, x)], & [ f ( ~ , y)] --+ B i d & [ y ] , &Ix] - ~ c[d, A [ a 2 ( x ) ] --* aA[x], B[0.~(~)] - ~ b ~ [ ~ ] , C[0.2(x)] - ~ cC[~],. A [ f l ] - - a, B[0.1] --~ b, C [ 0 . d - ~ c.. E x a m p l e 5 The PLTG with the following produc- tions generates the language of strings consisting of k copies of strings of matching parenthesis, i.e., the language. where k k 1 and D is the set of strings in { ( , ) }* that have balanced brackets, i. e, the Dyck language over { (,) }.. s[] - ~ , A [ x ] . A[x]: AB -~ ~, Y. k copies. A [ f l ( x ) ] --* ( A[z] ), A[a2(x, y)] --~ A[z] A[y].. 3 T r e e s t o F e a t u r e S t r u c t u r e s . Finally, we n o t e t h a t acyclic f e a t u r e s t r u c t u r e s w i t h o u t r e - e n t r a n c y can b e viewed as trees w i t h b r a n c h e s labelled b y f e a t u r e n a m e s a n d a t o m i c values o n l y found a t leaf nodes (interior n o d e s . 7 8 . b e i n g u n l a b e l l e d ) . Based on this o b s e r v a t i o n , we can consider t h e c o n s t r a i n t s we have f o r m u - l a t e d for the tree s y s t e m PI_TG as c o n s t r a i n t s on a u n i f i c a t i o n - b a s e d g r a m m a r f o r m a l i s m such as PARR. We will call this s y s t e m P a r t i a l l y L i n e a r PATR (PI_PATR). H a v i n g m a d e the m o v e f r o m trees t o f e a t u r e s t r u c t u r e s , we consider the possibility o f r e - e n t r a n c y in PI_PATR.. N o t e t h a t t h e f e a t u r e s t r u c t u r e a t the r o o t o f a PI_PATR d e r i v a t i o n tree will n o t involve re- entrancy. However, for the following reasons we believe t h a t this does n o t c o n s t i t u t e as g r e a t a l i m i t a t i o n as it m i g h t a p p e a r . In unification-based g r a m m a r , the f e a t u r e s t r u c t u r e associated with the r o o t o f t h e tree is often r e g a r d e d as the struc- t u r e t h a t h a s been derived f r o m the i n p u t (i.e., the o u t p u t o f a p a r s e r ) . As a consequence there is a t e n d e n c y to use t h e g r a m m a r rules t o accu- m u l a t e a single, large f e a t u r e s t r u c t u r e giving a c o m p l e t e encoding o f the analysis. T o do this, un- b o u n d e d f e a t u r e i n f o r m a t i o n is passed up the tree in a way t h a t v i o l a t e s the c o n s t r a i n t s developed in this p a p e r . R a t h e r t h a n giving such prominenc.e to the r o o t f e a t u r e s t r u c t u r e , we suggest t h a t t h e entire d e r i v a t i o n tree should be seen as the o b j e c t t h a t is derived f r o m the i n p u t , i.e., this is w h a t t h e p a r s e r r e t u r n s . Because f e a t u r e s t r u c t u r e s as- s o c i a t e d w i t h all nodes in t h e tree are available, f e a t u r e i n f o r m a t i o n need o n l y b e p a s s e d up t h e tree when it is required in order t o establish de- pendencies w i t h i n the d e r i v a t i o n tree. W h e n this a p p r o a c h is t a k e n , there m a y be less need for re- e n t r a n c y in t h e r o o t f e a t u r e s t r u c t u r e . Further- m o r e , r e - e n t r a n c y in t h e f o r m o f s h a r e d f e a t u r e s t r u c t u r e s w i t h i n a n d across nodes will be found in PI_PATR (see for e x a m p l e Figure 5).. 4 G e n e r a t i v e C a p a c i t y . HG are m o r e powerful t h a n CI=G a n d are known to b e w e a k l y equivalent t o T r e e A d j o i n i n g G r a m m a r , C o m b i n a t o r y C a t e g o r i a l G r a m m a r , a n d H e a d G r a m m a r ( V i j a y - S h a n k e r a n d Weir, 1994). PI_IG are m o r e powerful t h a n I_IG since t h e y can gener- a t e the k - c o p y l a n g u a g e for a n y fixed k (see E x a m - ple 2). Slightly m o r e generally, PI_IG can g e n e r a t e t h e l a n g u a g e . { w ~ ] w e R } . for a n y k > 1 a n d r e g u l a r l a n g u a g e R. We be- lieve t h a t t h e l a n g u a g e involving copies o f strings o f m a t c h i n g b r a c k e t s described in E x a m p l e 5 can- n o t b e g e n e r a t e d b y PI_IG b u t , as shown in E x a m - pie 5, it can b e g e n e r a t e d b y P/T(:; a n d therefore PLPATR. Slightly m o r e generally, PLTG can gener-. a t e the l a n g u a g e . {w k I w ~ L }. for a n y k > 1 and context-free l a n g u a g e L. I t a p p e a r s t h a t the class of l a n g u a g e s g e n e r a t e d by PI_TG is included in those languages g e n e r a t e d b y Linear C o n t e x t - F r e e R e w r i t i n g S y s t e m s (Vijay- Shanker et al., 1987) since the c o n s t r u c t i o n in- volved in a p r o o f o f this underlies the recognition a l g o r i t h m discussed in the n e x t section.. As is the case for the tree sets o f 16, 1_16 and Tree Adjoining G r a m m a r , the tree sets g e n e r a t e d by PI_TG have p a t h sets that. are context-free lan- guages. In o t h e r words, the set of all strings la- belling r o o t t o frontier p a t h s of derivation trees is a context-free language. While the tree sets of lAG and Tree Adjoining G r a m m a r s have inde- p e n d e n t branches, PI_T6 tree sets exhibit depen- dent branches, where the n u m b e r o f d e p e n d e n t branches in any tree is b o u n d e d b y the g r a m m a r . Note t h a t the n u m b e r of d e p e n d e n t b r a n c h e s in the tree sets o f 16 is not b o u n d e d by the g r a m m a r (e.g., t h e y generate sets of all full b i n a r y trees).. 5 T r a c t a b l e R e c o g n i t i o n . In this section we outline the m a i n ideas un- derlying a p o l y n o m i a l t i m e recognition a l g o r i t h m for PlPATR t h a t generalizes the CKY a l g o r i t h m ( K a s a m i , 1965; Younger, 1967). T h e key to this a l g o r i t h m is the use of s t r u c t u r e sharing tech- niques s i m i l a r to those used to process I_lG effi- ciently ( V i j a y - S h a n k e r and Weir, 1993). T o un- d e r s t a n d how these techniques are applied in the case of PLPATR, it is therefore helpful to consider first the s o m e w h a t s i m p l e r case o f I_lG.. T h e CKY a l g o r i t h m is a b o t t o m - u p recognition a l g o r i t h m for CI=G. For a given g r a m m a r G a n d i n p u t string a l . . . a,~ t h e a l g o r i t h m c o n s t r u c t s an a r r a y P , h a v i n g n 2 elements, where e l e m e n t P[i, j] stores all a n d o n l y those n o n t e r m i n a l s of G t h a t derive the s u b s t r i n g ai...aj. A naive a d a p t a - tion o f this a l g o r i t h m for I_lG recognition would involve storing a set o f n o n t e r m i n a l s a n d their as- sociated stacks. B u t since stack length is a t least p r o p o r t i o n a l to the length o f the i n p u t string, the r e s u l t a n t a l g o r i t h m would e x h i b i t e x p o n e n - tial space a n d t i m e c o m p l e x i t y in the worst case. V i j a y - S h a n k e r a n d Weir (1993) showed t h a t the b e h a v i o u r of the naive a l g o r i t h m can b e i m p r o v e d upon. In I_lG derivations the a p p l i c a t i o n o f a rule c a n n o t depend on m o r e t h a n a b o u n d e d p o r t i o n o f the t o p of the stack. T h u s , r a t h e r t h a n s t o r i n g the whole o f the. p o t e n t i a l l y u n b o u n d e d stack in a p a r t i c u l a r a r r a y entry, it suffices to store j u s t . 7 9 . A[~acr']. (a) / / / ~ . y ai B[a~]. ap aq B[a'~r]. (b). a T aq A[~'~ro"]. ai Bloc'or] aj. a T aq. Figure 6: " C o n t e x t - F r e e n e s s ' in I_IG derivations. a b o u n d e d p o r t i o n t o g e t h e r with a p o i n t e r t o t h e residue.. Consider Figure 6. Tree (a) shows a LIG deriva- tion of t h e substring h i . . . a j f r o m t h e o b j e c t A [ a a a ' ] . In this d e r i v a t i o n tree, the n o d e labelled B[aa] is a distinguished descendant of t h e r o o t s and is t h e first p o i n t below A[c~rcr ~] at which the top s y m b o l (or) of the ( u n b o u n d e d ) stack a a is ex- posed. T h i s node is called the terminator o f the n o d e labelled A[acr]. It is n o t difficult to show t h a t only t h a t p o r t i o n of the derivation below t h e ter- m i n a t o r n o d e is d e p e n d e n t on m o r e t h a n t h e t o p of t h e stack h a . It follows t h a t for any stack a ' a , if t h e r e is a d e r i v a t i o n of the substring % . . . h e f r o m B[c~'c~] (see tree (b)), t h e n there is a cor- r e s p o n d i n g d e r i v a t i o n of a i . . . a j f r o m A[al~rcr '] (see tree (c)). T h i s captures the sense in which I_IG derivations e x h i b i t "context-freeness". Effi- cient storage of stacks can therefore be achieved by storing in P i t , j] j u s t t h a t b o u n d e d a m o u n t of i n f o r m a t i o n ( n o n t e r m i n a l plus top of stack) rele- v a n t to rule a p p l i c a t i o n , t o g e t h e r with a p o i n t e r t o any e n t r y in Pip, q] representing a s u b d e r i v a t i o n f r o m an o b j e c t B[c~'a].. 2The stack a a associated with B is "inherited" from the stack associated with A at the root of the tree.. Before describing how we a d a p t this technique to the case o f PLPATR we discuss t h e sense in which PLPATR derivations exhibit a "context- freeness" property. T h e constraints on PLPATR which we have identified in this p a p e r ensure t h a t these feat u re values can be m a n i p u l a t e d indepen- dently of one a n o t h e r and t h a t t h e y behave in a stack-like way. As a consequence, t h e storage technique used effectively for LIG recognition m a y be generalized to t h e case o f PLPATR.. Suppose t h a t we have the derived tree shown in Figure 7 where the nodes at the r o o t of the subtrees T1 an d 7"2 are the so-called f - t e r m i n a t o r an d g - t e r m i n a t o r o f t h e tree's ro o t , respectively. Ro u g h l y speaking, the f - t e r m i n a t o r o f a node is the n o d e f r o m which it gets t h e value for the fea- t u re f , Because o f the constraints on t he f o r m of PLPATR productions, the derivations between the r o o t o f 7- and these t e r m i n a t o r s c a n n o t in gen- eral d ep en d on m o re t h a n a b o u n d e d p a r t of t h e feat u re s t r u c t u r e s [ ] an d [-~. At the r o o t of the. figure t h e f e a t u r e s t r u c t u r e s [-i-] an d [ ] have been e x p a n d e d t o show the e x t e n t of t h e d e p e n d e n c y in this example. In this case, t h e value o f the f e a t u r e . in [-~ m u s t be a, whereas, t h e f e a t u r e g is Y n o t fixed. F u r t h e r m o r e , t h e value of t h e f e a t u r e g in. m u st be b, whereas, the feat u re f is n o t fixed. T h i s means, for example, t h a t t h e applicability of t h e p r o d u c t i o n s used on t h e p a t h f r o m t he r o o t o f r l t o t h e r o o t o f r depends on t h e f e a t u r e f in [ ] having t h e value a b u t does n o t d ep en d on the. value of t h e feat u re g in [~]. N o t e t h a t in this tree. the value of the f e a t u r e g in [-~ is. [,:c] F I = 9 Fa. and t h e value o f the feat u re f in [ ~ is. F ~ = g : d . Suppose t h a t , in ad d i t i o n to the t ree shown in Figure 7 t h e g r a m m a r generates t h e pair of trees shown in Figure 8. Notice t h a t while the f e a t u r e s t r u c t u r e s at the ro o t of r~ an d r4 are n o t c o m p a t - ible with ~ an d [~], t h e y do agree w i t h respect to those p a r t s t h a t are fully e x p a n d e d at v's r o o t node. T h e "context-freeness" o f PI_PATR m e a n s t h a t given t h e t h ree trees shown in Figures 7 and 8 the tree shown in Figure 9 will also be g e n e r a t e d by the g r a m m a r . . T h i s gives us a m ean s o f efficiently st o ring the p o t e n t i a l l y u n b o u n d e d feat u re s t r u c t u r e s associ- ated with nodes in a derivation tree (derived fea- t u r e structures). By analogy w i t h t h e s i t u a t i o n for. 80. g : F 1 . 9 : b . ap aq ar as. Figure 7: T e r m i n a t o r s in PLPATR. ['i ]] [ ! , F ] ] f : c j f : g : d j4 g : g F~ g : ap aq ar as. Figure 8: C o m p a t i b l e subderivations. 9 F~ ][7]. g g : . ap aq ar as. Figure 9: A l t e r n a t i v e derivation. LIG, derived feat u re s t r u c t u r e s can be viewed as consisting o f a b o u n d e d p a r t (relevant t o rule ap- plication) plus u n b o u n d e d i n f o r m a t i o n a b o u t the values o f features. For each feature, we store in the recognition array a b o u n d e d a m o u n t of in- f o r m a t i o n a b o u t its value locally, t o g e t h e r with a p o i n t er to a f u r t h e r array element. Entries in this element o f the recognition a r r a y t h a t are c o m p a t - ible (i.e. unifiable) with the bounded, local infor- m a t i o n correspond to different possible values for the feature. For example, we can use a single en- t r y in the recognition array to store the fact t h a t all of the feat u re st ru ct u res t h a t can a p p e a r at t h e r o o t o f the trees in Figure 9 derive the substring a i . . . a j . Th i s e n t r y would be underspecified, for. example, the value o f feature [-~ would be spec- ified to be any feature stored in t h e a r r a y e n t r y for the substring a p . . . aq whose feat u re f had the value a.. However, this is n o t the end of the story. In con- t rast to LIG, PLPATR licenses s t r u c t u r e sharing on the right h a n d side o f productions. T h a t is, par- tial linearity p e r m i t s feat u re values to be shared between daughters where they are not also shared with the m o t h e r . Bu t in t h a t case, it ap p ears t h a t checking t h e applicability o f a p r o d u c t i o n at some point in a derivation m u s t entail the com- parison o f structures o f u n b o u n d e d size. In fact, this is not so. T h e PLPATR recognition a l g o r i t h m employs a second array (called the c o m p a t i b i l i t y array ), which encodes i n f o r m a t i o n a b o u t t h e com- p at i b i l i t y of derived feat u re structures. Tuples o f co m p at i b l e derived feature st ru ct u res are stored in the c o m p a t i b i l i t y array using ex act l y the same approach used to store feature st ru ct u res in the m ai n recognition array. T h e presence o f a t u p l e in the c o m p a t i b i l i t y array (the indices o f which encode which i n p u t substrings are spanned) in- dicates the existence o f derivations o f c o m p a t i b l e feature structures. Due to the "context-freeness" o f PLPATR, new entries can be added to the com- p at i b i l i t y array in a b o t t o m - u p m a n n e r based on existing entries w i t h o u t the need t o r e c o n s t r u c t complete feature structures.. 6 C o n c l u s i o n s . In considering ways o f ex t en d i n g LIG, this p a p e r has i n t r o d u c e d the notion o f p art i al linearity an d shown how it can be manifested in t h e fo rm o f a constrained unification-based g r a m m a r fo rm al - ism. We have explored examples o f the kinds o f tree sets and string languages t h a t this s y s t e m can generate. We have also briefly outlined t h e sense in which p a r t i a l linearity gives rise to "context- freeness" in derivations and sketched how this can. 8 1 . be exploited in order to obtain a tractable recog- nition algorithm.. 7 A c k n o w l e d g e m e n t s . We thank Roger Evans, Gerald Gazdar~ Aravind Joshi, Bernard Lang, Fernando Pereira, Mark Steedman and K. Vijay-Shanker for their help.. R e f e r e n c e s . Martin Emele. 1991. Unification with lazy non- redundant copying. In 29 th meeting Assoc. Comput. Ling., pages 323--330, Berkeley, C A . . G. Gazdar. 1988. Applicability of indexed gram- mars to natural languages. In U. Reyle and C. Rohrer, editors, Natural Language Parsing and Linguistic Theories, pages 69--94. D. Rei- del, Dordrecht, Holland.. Dale Gerdemann. 1 9 8 9 . Using restrictions to optimize unification parsing. In International Workshop of Parsing Technologies, pages 8 - - 17, Pittsburgh, PA.. Kurt Godden. 1990. Lazy unification. In 28 th meeting Assoc. Comput. Ling., pages 180--187, Pittsburgh, PA.. S. P. Harrison and T. M. Ellison. 1992. Restric- tion and termination in parsing with feature- theoretic grammars. Computational Linguis- tics, 18(4):519--531.. L. Karttunen and M. Kay. 1985. Structure shar- ing with binary trees. In 23 th meeting Assoc. Comput. Ling., pages 133--136.. T. Kasami. 1965. An efficient recognition and syntax algorithm for context-free languages. Technical Report AF-CRL-65-758, Air Force Cambridge Research Laboratory, Bedford, MA.. Kiyoshi Kogure. 1990. Strategic lazy incremental copy graph unification. In 13 °` International Conference on Comput. Ling., pages 223--228, Helsinki.. P. C. N. Pereira. 1985. A structure-sharing representation for unification-based grammar formalisms. In 23 ~h meeting Assoc. Comput. Ling., pages 137--144.. S. M. Shieber. 1984. The design of a computer language for linguistic information. In 10 th International Conference on Comput. Ling., pages 363-366.. S. M. Shieber. 1 9 8 5 . Using restriction to ex- tend parsing algorithms for complex-feature- based formalisms. In 23 rd meeting Assoc. Corn- put. Ling., pages 82-93.. Hideto Tomabechi. 1 9 9 1 . Quasi-destructive graph unification. In 29 th meeting Assoc. Corn- put. Ling., pages 315--322, Berkeley, CA.. K. Vijay-Shanker and D. J. Weir. 1993. Parsing some constrained grammar formalisms. Com- putational Linguistics, 19(4):591--636.. K. Vijay-Shanker and D. a. Weir. 1 9 9 4 . The equivalence of four extensions of context-free grammars. Math. Syst. Theory, 27:511-546.. K. Vijay-Shanker, D. J. Weir, and A. K. Joshi. 1987. Characterizing structural descriptions produced by various grammatical formalisms. In 25 th meeting Assoc. Comput. Ling., pages 104-111.. David Wroblewski. 1987. Nondestructive graph unification. In 6 th National Conference on Arti- ficial Intelligence, pages 582--587, Seattle, WA.. D. H. Younger. 1967. Recognition and parsing of context-free languages in time n 3. Information and Control, 10(2):189-208.. 82

New documents

Human Right Ending We used the human- written “right ending” in SCT as the ground truth.. Two candidates in SCT are written by a person that did not write the original story

The first stage planning maps the input facts encoded as a directed, labeled graph, where nodes represent entities and edges represent relations to text plans, while the second stage

There had been improvements in the overall governance and management of the centre since the previous inspection and a number of systems had been put in place to ensure that the service

In conclusion, we demonstrated in this study for the first time that the newly discovered cyto- kine IL-34 is expressed by the periprosthetic membranes of patients with aseptic

While automatic output quality estimation QE is an established field of research in other areas of NLP, such as machine translation MT Specia et al., 2010, 2018, research on QE in

There had been continued improvements in the overall governance and management of the centre since the previous inspection and a number of systems had been put in place to ensure that

Eligible studies should provide the number of patients with a short and long RFI 24-months as a cutoff usu- ally and their corresponding 5-year PRS.. The pooled relative risk RR with

Human evaluation of natural language generation systems can be done using intrinsic and extrinsic methods Sparck Jones and Galliers, 1996; Belz and Reiter, 2006.. Intrinsic approaches

Outcome 01: Statement of Purpose Outcome 02: Contract for the Provision of Services Outcome 03: Suitable Person in Charge Outcome 04: Records and documentation to be kept at a

Goodman and Kruskal’s Gamma was measured with the GoodmanKruskalGamma function sup- plied by the R software.14 In order to interpret the values obtained in the analysis, we use the