THE FORMAL CONSEQUENCES OF USING VARIABLES 
IN CCG CATEGORIES 
Beryl Hoffman * 
Dept. of Computer and Information Sciences 
University of Pennsylvania 
Philadelphia, PA 19104 
(hoffman @ linc.cis.upenn.edu) 
Abstract 
Combinatory Categorial Grammars, CCGs, (Steedman 
1985) have been shown by Weir and loshi (1988) to 
generate the same class of languages as Tree-Adjoining 
Grammars (TAG), Head Grammars (HG), and Linear 
Indexed Grammars (LIG). In this paper, I will discuss 
the effect of using variables in lexical category assign- 
ments in CCGs. It will be shown that using variables 
in lexical categories can increase the weak generative 
capacity of CCGs beyond the class of grammars listed 
above. 
A Formal Definition for CCGs 
In categorial grammars, grammatical entities are of 
two types: basic categories and functions. A basic 
category such as NP serves as a shorthand for a set of 
syntactic and semantic features. A category such as 
S\NP is a function representing an intransitive verb; 
the function looks for an argument of type NP on 
its left and results in the category S. A small set of 
combinatory rules serve to combine these categories 
while preserving a transparent relation between syntax 
and semantics. Application rules allow functions to 
combine with their arguments, while composition rules 
allow two functions to combine together. 
Based on the formal definition of CCGs in 
(Weir-Joshi 1988), a CCG, G, is denoted by 
(VT , VN , S, f, R), where 
• lit is a finite set of terminals, 
• VN is a finite set of nonterminals, 
• S is a distinguished member of VN, 
• f is a function that maps elements of VT U {e} to 
finite subsets of C(VN), the set of categories, where, 
- VN C C(VN) and 
- if el and c2 • C(VN), then (el\c2) and (cl/c2) • 
*I would like to thank Mark Steedman, Libby Levison, 
Owen Rambow, and the anonymous referees for their valu- 
able advice. This work was partially supported by DARPA 
N00014-90-J- 1863, ARO DAAL03-89-C-0031, NSF IR190- 
16592, Ben Franklin 91S.3078C-1. 
• R is a finite set of combinatory rules where 
X, Y, Z1, • •., Zn are variables over the set of cat- 
egories C(VN), and the slash variable \]i can bind 
to \ or/. Certain restrictions may be placed on the 
possible instantiations of the variables in the rules. 
- Forward Application (>): 
x/y r ---, x 
- Backward Application (<): 
Y X\Y --~ X 
- Generalized Forward Composition 
(>B(n) or >Bx(n)): For some n > 1, 
X/Y YllZllz...I.Z. --, XllZ~12...I,Z, 
- Generalized Backward Composition 
(<B(n) or <Bx(n)): For some n _> 1, 
Yl Ztl2...l z  XKY --, xllz \[2... I z,. 
The derives relation in a CCG is defined as act =~ 
cecl c2fl if R contains the rule Cl c2 ---+ c. The language 
generated by this grammar is defined as 
L(G) = {al,..., an \[ S :~ c,,...,cn, 
ei • f(al),ai • lit U {e}, 1 < i > n} 
Under these assumptions, Weir and Joshi (1988) prove 
that CCGs are weakly equivalent to TAGs, HGs, and 
LIGs. Their conversion of a CCG to a LIG l relies 
on the fact that the combinatory rules in the CCG are 
linear. To preserve linearity in CCGs, only the category 
X in the combinatory rules can be unbounded in size; 
the variables Y and Z must be bounded in their possible 
instantiations. In other words, only a finite number of 
categories can fill the secondary constituent of each 
combinatory rule. The secondary constituent is the 
second of the pair of categories being combined in the 
forward rules and the first of the pair in the backward 
rules (e.g. Y\]Z1...IZn). 
Weir and Joshi do not restrict the size of the sec- 
ondary constituents in the formal definition of the CCG 
rules, but they prove that the following lemma holds of 
the grammar. 
ILinear Indexed Grammars are a restricted version of 
Indexed Grammars in which no rule can copy a stack of 
unbounded size to more than one daughter (Gazdar 1985). 
298 
Lemma: There is a bound (determined by the gram- 
mar G) on the number of useful categories that can 
match the secondary constituent of a rule. 
There are an infinite number of derivable cate- 
gories in CCGs, however Weir and Joshi show that 
the number of components that derivable categories 
have is bounded. The components of a category 
c = (col,cll2...I, c,d are its immediate components 
co, ..., c,~ and the components of these immediate com- 
ponents. A finite set Dc(G) can be defined that con- 
tains all derivable components of every useful category 
where a category c is useful if c ~ w for some w in 
VT*: 
c 6 De(G) ifc is a component ofd 
where c' 6 f(a) for some a 6 VT U {E}. 
Given that every useful category matching the sec- 
ondary constituents Y and Y IZ1...IZ,~ in the combi- 
natory rules has components which are in Dc(G), the 
lemma given above holds. 
However, this lemma does not hold if there are 
variables in the lexical categories in VT. Variables can 
bind a category of any size, and thus useful categories 
containing variables do not necessarily have all of their 
derivable components in the finite set Dc (G). 
The Use of Variables 
Linguistic Use 
In CCGs, a type-raising rule can be used in the lexicon 
to convert basic elements into functions; for exam- 
ple, an NP category can be type-raised to the category 
S/(S\NP) representing a function looking for an in- 
transitive verb on its right. Steedman uses type-raising 
of NPs to capture syntactic coordination and extraction 
facts. In Steedman's Dutch grammar (1985), variables 
are used in the lexical category for type-raised NPs, 
i.e. the variable v in the category v/(v\NP) general- 
izes across all possible verbal categories. The use of 
variables allows the type-raised NPs in the following 
coordinated sentence to easily combine together, us- 
ing the forward composition rule, even though they are 
arguments of different verbs. 
(1) ...dat \[Jan Piet\] en \[Cecilia Henk\] zag zwemmen. 
...that \[Jan Pietl and \[Cecilia Henkl saw swim. 
...that Jan saw Piet and Cecilia saw Henk swim. 
Jan Piet 
v/(,\NP) ¢/(¢\NP) 
>B (v' = (v\NP)) 
v/(v\NP\NP) 
Formal Power 
I will show that the use of variables in assigned lexical 
categories increases the weak generative capacity of 
CCGs. VAR-CCGs, CCGs using variables, can gener- 
ate languages that are known not to be Tree-Adjoining 
Languages; therefore VAR-CCGs are more powerful 
than the weakly equivalent TAG and CCG formalisms. 
The following language is known not to be a TAL: 
L = {a'%'%nd'~e'~ln > O} 
The following VAR-CCG, G', generates a language L' 
which is very similar to L: 
f(c) = s, 
f(a) = A, 
f(b) = v\A/(v\B), 
f(c) = vV3/(v\c), 
f(d) = v\C/(v\D), 
f(e) = S\D/S. 
The rules allowed in this grammar are forward and 
backward application and forward crossing composi- 
tion with n < 2. The variable v can bind an arbitrarily 
large category in the infinite set of categories C(Vjv) 
defined for the grammar. 
In the language generated by this grammar, two 
characters of the same type can combine together using 
the forward crossing composition rule >Bx(2). The 
composition of the types for the character e is shown 
below. A string of e's can be constructed by allowing 
the result of this composition to combine with another 
e category. 
e e 
S\D/S S\D/S 
->Bx(2) S\D\D/S 
The types for the characters b, c, and d can combine 
using the same composition rule; these types contain 
variables (e.g. v and v' below) which can bind to a 
category of unbounded size. 
b b 
v\A/(v\B) v'\A/(v'\B) 
>Sx(2) (v' = (v\B)) 
v\A\A/(v\B\B) 
By applying the forward crossing composition rule to 
a string of nb's, we can form the complex category 
v\A, . . . d,~/(v\Bl . . . Bn) representing this string. 
Thus, during the derivation of anbnc'~d'~e n for 
n > O, the following complex categories are created: 
v\A, .. .At/(v\B1. . .B,) 
... B /(vkC, 
...Cj/(vkD  ...Dj) 
skDl ... Di 
Once the complex categories for a string of b's, 
a string of c's, a string of d's, and a string of e's 
are constructed, we can link one string of a particu- 
lar character to another using the forward application 
rule. This rule can only apply to these categories if 
i = j, j = k, k = l, and l = m where m is the num- 
ber of A's generated and i, j, k, l are as in the complex 
categories listed above. For example, 
8\D1...Di 
> (j = i) 
299 
With each succesful forward application, we ensure 
that there are equal numbers of two characters: the E's 
are linked to the D's, the D's are linked to the C's, 
etc., so that we have the exact same number of all five 
characters. In fact, the grammar can be easily extended 
,,n .. ~ 0} to generate a language such as {a 1 a 2 . at: In _> 
for any k. 
The language L' generated by G / intersected with 
the regular language a*b*c*d*e* gives the language L 
above. If we assume that L' is a Tree-Adjoining Lan- 
guage (TAL), then L would be a TAL as well since 
TALs are closed under intersection with Regular lan- 
guages. However, since we know that L is not a TAL, 
L' cannot be a TAL either. Thus, G' generates a lan- 
guage that TAGs and CCGs cannot. 
Conclusions 
We have seen that using variables in the lexical cat- 
egories of a CCG can increase its weak generative 
capacity. However, there is some linguistic motivation 
for looking at the more powerful formalism of VAR- 
CCGs. As argued by Gazdar (1985), this extra power 
may be necessary in order to capture coordination in 
natural languages. We have seen that type-raised cat- 
egories with variables in CCGs can be used to capture 
syntactic coordination and extraction facts in Dutch 
(Steedman 1985). Further research is needed to decide 
whether this linguistic motivation warrants the move 
to a more powerful formalism. 
Although VAR-CCGs have a greater weak gen- 
erative capacity than the class including TAGs, HGs, 
CCGs, and LIGs, we conjecture that it is still a mildly 
context-sensitive grammar as defined by Joshi (1985). 
The language discussed above is a mildly context- 
sensitive language since it observes the constant growth 
and semilinearity properties. It is an open question 
whether VAR-CCGs can generate languages which are 
beyond mildly context-sensitive. Note that MC-TAGs, 
which are a more powerful extension of TAGs, can also 
generate languages like L, and they are known to be 
mildly context-sensitive formalisms (Weir 1988). In 
future research, we will investigate exactly what the 
resulting generative capacity of VAR-CCGs is. 
Future Research on Word Order 
My current research also involves extending the CCG 
formalism to handle free word order languages. By 
representing NPs as type-raised categories, we can de- 
rive a scrambled sentence in which the NPs do not 
occur in the order that the verb specifies: 
v/(v\NP2) v/(v\NP,) S\NPx\NP2 
.>B 
S\ N P2 > 
S 
In many free word order languages, an NP can be 
scrambled an unbounded distance away from its verb, 
i.e. long distance scrambling. If we allow unrestricted 
composition rules for any n arguments as well as the 
use of variables in type-raised categories in a CCG, a 
string of any number of scrambled NPs followed by a 
string of verbs can be derived. We first combine any 
number of verbs together, using backward composi- 
tion, to get a complex verb category looking for all of 
the NPs; next, we combine each NPs with this com- 
plex verb category. Any type-raised Npi can combine 
with the complex verb regardless of the order specified 
by the complex verb. The variable in the type-raised 
category can bind a verbal category of unbounded size, 
e.g. (v = S\Up,\...\Upi_l). 
v/(v\Npi) S\Np, \Np2...\Npi...\Npn 
>Bx(n) 
S\Npl \...\Npi-~\Npi+l...\Np,~ 
Although we can capture scrambling by using variables 
in type-raised categories, this analysis is not consistent 
with incremental processing and cannot account for co- 
ordination in scrambled sentences; for instance, in the 
first example given above, NP2 and NP1 cannot com- 
binetogether before combining with the verb. In future 
research, I will investigate whether VAR-CCGs is an 
adequate linguistic formalism in capturing all aspects 
of free word order languages or whether a formalism 
such as {}-CCGs (Hoffman 1992), which allows sets 
of arguments in function categories, is better suited. 

References 
\[1\] Gazdar, G. 1985. Applicability of Indexed Gram- 
mars to Natural Languages. Technical Report 
CSLI-85-34, Center for Study of Language and In- 
formation. 
\[2\] Hoffman, Beryl. 1992. A CCG Approach to Free 
Word Order Languages. Proceedings of the 30th 
Annual Meeting of ACL, Student Session. 
\[3\] Joshi, A.K., 1985. How much context-sensitivity 
is required to provide reasonable structural descrip- 
tions: Tree adjoining grammars, in D. Dowty and 
L. Karttunen and A. Zwicky, editors, Natural Lan- 
guage Parsing: Psycholinguistic, Computational 
and Theoretical Perspectives, Cambridge Univer- 
sity Press. 
\[4\] Steedman, Mark. 1985. Dependency and Coordi- 
nation in the Grammar of Dutch and English. Lan- 
guage, 6l, 523-568. 
\[5\] Weir, David. 1988. Characterising Mildly Context- 
sensitive Grammar Formalisms. Ph.D dissertation. 
University of Pennsylvania. 
\[6\] Weir, David and Aravind Joshi. 1988. Combina- 
tory Categorial Grammars: Generative Power and 
Relationship to Linear Context-Free Rewriting Sys- 
tems. Proceedings of the 26th Annual Meeting of 
ACL. 
