An Education and Research Tool for Computational Semantics 
Karsten Konrad 1, Holger Maier 1, David Milward 2 and Manfred PinkaP 
(t) Coinputerlinguistik, 
Universitgt des Saarlandes 
66041 Saarbriicken, Germany 
konrad, m aier, pinkal@coli.uni-sb.de 
(2) SRI Internal;ional, 
Suite 23, Millers Yard 
Cambridge, CI\]2 1RQ, GB 
milward~cam.sri.com 
Abstract 
This paper describes an interactive 
graphical environment for computational 
semantics. The system provides a teach- 
ing tool, a stand alone extendible gra- 
pher, and a library of algorithms to- 
gether with test suites. The teaching 
tool allows users to work step by step 
through derivations of semantic repre- 
sentations, and to compare the proper- 
ties of various semantic formalisms such 
as Intensional Logic, DRT, and Situation 
Semantics. The system is freely available 
on the Internet. 
1 Introduction 
The CT,EARS tool (Computational Linguistics Ed- 
ucation and Research Tool in Semantics) was de- 
veloped as part of the FraCaS project 1 which 
aimed to encourage convergence between different 
semantic formalisms. Although formalisms such 
as Intensional Logic, DR?l', and Situation Seman- 
tics look different on first sight, they share many 
common assumptions, and provide similar treat- 
meats of many phenomena. The CLEARS tool al- 
lows exploration and comparison of these different 
formalisms, enabling the user to get an idea of the 
range of possibilities of semantic construction. It 
is intended to be used as both a research tool and 
a tutoriM tool. 
The first part of the paper shows the poten- 
tial of the system for investigating the properties 
of different seinantic formMisms, and for teach- 
ing students formal semantics. The next section 
outlines the library contents and the system archi- 
tecture, which was designed to reflect convergence 
between theories. The result is a highly modular 
and, we beliew~, a highly flexible system which 
1A lh'amework tor Computational Semantics, F,u- 
ropean Community LRE 62-051. 
s app(1,2) 
np vp 
id id 
I I pn v 
\] la!ghs anna 
XA.~®A (B) )~C, laughs(C) 
Figure 1: Initial ffepresentation of anna laughs 
with Aq)l{l' 
allows user prograrns to be integrated at various 
levels. The final part of the paper describes the 
grapher which was designed as a stand alone tool 
which can be used by various applications. 
2 A Tutorial System for 
Computational Semantics 
As a tutorial tool, CI, PArtS allows students to in- 
vestigate certain tbrmalisms and their relation- 
ship. It also provides the possibility for the 
teacher to provide interactive demonstrations ami 
to produce example slides and handouts. 
In this section we show how a user can inter- 
actively explore the step-by-step construction of a 
semantic representation out of a syntax tree. Fig- 
ures 1 and 2 show a possible initial display for the 
sentence "Anna laughs" in a compositional ver- 
sion of I)RT (Bos et al., 1994) and in 'Montague 
Grammar' (Dowty et al., 198:1). 
The user controls the semantic construction 
process by moving to particular nodes in the 
derivation tree, and performing operations by us- 
ing mouse double-clicks, or by selecting froln a 
pop-up menu. For example, clicking on app(2,1) 
1098 
s 
app(2,1) 
np vp 
id id 
pn v 
f I anna laughs 
anna XA.laughs(A) 
C 
man(C) 
J 
Ioves(C,J) 
woman ( J ) 
VC.(man(C) ~ 3J.(Ioves(C,J) ^ woman(J))) 
Figure 4: 'I'ranslating I)I{T to Predicate Logic 
li'igure 2: Initial Representation of Anna laughs 
with 'Montague Grammar' 
s 
laughs(anna) 
I .. app(2,1) /N 
np vp 
I irA.laughs (A) 
)n v 
nna i a!qhs 
anna kA.laughs (A) 
-Figure 3: Final Representation of Anna laughs in 
' Montague-Grammar' 
in the tree shown in l?igure 2 has the effect of ap- 
plying the lambda-ext)ression lA.laughs(A) to 
anna. The resulting display is given in t,'igure 3. 
The poI)-up menu allows a user to per- 
tbrm single derivation steps. For example, 
the user can first form an application term 
AA.hmghs(A)(anna) and then reduce this at 
the next step. Menu options include the possibil- 
ity of cancelling intensional operators, performing 
lmnbda reduction, applying meaning postulates, 
and \[)RS merging. The glenn also allows a user 
to choose whether or not to perform quantifier 
storage or discharge, and thereby pick a particn- 
lar reading for a sentence. Alterxlatively the user 
can choose to fully process a node, in which case 
all readings are simultaneously displayed. 
3 Comparing Theories 
A major use of the tool is for comparison of dif- 
ferent semantic theories and methods of seman- 
tic construction. To akl comparison of theories, 
there are translation routines between some se- 
mantic tbrmalisms. For example, \],'igure 4 shows 
a translation from a D|{S to a formula in Predi- 
cate Logic. 
The user can try out various options for seman- 
tic construction by using a menu to set various 
parameters. An illustrative subset of the parame- 
ters and their possible va.lues is given below: 
semantic forntalism 
l,ogic of Generalized Quantitiers, 
lntensional Logic, 
Compositional 1)RT (Muskens, 1993), 
Aq)R'F (Bos et al., 1994), 
'lbp-l)own-Dl{T (Kamp and Reyle, \[993), 
Situation Semantics. 
granllnar 
simple PSG, PSG with features, 
Categorial Grammar with features. 
parser 
top-down, incremental (for CG only). 
lexicon 
simple lexicon, lexicon with features. 
syntax-semantics mai)plng 
rule-to-.rule, syntactic template. 
syntax-semantlcs ('onstruetlon 
serial, parallel. 
subject applied to verb phrase 
yes, no. 
quantifier storage me(:hanism 
Cooper Storage (Cooper, 1983), 
Nested Cooper Storage (Keller, 1988) 
fl-reduction 
unification based, substitution based. 
1099 
4 The Library 
Because a tutorial system of this kind has to be 
based largely on standard routines and algorithms 
that are fundamental for the area of computa- 
tional semantics, a secondary aim of the project 
was to provide a set of well documented programs 
which could form the nucleus of a larger library 
of reusable code for this field. Most of the library 
contents correspond directly to particular values 
of parameter settings. However there are some ex- 
tra library routines, for example a very generalised 
form of flmction composition. The library is be- 
ing expanded with routines for semantic construc- 
tion driven by semantic types. It is also intended 
to integrate a wider range of grammars, parsing 
strategies and pronoun resolution strategies. For 
program documentation we largely have followed 
the approach taken in LEDA (Ngher, 1993)). 
Apart from the routines concerned directly with 
computational semantics, there are also routines 
designed to aid application developers who want 
to provide a graphical output tbr semantic repre- 
sentations. These routines are mainly concerned 
with translating from Prolog syntax into the de- 
scription string syntax used by the CLiG grapher. 
Currently they rely on the Tcl/Tk library package 
provided by Sicstus 3. 
4.1 Modularlsatlon Principles 
A standard approach to modularisation is to split 
a problem into independent black boxes, e.g. a 
grammar, a parser etc. This top-down modulari- 
sation is then followed by some bottom-up mod- 
ularisation in the sense of supplying general utili- 
ties which each of the larger modules can use. For 
this application, such an approach had obvious in- 
adequacies. For example, there are subtle differ- 
ences in some steps of quantifier storage according 
to the formalism being used, similarly, differences 
even in lambda reduction (for intensional logic it 
is natural to interleave the step of operator can- 
eellation between/?-reductions). Even the parsing 
stage cannot be totally independent unless we gen- 
eralise to the worst case (the Situation Semantics 
fragment requires an utterance node as well as a 
sentence node). 
One of the aims in building the tool was to 
show where semantic formalisms converge. Thus 
there was theoretical motivation to ensure compo- 
nents of the system were shared wherever possible. 
There was also practical motivation, since there is 
more chance of finding errors in shared code. The 
solution adopted was to use parameterised modu- 
larisation. This allows differences to be located in 
as small pieces of code as possible (e.g. single lines 
I parameterised node formation 1 
I semantic construction I 
I parameterised extraction from nodes 1 
--- 
Figure 5: Architecture of a pm't of 
the Syntax-Semantics lnt, erface 
of tile quantifier storage routine), with the param- 
eters picking up the correct; piece of code at run 
time. There are some small costs due to indirec- 
tion (instead of calling e.g. a /?-reducer directly, 
a program first calls a routine which chooses the 
/?-reducer according to the parameters). But with 
these parameterisation layers we provide natural 
points where the system can be extended or modi- 
fied by the user. The approach also gets rid of the 
need to create large data structures which include 
information which would be relevant for one choice 
of parameters, but not the current choice. For ex- 
ample, in parsing, a parameterised level chooses 
how to annotate nodes so that the syntax trees 
only have the relevant inibrmation for the chosen 
syntax-semantics strategy. The architecture is il- 
lustrated in Figure 5. 
The result of the parameterised approach is a 
system which provides several thousand possible 
valid combinations of semantic tbrmalism, gram- 
mar, reducer etc. using a small amount of code. 
5 The Graphical Interface 
A major part of our work on the educational 
tool was the development of a general graph- 
ical browser or grapher for the graphical no- 
tations used in computational linguistics, espe- 
ciMly those in computational semantics such as 
trees, Attribute-Value-Matrices, EKN (Barwise 
and Cooper, 1993) and 1)RSs. The grapher was 
Ii00 
written in Tcl/Tk, a programming system tbr 
developing graphical user interfaces (Ousterhout, 
1994). Two attrilmtes of Tel/Tk which were im- 
portant lbr this applieattion were the l)rowision of 
translation routines from graphic canvasses into 
Postscript (allowing generation of diagrams such 
as Figures 1 to d), and the ease of providing scal- 
ing routines for zooming. 
The grapher was designed to be extendible for 
future al)plications. Graphical structures are de- 
scribed using a (les(:ril)tion stritlg, a. plain text hi-- 
erarchical description of the object to be drawn 
without any exact positioning information, l,'or 
example, the following tree: 
S 
A 
is created by the description string: 
{tree {plain-text "S"} 
{plain-text "NP"} 
{plain-text "VP"}} 
CLIG Call display hale,active graphical slA'llcl;llres 
which aJlow tim user to perform actions by click- 
ing on mouse-sensitive regions ill the display are;~. 
The grapher and an underlying application there- 
fore can behaw.' in a way that the grapher is not 
only a way to visual*st the data of t;he application, 
but also providc.s a real interface I)etween user and 
af)plication. 
6 Availability of the System 
The system ('urrently requires Sicstus 3 plus 
'\['cl version 7.d and 'l'k w;rsion 4.0 (or later 
versions), lit, is awfilablc at the' ftp address: 
ftp.coli.uni-sb.de:/pub/fracas or on the 
WWW at the UI/J,: 
http ://coli. uni-sb, de/~ clears/clears, html 
l;urther (toeumentation of the' system is given in 
(l,'raCaS, 1996a) and (FraC, aS, 1996b), which are 
available from: 
http://www, cogsci.ed, ac.uk/~fracas/ 
7 Conclusion 
Initial reactions to demonstrations of the educa- 
tional tool suggest that it has the potential to 
become a widely used educatioual aid. We also 
believe that the programs iml~lemented and docu- 
mented it* this work provide the nucleus of a larger 
library of rensab\[e programs for computational se- 
mantics. Our current plans a.re to test t;\[l(', system 
with a wide (:lass of users to discover areas requir- 
ing extension or modification. A longer term aim 
is to integrate the system with existing grammar 
develol)ment environments. 
Acknowledgements 
'l'his work would not have been I)ossible without 
the encouragement and support of the other men> 
hers of the l"ra(~aS Project. We. would especially 
like to thank Ih)bin (,'ooper, Mass*me Poe.sio and 
Steven lhdman for eontril)utions to the code. 
References 
.J. Barwise and R. Cooper. 1993. Extended l(anq~ 
notation. In Y. I(atagiri P. A(:zel, 1). Israel and 
S. Peters, editors, ,Situation 7'heorg and its Ap- 
plication Vol. 3, chapter 2, t)ages 29 54. CSIA, 
Stanford. 
J. Bos, E. Mastenbroek, S. McClashan, S. Mil- 
lies, and M. l'inkal. 1994. A compositional 
l)i{S-based \['orm~dism for nip applic;~tions. In 
Proceedings of the International Workshop 
on Computational ,5'cmanlics, pages 21 3 , 
Tilbucg. 
11. (JOOl)er. 1983. Q'uanlificalion and 5'gnlactw 
Tttcory. SI,AI'. l{eidel, 1)ordrecht. 
I). l)owty, R. Wall, and 8. Peters. 1981. Intro- 
duction I.o Monla(lUC ,%:man*its. SI,A I'. t/x~ide\[, 
I)ord vecht. 
FraCaS. 1996a. Ih,il(ling the framework, l"racas 
I)eliver~d)lc l)J 5. 
l"ra(:aS. 1996b. I.Jsing tim framework. Fracas 
Deliverable 1)16. 
1l. l(amp and 11. lt.(:yle. 1993. l')zmt I)iscours(' to 
Logic. Kluwer, l)ordrecht. 
W. Keller. 11988. Nested cooper storag< In 
U. Reyle and C. Rohrer, editors, Natural Lan- 
(tltag('~ Parsing and Ling.uistic Theories, pages 
432 447. i/,eidel, 1)ordreeht. 
If. Muskens. 1993. A compositional discoul:se 
representation theory. In P. l)ekker and 
M. Stokhof, editors, I'rocecdings of the 9th A'mo 
sterdam Colloquium, pages 467 48(5. IIAX\], Uni-. 
versity of Amsterdam. 
S. Niher. 1993. Le(la manuM version 3.11. 'Ib.chni- 
eel l~eport MP1-I-93-109, IHa.x-Planck-lnstitut 
fiir Infornmtik, S~.~arbriicken, I"ebru~ry. 
a. Ousterhout. 1994. "Fcl and the 7'k 7'oolkii. Pro-- 
fessional Computing. Addison-Wesley, I{eading, 
Massachusetts. 
ii01 
