GPSG Parsing, Bidirectional Charts, anti 
Connection Graphs 
Laurent DEVOS 1,2 Michel GILLOUX 1 
i Centre National d'~'tudes des T~l&'ommunications 
LAA/SLC/AIA 
Route de Trdgastel, BP 40 
22301 Lannion Cedex, France 
2 l~cole Nationale SupHieure de Sciences Appliqudes et de Technologies, 
6, rue de Kerampont, BP 447 
22305 Lannion Cedex, France 
Abstract: Ttfs paper describes a tractable method for 
parsing GPSG grmnmars without ,altering the modu- 
larity and expressiveness of this tbnnalism. The pro- 
posed method is based on a constraint propagation 
mech,'ufism which reduces the number of unnecessary 
structures built at parse thne through the early detec- 
tion of inadmissible local trees. The propagation of 
constraints is rendered efficient by indexing con- 
straints and categories in a connection graph m~d by 
using a bidirectional chat1 pm~er together with a bot- 
lore-up strategy centered around head constituents. 
;\[o Introduction 
Among currant syntactic theories, Generalized 
l'hrase Structure Grammars (GPSG) \[4\] provide an ap- 
pealing solution for describing natural languages 
with their modular system of composite categories, 
rules, constraints and feature propagation principles. 
As other highly modular systems, GPSG is plagued 
by the difficulty of desigtfing an efficient algorithm 
lor combining its various components into an execut- 
able program. Recent attempts to solve this problem 
have followed different lines of research. 
One solution \[9\] rests on die almost equiva- 
lence between GPSG and Context-Free Grmnmars 
(CF). In this framework, GPSG rifles, met~mdes and 
constraints on weU-fonned categories and local trees 
am transforumd before any parsing took place into an 
equivalent set of CF produclions for which various 
efficient pro'sing methods already exist. In theory, 
lhis method has the advantage of preserving the hice 
expressive properties of GPSG while leading to a par- 
sable grammar. Though, the method is clearly hn- 
practical in the case of real grammars due to the enor- 
mous nmnber of categories and local trees which 
must be considered prior to the filtering by the other 
modules. 
A related yet more realistic method \[9\] fol- 
lows the same strategy of compiling GPSG into an- 
other grammar description language for which there 
exist parsing algorithms. In this case, the target lan- 
guage \[6\] has a CF skeleton but is augmented through 
feature descriptions which provide a natural mapping 
from GPSG categories. Here the difficulty lies for 
the linguist in tile expression of the grammar in the 
target language since there exist no algorithm to 
compile automatically the GPSG grammar. 
Another set of approaches \[1,7,8\] attempt to 
build fronl scratch a parsing strategy wlfich is suited 
to GPSG or rather to a modified version of it. The 
modifications are (sometimes) motivated by linguis.. 
tic arguments, e.g. enhancing the expressive power, 
but first to render GPSG computationaly tractable at 
the expense of some of its distinctive features. 
The last class of methods \[2,12\] try to take 
GPSG as it is and to design a parsing algorithin 
wtfich is not only sound but 'also complete with re-. 
spect to the theory. Then the difficulty lies in the ef- 
ficiency of the parser. The method described in this 
paper belongs to tiffs category. Several principles con- 
tribute to its efficiency. First, it is based on a bidi- 
rectional chart parser, Which, together with the ad.. 
vantages of conventional chart parsing, is well suited 
to both the ID/LP decomposition and the palficuhu: 
role devoted to head constituants. Second, the vari- 
ous constraints used in GPSG (linear precedence, head 
feature convention, foot teature principle) are viewed 
as a set of constr,'dnts which are applied as soon as 
possible, when necessary, to shorten the development 
of unproductive hypotheses. Third, the constraints 
are precompiled into a connection graph which mini~ 
mizes the computation of category subsumption done 
at run time. And, fourth, the rule invocation strate- 
gy is bottom-up ,and head-driven in that the only ele- 
1 151. 
mentmry active edges created bottom-up in the chart 
are those corresponding to head constituants. This 
strategy allows the FFP and the HFC to be brought 
into use at the time active edges am created and, con- 
sequently, by instantiating very soon a maximum of 
the foot anti head features of dominating categories, 
to detect violations of constraints long before con- 
stituents are completed. 
2. Bidirectional chart parsing 
Conventional chart parsing techniques \[5\] 
avoid redoing identical parses tot grammars having a 
context free basis. In the case of GPSG, these ted> 
tuques could be straightforwardly customized to ac- 
commodate ID rules. This would result in a strategy 
where an active edge would be created for each cate- 
gory in a rule extending a given inactive edge, be it a 
head daughter or not. 
When one considers the go~ of having uninter- 
esting patzes fail as soon as possible, it becomes imo 
portant to Make head daughters come into play first. 
"Iqais is because they activate a maximum of con- 
straints on their mother categories by the percolation 
of features through the t~TC and FI-q:'. In order to 
build local ID trees around their head daughters, the 
strategy should not force the first constituent at- 
tached to an edge to be its lefiruost one. We use bidi- 
rectional chart parsing \[11\] because it relaxes Otis 
constraint. This technique has been first proposed in 
the context of speech recognition where isl~md pars- 
ing is made advantageous because lexical interpreta.. 
tions are weighed by plausibility factors. Its propo- 
nents remarked that it could also be well suited to 
linguistic theories sharing the notion of head constit- 
uent, like GPSG. This intuition was confimaed by 
the comparison we made on several chm~ parsing 
strategies (see section 6 "hnplementation"). 
In order to fit the ID/LP decomposition, each 
edge of the bidirectional chart must have the follow- 
ing structure : 
Start : 
End : 
Rule : 
Match : 
Category : 
Daughters : 
the leftmost position of the edge; 
the rightmost position; 
a pointer to the associated ID ale; 
a bit vector indicating those 
members in the LHS of Rule with 
an extension attached to the edge; 
the category of the edge; 
the list of daughter categories. 
Thus an edge is active just in case all bits of 
Match are set to 1. 
New edges are created in two mtmners. Some 
are formed when an inactive edge is an extension of a 
head category in an ID rule (rule 1). They have only 
one daughter category and we call them elementary 
edges. The others stem from the extension (in the 
chart sense) of an active edge (rule 2). An active edge 
A is extended on its right (resp, on its left) any 
time an inactive edge adjacent on the right (resp, on 
the left) has a category wtfich is an extension of a 
category in the Rule of A whose bit in Match is not 
set to 0. To be validated the new edge should not vio~ 
late any FCR, LP, I-Pb'C or F~ constraint (see beo 
low). 
3. '\]lle connection graph 
The categories of edges result (1) from the ap- 
plication of feature instantiation principles to ,an ac- 
live edge or (2) from the creation of an elementary 
edge. 
Thus the category of a new edge is always an 
extension of the category of an already existing edge 
(I) or of the category in the left-hand side (LHS) of 
an ID ale (2). Since the whole process is initialized 
by extending lexical inactive edges, the only catego- 
ries possible for non-lexical edges are extensions of 
ale LHSs. In addition, LP mid FCR constraints only 
concern categories being al extension of respeclively 
both categories in a LP statement or the ~efl calego.. 
ry in a FCR constraint. It is then possible to remark 
that the constraints that should be verified on a cate~ 
gory A are inherited fi'om the constraints to be veri- 
tied on the category B category A stems t}om. This 
is because for A to be an extension of a category C it 
is necessary that B may be unified with C. 
In the sane way, inactive edges of category A 
may only become daughters in local trees whose asso- 
ciated ID rule features a category B in their LHS 
such that A is an extension of B. Thus determining 
the ID ales by which elemeutary edges cnuld be creo 
ated under the application of rule 1 to an inactive 
edge may be seen as inheriting these ID rules from 
the categories of edges leading to it by the recursive 
application of rule 2 (extension). These Iwo process- 
es, inheriting constraints and ID ales, should be re- 
lated to the inheritance of colmections in a connec- 
lion graph theorem prover \[10\]. 
In a commction graph theorem prover (CGTP), 
resolvents may be only resolved in turn with axioms 
connected to one of their parents, just like in GPSG 
categories may be constrained only by constraints 
concerning ttmir mother category, that is the catego- 
ry they am an extension of. Importing the technique 
of connection graphs in GPSG allows to reduce the 
152 2 
amount of computation needed to verify constraints. 
Just like in CGTP, a preprocessing phase, done once 
for all and independently of any phrase to be parsed, 
connects every categories in rule right-hand sides 
(RHS), LPs, FCRs and FSDs to the relevant ele- 
ments of rule LHSs. 
Thus each LP C 1 < C 2 (resp. FCR t C 1 ~ C 2) 
is connected to all categories C such as C unifies 
with C 1 or C unifies with C 2 (resp. such as C uni- 
fies with C1). In the case of FCR, categories C such 
as C does not unify with C 2 are never created since 
they violtate the FCR. 
In the same way, FSDs are connected to catego- 
ries to help determine where they should apply. 
For example, if we consider the ID rule N 1 
---> H, PIP and the LP constraint \[+N\] < PP plus trees 
N 1 \[SUBCAT 30\] PP\[+POS\] 
paper of Gazdar 
we see that the LP must be checked on this pair of 
trees because the following connections between the 
involved categories exist: 
unifies unifies N 1 -< - \[+N\] < PP ~ PP 
extends I /nnifies unifies~ extends 
f (inherited) (inherited) -" 
N I\[SUBCAT 30\] PP\[+POS\] 
On this diagram, two connections have been in- 
herited from former ones. 
In order to distinguish the types of con- 
straints connected to categories, several arcs are 
present in the graph. For exmnple, FCR-Left type 
arcs connect a category C with a FCR C 1 ~ C 2 such 
as C unifies with C 1. 
Inheritance of constraints in the connection 
graph and creation of bidirectional edges in the chart 
thus make the bulk of the parsing method. The meth- 
od is then completely defined through the ways of : 
• applying ID rules, constraints and feature in- 
stantiation principles to create new edges and 
categories; 
t We assume all FCRs to be in the canonical form 
C l :~ C 2 since the other formats (e.g. C 1 = C a) 
may be decomposed into a set of canonical forms 
(e.g. {C 1 ~ C 2, C 2 ~ C l }). 
• inheriting connections to ID rules and con- 
straints for each new edge and category; 
• computing the initial connection graph. 
4. Applying ID rules, constraints, and feature 
instantiation principles 
We assume that, in a first step, ,all metarules 
have been applied when possible to base ID roles to 
generate an extended set of ID rules t?. Thus we are 
left we a set of ID nlles, LP and FCR constraints, 
and feature instantiation principles, included FSDs. 
4.1. Immediate Dominance Rules 
As remarked in section 3 above, a daughter cat- 
egory in an edge of the chart must be either the cate- 
gory of a lexical item or an extension of an ID rule 
LHS. Thus, provided that the connection graph was 
suitably initialized, it is sufficient to consider only 
those members in ID role RHSs connected to a lexi- 
cal item or to an inactive edge in order to create new 
edges through rules 1 and 2. 
4.2. Linear Precedence Constraints 
LP statements ,are checked each time an edge is 
considered for extension through rule 2. These checks 
only occur when a new edge A results from B being 
extended on its left (resp. right) by category C. 
Then, only those LP, C 1 < C a such as C is connected 
to C 2 (resp. CI) and C 1 (resp. Ca) is connected to 
some daughter of B are considered. For the selected 
LPs, the parser has then to compare C 1 and C 2 on one 
hand and C and daughters of B on the other hand 
with respect to the partial order relation is-an-exten- 
sion-of. 
4.3. Feature Co-occurrence Restrictions 
It is not necessary to wait for an edge to be- 
come inactive before checking FCRs. In fact, it is far 
better to consider them each time a new edge is creat- 
ed. A being the category of the new edge, tiffs re- 
quires to check each FCR C! ~ C 2 cotmected to tile 
edge in tile graph through the extension and unifica- 
tion relations. 
4.4. Feature lnstantiation Principles 
In order to be able to check LP ,and FCR con- 
tt A better method for applying metarules should 
trigger them only when needed by the sentence 
to be parsed. The indexing of constraints in a 
connection graph could serve this purpose. 
3 153 
straints as soon as possible on new edges, the trans° 
mission of features though general instantiation prin- 
ciples (HFC and FFP) is done each time rule 2 is 
applied. Head and foot features of the extending edge 
A are compared to those of the extended edge B. 
There are two cases : 
o m least one of these features gets inconsis- 
tent values on rite daughter A and its poten- 
tied father B; in this situation, edge A is not 
valid and the chart is not modified; 
o all foot and head features get consistent val- 
re;s; then those which were unspecified or un- 
derspecified are set to the suitable value 
fl~rough unification; the category of the new 
edge is added to the comiection graph where 
it inherits the relevant ID rules, LP, FCR 
and FSD, 
4.5. Feature Specification Defaults 
Since feature specification defaults only affect 
features not set by the feature instantiation pfinci~ 
ples they only apply to inactive edges. Thus their use 
consists in applying otfly those FSD connected in the 
graph to the catego~7 of a new inactive edge. 
5o hfitiMizing the Connection Graph 
qhe connection graph is initialized in two 
phases. A first phase may took place only once for 
every grammar since it is independent from the par- 
ticular phrase to be parsed. In this phase, all possible 
connections between ID rules categories, LPs, FCI~s 
and FSDs are computed. For example, each conneco 
lion between a rule LHS A and a rule RHS element 
B such that A ratifies with B are memoriz~ed, 
The second phase depends on the lexical inter- 
pretations of the phrase to be parsed and it adds new 
connections to the graph. "lhese co~mections are those 
that hold between a lexical interpretation A and a 
category B in the RHS of a rule such that A is ,'u~ ex- 
tension of B. 
6. hnplementation 
"Ille method has been implemented as a Como 
mon Lisp program on a pVAX-II. A core GPSG 
grannnar of French was developed using this parser. 
In order to assess the interest of the bidirectional 
chart and its head-driven bottom-up strategy we 
made a series of tests consisting in parsing a small 
set of French sentences under three different strate- 
gies : strategy I was left-to-right and top-down, 
strategy 1I was left-to-right and bottom-up, and 
strategy Iii, the chosen one, is bidirectional, bottom- 
up ,and head-driven. Table 1 gives the observed perfor- 
mances of the three strategies measured by the total 
number of edges created and the total CPU time 
needed to parse all sentences t. 
Strategy 
Number of 
edges 
CPU time 
(in seconds) 
I II III 
381 189 35 
238.3 25.1 12,4 
Table 1 : A comparison of different strate#es 
7. Conclusion 
The method we propose makes it possible to 
parse efficiently GPSG grammars but unlike other apo 
proaches \[1,3,7,8\] it allows the grammar to be ex.. 
pressed in the exact formalism described by Gazdar 
arid his colleagues in \[4\] and does not require an in- 
tractable preprocessing ptiase like would do e..g. thc 
compilation of the grmnmar into an equivalent set of 
context-free productions. 
Although we did not study in detail the suit-. 
ability of the method when the control agreement 
principle is taken into account, we do not see any ma- 
jor incompatibility with the use of a connection 
graph to index the various modules of a GPSG gram~ 
Knar 
• t CPU time is only an indication of the efficiency 
of the method since it measures also our imple- 
mentation. No particular effort was spend on tun- 
ing the implementation. 
154 4 

References 

Briscoe, T., Grovel C., Boguraev, B., CaroU, 
J., "A Formalism and Enviromnent for the 
Development of a Large Grammar of En- 
glish', 10th International Joint Conf. on Ar- 
tificial Intelligence, pp. 703-708, 1987. 

Busemann, S., Hauenschild, C., "A Consll~c~ 
tire View of GPSG or How to Make It 
Work", Proc. of COLING, pp. 77-.82, 1988. 

Fisher, A. J., "Practical Parsing of General° 
ized Phrase Structure Grammars", Computa- 
tional Linguistics, vol. 15, no. 3, pp. 139o 
148, 1989. 

Gazdar, G., Klein, E., Pullum, S., Sag, 1., 
"Generalized Phrase SU'ucmre Grammar", 
Blackwell Publishing, 1985. 

Kay, M., "Algorithm Schemata and Data 
Structures in Syntactic Processing", in Read- 
ings in Natural Language Processing, B. J. 
Grosz et al. eds, pp. 35-70, 1986. 

Kartunen, L., "D-PATR: A Development En- 
vironment for Unification Based Grammars", 
l lth International Conference on Computa- 
tional Linguistics, p.. 74-80, 1986. 

Kilbury, J., "Category Cooccurrence Restric- 
tions and the Elimination of Metarules", 
Proc. of COLING, p.. 50-55, 1986. 

Kilbnry, J., "Parsing with Category Cooccur- 
rence Restrictions", Proc. of COLING, pp. 
324-327, 1988. 

Shieber, S. M., "A Simple Reconstruction of 
GPSG", Proc. of the l lth International Con- 
ference on Computational Linguistics, pp. 145- 
152, 1985. 

Stickel, M. E, "A Nonclausal Connection- 
Graph Resolution Theorem-Proving Pro- 
gram", Proc. of AAAI-82, 229-233, 1982. 

Stock, O., Falcone, R., Insinnamo, P., "Island 
Parsing ,and Bidirectional Charts", Proc. of 
COLING, p.. 636-641, 1988. 

Weisweber, W., "Using Constraints in a Con- 
structive Version of GPSG", Proc. of COL- 
ING, pp. 738-743, 1988. 
