NATURAL
LANGUAGE GRAMMARS FOR AN I N FOR M A TI ON SYSTEM
L u i s de S o p e ~ a
CENTRO DE I N F O R M A T I C A
Universidad
del Pais Vasco
BILBAO-SPAIN
t h e same t e c h n o l o g y : t h e f i r s t
version of
USL was d e v e l o p e d f o r German by H. Lehmann
N. O t t and M Z o e p p r i t z ( 4 , 5 , 6 )
a t t h e IBM
Heidelberg Scientific
Center. Subsequently
and using
it
as a basis
a Spanish
version
was
also
written
(8),
as well
as
an
English
one.
ABSTRACT
The User Specialty
Languages
(USL) System is an
applications independent natural language interface to a Relational Database System. It provides
non DP-trained people with a tool to introduce,
query, manipulate and analyse the data stored in
a Relational Database via natural language. USL
interfaces with different languages; in the present paper the gran~nar developed for Spanish is
presented, and compared with the German granTnar
which was previously implemented and upon which
it is based. Their main differences are pointed
out, and the generality of the system to deal with
other natural languages shown.
The c o m p o n e n t s
of
USL a r e :
a parser,
a grammar w i t h
a structural
vocabulary,
a set o f i n t e r p r e t a t i o n
routines associat e d t o t h e grammar r u l e s , and t h e Data Base Management System, System R. t h e system
has been d e s i g n e d i n such a way t h a t o n l y
t h e grammar and t h e s t r u c t u r a l
vocabulary
need t o be changed i n o r d e r t o s h i f t f r o m
one l a n g u a g e t o a n o t h e r ; t h e r e s t o f t h e
i t e m s a r e common and
can be s h a r e d by a l l
language i n t e r f a c e s .
1. INTRODUCTION
In a d d i t i o n
t o t h e system components
a s u b j e c t - d e p e n d e n t v o c a b u l a r y has t o be
d e f i n e d by t h e u s e r f o r each a p p l i c a t i o n
t o g e t h e r with h i s / h e r database r e l a t i o n s
and v i e w s .
The U s e r S p e c i a l t y
Languages
(USL) Sysan applications
independent
natutem is
ral
language i n t e r f a c e
to a Relational
D a t a b a s e . I t was d e s i g n e d t o p r o v i d e non
DP-trained users with a t o o l to i n t r o d u ce,
query,
m a n i p u l a t e and a n a l y s e t h e
d a t a s t o r e d i n a Data Base. USL i s p l a c e d
on t o p o f a R e l a t i o n a l Data Base Management System, System R ( 1 ) , and i t s f u n c tion
is
to
translate
natural
language
input
sentences typed
in" by t h e u s e r s
into queries written
in the f o r m a l query
l a n g u a g e o f System R.
The p r e s e n t p a p e r c e n t e r s a r o u n d t h e
German and t h e Spanish Grammars d e v e l o p e d
for USL. Section 2 describes briefly
the
grammar s t r u c t u r e
and s c o p e . S e c t i o n 3
d e a l s w i t h a comparison
o f b o t h grammars
and p o i n t s o u t t h e i r main d i f f e r e n c e s .
The work r e p o r t e d h e r e was d e v e l o p e d
during the a u t h o r ' s stay at the Heidelberg
Scientific
C e n t e r o f IBM Germany i n
1981.
A main o b j e c t i v e o f USL was t o a c h i e v e
a p p l i c a t i o n s independence, i . e . to d e s c r i
be t h a t s u b s e t o f n a t u r a l l a n g u a g e ( m o r phology,
structural
words,
syntactic
s t r u c t u r e s and t h e i r i n t e r p r e t a t i o n )
that
can be used i n t h e c o n t e x t o f d a t a b a s e
interrogation,
and
that
constitutes
a
c o r e t o be used i n d i f f e r e n t
domains. At
t h e s a m e t i m e USL aimed a t o b t a i n i n g i n terfaces
for
diferrent
languages using
2.
T h i s s e c t i o n r e p o r t s t h e main f e a t u r e s
o f t h e grammar a c c e p t e d by t h e USL p a r s e r .
Detailed descriptions
of
t h e German and
Spanish v e r s i o n s can be f o u n d i n r e f e r e n ces ( g ) and ( 8 ) , r e s p e c t i v e l y .
Permission to copy without fee all or part of this material is granted
provided that the copies are not made or distributed for direct
commercial advantage, the ACM copyright notice and the title of the
publication and its date appear, and notice is given that copying is by
permission of the Association for Computing Machinery. To copy
otherwise, or to republish, requires a fee and/or specific permission.
1983ACM0-89791-107-5/83/006/0075
GRAMMAR OF THE USL SYSTEM
$00.75
75
2.1.
GRAMMAR STRUCTURE
define
vocabulary
words,
constructs
from strings:
is written
in a modiT h e USL g r a m m a r
fied
Backus-Naur
F o r m . H e r e we s h a l l
brief
ly describe
its
elementsand
the structures
it uses.
The
-
basic
elements
'0123456789'
-
creating
NOMEN:+MAS,+SG:FPE-NOMEN('PAIS')
(=
'PAIS';
T h e f e a t u r e s for M a s c u l i n e a n d S i n g u l a r
are a s s i g n e d
to the c o n s t r u c t
defined
as N O M E N , w h i c h s p a n s the s t r i n g 'PAIS'
('country').
FPE-NOMEN
refers
to
the
n a m e of the r e l a t i o n to be a c c e s s e d f o r
interpretation
of
the
noun,
here
the
s a m e w o r d 'paLs' is used.
are:
PRIMITIVES:
Letters,
digits
symbols;
they
have
to
be
the grammar.
Example:
by
and special
declared
in
PRIMITIVE<DIGIT>;
<- G r a m m a r
and
strings
hand
side,
on the left.
taching
an
be:
CONSTRUCTS:Grammatical
categories
def~
ned for
verbs
(VERB),
nouns
(NOMEN),
adjectives
(ADJ),
prepositions
(PREP),
noun phrases (NP), l o c a l (ABL) and temp o r a l (ABT) complements, v e r b and one
o r more complements
(Verb Complex, VC)
v e r b and a11 i t s complements
(Sentence
K e r n e l , SK), e t c .
Example o f a Construct declaration:
rules
proper:
Constructs
may appear
on the
rightone or
several
constructs
For example,
the rule
atadjective
to
a noun could
<NOMEN:I:FPE-ADJ(2,1)><<NOMEN:(MAS=MAS(2))!(FEM=FEM(2)),
(SG=SG(2))!(PL=PL(2))><ADJ>;
<VERB> CONSTRUCT;
-
where for
simplicity
only
the tests
for
gender
and number agreement
have been
included
on the right-hand
s i d e NOMEN
construct.
The
resulting
construct
retains
the
features
of
the
original
NOMEN
via
the
parameter
1,
and
the
semantic
routine
FPE-ABJ is called
for
interpretation
of
adjectives
modifying
nouns.
FEATURES: They q u a l i f y C o n s t r u c t s
and
belong t o one o f t h r e e t y p e s : i n t e g e r
( v a l u e s are i n t e g e r numbers), l o g i c a l
( v a l u e s are + and - , o r 1 and O), and
case ( v a l u e s belong t o a s e t o f s o called
c a s e v a l u e s , which must a l s o be
d e f i n e d . Examples:
<SG> FEATURE LOGICAL;
singular
etc.
of
<LAB>
FEATURE
qualifies
(construct
<TYP>
for
nouns,
number.
adjectives,
2.2.
the
different
PREP).
GRAMMAR SCOPE
T h e USL g r a m m a r
describes
a subset
of
natural
language
to
be u s e d
in
database
interrogation;
therefore
many
structures
not important
in this
context
h a v e n o t been
included.
However,
both the German and the
Spanish
Grammars are quite
comprehensive;
they
provide
a similar
coverage
of
the
language,
which
includes:
- Wh-questions
- Yes/no
questions
- Commands
Statements
Negation
- Adjectives
- Genitive
Attributes
- Appositions
Noun Complements
Relative
Clauses
- Quantifiers
- Comparatives
- Coordination
- Possessive
Pronouns
- Locative
Adverbials
- Temporal
Adverbials
Functions
of
sum, maximum,
minimum,
average,
number
Use of variables
and functions
INTEGER;
prepositions
FEATURE CASE;
quaZifies
plements
have to
<NI>
feature
singular
verbs
according
to
the
comthey
require.
Values
of
TYP
be defined
as, for
example:
CASEVALUE;
-
for
intransitive
only).
verbs
(Nominative
-
{NAD>CASEVALUE;
-
f o r verbs w i t h Nominative,
and D a t i v e complements.
Accusative
-
The r u l e s o f the grammar make use o f
the
elements t h a t
have p r e v i o u s l y been
d e c l a r e d . They have a s p e c i a l symbol t o
separate
left
and
right-hand
sides:
members on the r i g h t are i n p u t e l e m e n t s ;
after application
o f the r u l e t h e y are
s u b s t i t u t e d by the elements
s p e c i f i e d on
the l e f t .
-
There are f o u r t y p e s o f r u l e s c b a r a c t e r i s e d by the symbol Used t o s e p a r a t e both
s i d e s ; here we s h a l l d e s c r i b e o n l y the two
most i m p o r t a n t t y p e s :
<= F i x e d Token r u l e s :
t h e y are
3.
THE S P A N I S H
A BRIEF
used t o
The
76
firts
GRAMMAR:
PARALLEL
USL
WITH
grammar
GERMAN
was
written
for
German; t h e Spanish grammar i s based on
it,
t h e r e f o r e t h e r e are many r u l e s s i m i larly
formulated,
sometimes
only
with
slight
variants.
In this
section
the main
differences
between
both
grammars
w111
be p o i n t e d
out,
as it
c a n be f o u n d
after
comparing
the
descriptions
given
in
references
(g) and (8).
3.1.
feature
is set on all
these
Noun Phrases);
'a'
may a l s o
introduce
an Indirect
Object:
e.g.
'amar
A Juan',
'vender
algo
A alguien'.
The preposition
'para' i n t r o d u c e s
Indirect
Objects
and
the D a t i v e
feature
is set on t h e s e N o u n P h r a s e s .
As to the
Genitive
case,
it d o e s not e x i s t as s u c h
in S p a n i s h .
c)
Rules for
nouns with
determiners
are very
simple
in Spanish,
only
gender
and number
checks
are needed.
German has to restrict
the
case
features
too,
and
distinguish
between
nominal
inflection,
adjective
inflection,
and the determiners
'wieviel',
'lauter/nur',
and
'der/ein'
Many
more
rules
much
longer
and
complicated
are
therefore
necessary
in German, while
only
three
rules
are needed in Spanish.
MORPHOLOGY
USL Grammars make
no d i s t i n c t i o n
between m o r p h o l o g y and s y n t a x ; t h e same
k i n d o f r u l e s s e r v e s f o r both p u r p o s e s .
Rules
defining
morphology
are
of
course very d i f f e r e n t
i n b o t h grammars:
noun and a d j e c t i v e
affixes,
inflection
o f nouns and a d j e c t i v e s a r e m u c h more
s i m p l e i n t h e Spanish grammar, as o n l y
p l u r a l s need be d e s c r i b e d f o r nouns, and
f e m i n i n e s and p l u r a l s f o r a d j e c t i v e s , and
no d e c l e n s i o n s e x i s t .
But a t
t h e same
time these c o n s t r u c t s p r o v i d e l e s s i n f o r mation,
as o n l y g e n d e r and number a r e
marked, and n o t h i n g h e l p s d e t e r m i n e t h e
case
(unless
a
preposition
is
later
attached),
as occurs
in German.
d)
Spanish
and
German
use
the
same
three
gender
features
for
masculine,
feminine,
and neuter.
However,
neuter
nouns de n o t
properly
exist
in
Spanish
as they
do in
German:
the neutral
article
'1o'
determines
adjectives
used
as
nouns,
Iike
'1o
bello',
'1o util',
'1o me]or'
(the
beautiful',
'the
usefui',
'the
best').
They
always
have
a
collective
and
abstract
meaning which
is not expected
to occur
in
database
interrogation.
Therefore,
apart
from a rule
attaching
the article
'1o'
to
a noun defined
as neutral
(which
the vocabulary
definition
programs
allow
),
no
further
use is made of the feature
in the
grammar.
Spanish
Other
possible
uses
of
'1o'
preceding
relative
clauses
of prepositional
phrases,
e.g.
'1o que paso',
lo
de sLempre',
have
not been considered.
German must
also
account
for
special
cases,
like
nouns with
adjective
inflection,
and nouns and names without
article,
which
are
not
necessary
in
Spanish.
As
a result,
several
features
used in German
are not defined
in Spanish.
3.2.
SYNTAX
I n many cases r u l e s a r e v e r y s i m i l a r l y
formulated,
only
small
changes can be
detected
by
looking
at
the
features
checked on t h e r i g h - h a n d s i d e s , t h e ones
s e t on t h e r e s u l t i n g c o n s t r u c t s , and t h e
semantic r o u t i n e s invoked.
e)
In the rules
for
the formation
o f t h e SENT
construct
(the
one
spanning
the
whole
input
string),
one is
provided
to transform a declarative
sentence
into
a yes/no
question.
This
transformation
in
the
interpretation
of
a
statement
as
an
interrogation
is
done
if
a '?'
is found
at
the
end of
the
declarative
sentence.
In
Spanish,
the
freedom
in
word
order
makes it
possible
to ask a question
using
a linear
order
just
by a change
in
the
intonation;
when typing,
a question
mark
is
required
to
indicate
this
change.
For
example,
the sentence
'Maria
vive
en B i l bao'
is a statement
('Maria
lives
in Bilbao'),
but
'Maria
viva
en B i l b a o ? '
is an
interrogation
('Does
Maria
live
in
Bilbao?').
a)
Adjectives
in
Spanish
can
be
placed
either
before
or after
a noun. The difference
is mainly
stylistic,
but
sometimes
also
the meaning changes depending
on the
adjective
position
(e.g.
'hombre
pobre'
vs.
'pobre
hombre',
caballo
grande'
vs.
'gran
caballo').
For the purpose
of USL,
the
most
usual,
noun-adjective
sequence
i s t o be e x p e c t e d ,
even though
rules
ape
also
supplied
for
the reversed
sequence.
In German the adjective-noun
sequence
is
only
allowed.
b)
Even if
nouns are morphologically
unmarked
for
case
in
Spanish,
the
grammar
makes
use
of
case
features.
Any
noun
phrase
not
preceded
by a preposition
is
in principle
candidate
for
subject
(Nominative)
and direct
object
(Accusative).
preposition
'a'
may
introduce
a
The
Direct
Object
(for
persons
or
any
kind
of 'personified'
thing
- but this
has not
been
considered,
and
the
Accusative
f)
The
interpretation
of
of
a Verb
Complex
or
special
in
Spanish.
'ningun'
('no')
is
in
negation
should
actually
already
implied
by the
way the sentences
77
negation
in
front
Sentence
Kernel
is
If
the
quantifier
the
Verb Group,
no
apply
but the one
quantifier.
In this
'No v i v e
'Ningun
('Does
ningun
empleado
no
empleado
vive
employee
en
live
en
'Compran
('Do all
Bilbao?'
Bilbao?'
'Tienen
todos los
('Do all
countries
in B i l b a o ? ' )
w i l l get the s a m e i n t e r p r e t a t i o n ,
the f i r s t one has an a d d i t i o n a l
in f r o n t of the s e n t e n c e .
todos los
employees
even if
negation
are
correctly
'Compran
empleados coche?'
buy a car?')
paises
capital?'
have a capital?')
interpreted,
coche
todos
capital
todos
los
los
but
empZeados?'
g)
'Tienen
paises?'
The rules for Verb Complex
(VC) and S e n tence
Kernel
(SK)
formation
are
quite
similar.
Only
in S p a n i s h
when
a Subject
N o u n P h r a s e is a t t a c h e d to a VC, a f e a t u r e
c a l l e d S U B J is c h e c k e d in both c o n s t r u c t s ,
a n d the N o u n P h r a s e c h e c k e d
for p r e s e n c e
of the q u a n t i f i e r
'todos'
('all').
T h e f i r s t c h e c k is t e n t a t i v e a n d t r i e s to
syntactic
ambiguities
between
avoid
Subject
and Accusative
Object arising
in
some sentences.
For e x a m p l e the s e n t e n c e s
'Exporta Espa~a
vino?' and ' E x p o r t a v i n o
EspaBa'
(which
both
mean
'Does
Spain
export
wine?')
have
two parses,
'vino'
being
subject
in
one
parse
and
Direct
Object
in the other.
This
occurs
because
the only
knowledge
USL u s e s f o r
disambiguation
is the one contained
in the strutture
of
database
relations,
a n d no r e a l
knowledge
representation
device
guides
the
system.
The
database c o n t e n t s
are
not
d u p l i c a t e d in a d i c t i o n a r y ,
and t h e r e f o r e
every unidentified
string
found
in
the
i n p u t s e n t e n c e i s i n t e r p r e t e d as a d a t a base v a l u e .
I n o u r example n e i t h e r ' E s p a ~a' nor ' v i n o ' a r e d e f i n e d i n t h e v o c a b u l a r y I b o t h o f them are v a l u e s s t o r e d i n t h e
d a t a b a s e , and t h e system w i t h o u t s e m a n t i c
knowledge i s u n a b l e t o d i s c a r d ' v i n o '
as
subject of 'exportar'.
which
have
exactly
the
same m e a n i n g
as
before,
would
be
interpreted
as
if
all
employees
bought
t h e same c a r ,
all
countries
had
the
same c a p i t a l ,
due to
the
order
of
the
quantifiers
in
the
input
sentence.
Therefore
the order
of complements
must
be
reversed
for
a
correct
interpretation
of the s e n t e n c e s m e a n i n g .
h)
When
the
main
verb
is
'ser'
or
'estar'
('be') s p e c i a i c h e c k s a r e s o m e t i m e s n e c e s If
an
adjective
is
attached
as
sary.
complement
to the verb
a gender check is
needed
between
adjective
and
the
other
Nominative,
e.g.:
'Son
casadas
'Que
secretarias
1as
secretarias?'
son
casadas?'
where
the
adjective
'casada'
'secretaria'
. On t h e
other
agreement
is
avoided
for
Nominatives:
'Quien
es/quienes
taria de Juan?'
son
el
agrees
with
hand,
number
coordinated
jefe
y
la
secre-
i)
No p r e c e d i n g
Genitive
Atributes
exist
in
Spanish,
there
are only genitives
following
their
head nouns:
'salario
de
Juan'
vs.
two possibilities
in German:
' Gehalt
von
Meier',
Melers Gehalt'
The f e a t u r e SUBJ t r i e s t o c h a r a c t e r i z e
nouns and names and t h e matching v e r b s o f
which
they
only
can
be
subject:
here
'exportar'
and ' E s p a f i a ' . However t h e f e a t u r e i s n o t y e t c o m p l e t e l y used because
t h i s would i m p l y , among o t h e r t h i n g s , t h e
definition
o f the p r o p e r names s t o r e d in
t h e d a t a b a s e , which was up t o now a v o i d e d
by USL . I f r e a l use i s t o be made o f t h e
feature it will
be n e c e s s a r y t o d e f i n e i t
as
integer,
and
assign
its
different
values
to different
groups
of
verbs
and
subject
candidates,
or to define
different
categories
of
subjects
(e.g.
persons,
animals,
countries,
etc.)
and specify
for
each
verb
the
classes
of
subjects
it
requires.
This
will
allow
to
perform
a
semantic
typing
inside
the syntax.
j)
When
defining
Prepositions
the
German
grammar
must
duplicate
many of
them
to
account
for
their
use with
Accusative
of
Dative
noun phrases.
In Spanish
this
is
not
necessary
as
no
case
needs
to
be
associated
with
prepositions,
only
one
definition
is needed.
Rules
h a v e t o be p r o v i d e d
in Spanish
for
any sequence
of complements
after
a verb
requiring
prepositional
complements,
even
if
actually
some o f
the
structures
thus
obtained
would sound odd and will
probably
not
be u s e d ,
but
they
are
grammatically
correct.
T h e s e c o n d c h e c k f o r a Noun P h r a s e w i t h
'todos'
is important
when t h e Noun P h r a s e
is attached
as Subject
to the right
of a
VC. Due t o t h e USL l e f t
to right
interpretation
for
the
scope of
quantifiers,
if
the
NP i s
the
first
complement
attached
to
the
verb
the
interpretation
will
be
correct.
Otherwise
the order of complem~ts
should
be r e v e r s e d
so that
t h e NP i s m o v e d
to
the
first
position.
This
is
done by
application
of a special
semantic
routine.
For example,
the sentences:
k)
To d e s c r i b e
Local
Adverbials
less
rules
are needed in Spanish,
as less
particular
c a s e s n e e d t o be a c c o u n t e d
for.
They allow
for
the formation
of interrogatives
using
'donde'
('de
donde',
'hasta
donde'),
and
for adverbs with more than one preposition,
like
'desde encima de',
'pot debajo de'
i)
For
78
Temporal
Adverbials
there
are
many
differently
f o r m u l a t e d r u l e s . For example,
the f o l l o w i n g formats are allowed f o r a
d a t e i n t h e Spanish grammar:
419/1956
4-IX-1956
04.09.1956
c u a t r o de s e p t i e m b r e
de 1 9 5 6
4 de s e p t i e m b r e
de
1956
26 de e n e r o
' S e c r e t a r i a cuyos j e f e s '
( ' S e c r e t a r y whose m a n a g e r s ' )
' N a c i o n e s cuyas s u p e r f i c i e s '
( ' N a t i o n s whose s u r f a c e s ' )
e n e r o de 1 . g 7 9
a~o 1979
aSo 1 9 7 g
mes de e n e r o
mes de e n e r o de 1 9 7 9
dia/viernes
26 d e e n e r o
In the r u l e s f o r R e l a t i v e Clause f o r m a t i o n
t h e maximum i n f o r m a t i o n a b o u t t h e r e f e r e n t
f e a t u r e s i s p i c k e d up f r o m the whole clause
and
transmitted
to
the
resulting
Noun
Phrase, in o r d e r t o c o r r e c t l y i d e n t i f y the
referent.
When d e a l i n g w i t h
D e c l a r a t i v e Sentences
r u l e s are w r i t t e n
i n t h e Spanish Grammar
t o a l l o w f o r more t h a n one complement t o
be p l a c e d t o t h e l e f t
of a verb; this is
intended f o r R e l a t i v e Clauses l i k e :
A date
can
also
be a t t a c h e d
to a t i m e
expression,
e.g.:
'el 5 de a g o s t o a las
16:20'.
Care must
be t a k e n
to a v o i d
ambiguities
between
two
possible
uses
of
the
word
'horas'
as a m e a s u r e
of a t i m e i n t e r v a l
(meaning
'hours'), and
as a p o i n t in t i m e
(mean~g 'o'clock'):
' P a i s e s a l o s qua I t a l i a
' P r o d u c t o s que I t a l i a
Actually,
because o f Spanish l a r g e l y f r e e
word o r d e r , i t
i s a l s o p o s s i b l e f o r more
t h a n one complement t o a p p e a r on t h e l e f t
o f t h e main v e r b . However, most o f t h e s e
c o n s t r u c t i o n s sound odd o r
u n n a t u r a l and
are not expected.
' d e n t r o de 3 horas'
' d u r a n t e 2 h o r a s y 10 m i n u t o s '
'antes de las 5 horas'
'alas
3 h o r a s 10 m i n u t o s '
More
t h a n one p r e p o s i t i o n
is
introduce a temporal adverbial:
'desde a n t e s del m a t t e s ' ,
' h a s t a d e s p u e s de las 8'.
allowed
to
n)
Verbs o f
t y p e NAA ( r e q u i r i n g N o m i n a t i v e
and two A c c u s a t i v e s ) and NAG ( r e q u i r i n g
N o m i n a t i v e , A c c u s a t i v e and G e n i t i v e ) do
not e x i s t in Spanish, t h e r e f o r e the r u l e s
written
i n t h e German Grammar f o r
these
a d d i t i o n a l o b j e c t s need n o t be p r o v i d e d .
m)
The syntax
of R e l a t i v e
Clauses
is q u i t e
different
in S p a n i s h ,
d u e to the p a r t i c u lar p r o p e r t i e s
and uses of S p a n i s h
Relative
Pronouns.
Also, as R e l a t i v e
Clauses
are subordinate,
w o r d o r d e r is d i f f e r e n t
in G e r m a n and the g r a m m a r m u s t be p r o v i d e d
with a special
section
to d e s c r i b e
these
sentences with verb final word order. This
is not n e c e s s a r y
in S p a n i s h
because
all
clauses,
e i t h e r m a i n of s u b o r d i n a t e ,
have
a l w a y s a l a r g e l y f r e e w o r d order.
o)
The r u l e s f o r
C o o r d i n a t i o n in
Spanish
f o l l o w q u i t e c l o s e l y t h e German model. Only
t h e c o o r d i n a t i o n o f N o u n Phrases has been
k e p t l e s s c o m p l i c a t e d p r o b a b l y due n o t t o
the g r e a t e r s i m p l i c i t y
o f c o o r d i n a t i o n in
Spanish but t o t h e s m a l l e r s o p h i s t i c a t i o n
o f t h e b a l a n c e checks i n t h e c o o r d i n a t e d
structures.
These
rules
will
certainly
have t o be r e v i s e d .
Most
of
the
Spanish
relative
pronouns
c o n v e y l i t t l e i n f o r m a t i o n a b o u t the c h a r a c
teristics
of
their
referent
noun:
'que T
can
have
a referent
of a n y
gender
and
number,
'cual' and 'quien' are o n l y m a r k e d
for
singular,
'cuales'
and
'quienes'
for
plural,
unless
an
article
is p l a c e d
in
f r o n t of the r e l a t i v e :
On a c o o r d i n a t e d N o u n Phrase t h e p l u r a l
f e a t u r e i s always s e t , the s i n g u l a r feature
o n l y i n case t h e c o n j u n c t i o n i s ' o ' ( ' o r ' )
and a t l e a s t one o f t h e c o n s t i t u e n t s i s
singular,
because i n t h i s
case t h e v e r b
can a g r e e w i t h i t s
n e a r e s t N o u n Phrase,
o r w i t h t h e c o o r d i n a t e d N o u n P h r a s e . The
m a s c u l i n e f e a t u r e i s s e t i f one o f t h e Noun
Phrases a r e f e m i n i n e .
' P a i s e s a los que e x p o r t a I t a l i a '
( ' C o u n t r i e s to w h i c h I t a l y e x p o r t s ' )
' £ m p l e a d o s de los c u a l e s
( ' E m p l o y e e s of w h o m J o h n
exporta vino'
e x p o r t a a Alemania'
J u a n es jefe'
is m a n a g e r ' )
S p e c i a l r u l e s a r e needed f o r c o o r d i n a t i o n
with
the
conjunction
'sing'
('but'),
because t h e f i r s t
element o f the c o o r d i n a t i o n must be n e g a t e d , e . g . : ' n o j e f e s s i n g
e m p l e a d o s ' , ' n o 5000 s i n g 6 0 0 0 ' .
T h e last r e l a t i v e p r o n o u n 'cuyo' ( ' c u y a ',
' cuyos',
'cuyas':
'whose')
admits
any
referent
but
must
agree
in
gender
and
n u m b e r w i t h the n o u n f o l l o w i n g it:
( I n some cases o f s i n g u l a r nouns c o n j u n c t e d
by ' y ' ,
e s p e c i a l l y i f t h e r e i s no a r t i c l e
p r e c e d i n g t h e second noun, t h e r e s u l t i n g
c o n j u n c t e d N o u n Phrase can a l s o be s i n g u lar:
'la
e n t r a d a y s a l i d a de a v i o n e s se
s u s p e n d i o ' . As t h e s e case a r e v e r y p a r t i c u l a r t h e y have n o t been c o n s i d e r e d ) .
' £ m p l e a d o s c u y o jefe'
('Employees whose manager')
'Pals c u y a p o b l a c i o n '
('Country whose population')
79
relational
database
c o u l d be o b t a i n e d .
The
system is ready for use in real applicat~n
environments,
and
user
experiments
and
studies
have even been performed
with
the
original
German version
(2,3).
The Spanish
version
is less
developed
and tested,
and
needs further
revisions
and improvements,
but
we h o p e i t
will
soon reach
t h e same
degree
of
applicability
of
its
German
counterpart.
P)
As to P e r s o n a l P r o n o u n s some of t h e m can
o n l y o c c u p y s p e c i a l p l a c e s in s e n t e n c e s ,
and
this
must
be
accounted
for:
the
personal
pronouns
'el',
'ella,
'ellos',
and
'ellas'
('he',
'she'
and masculine
and feminine
'they% respectively)
function
a s n o r m a l Noun P h r a s e s ;
t h e y c a n be s u b j e c t
of
sentences,
and
become
accusative
or
But
d a t i v e if p r e c e d e d by a p r e p o s i t i o n .
the P e r s o n a l
Pronouns
'io' , 'la', 'los',
'las' ( a c c u s a t i v e ) , and 'le', 'se' ( a c c u s a t i v e and d a t i v e ) can o n l y be p l a c e d to
the
left
of
the
verb,
and
immediatly
preceding
it.
However,
all
the
rules
dealing
with
Personal
Pronouns only describe
thelr
syntax,
no i n t e r p r e t a t i o n
routines
are provided
by the system .
REFERENCES
1) A s t r a h a n M . M . , et. al.
' S y s t e m R: R e l a t i o n a l A p p r o a c h to D a t a base M a n a g e m e n t '
ACM T r a n s .
on D a t a b a s e
Systems,
vol.1,
n£ 2 , J u n e 1 9 7 6 .
Exemples:
'Quien le necesita?'
('Who needs him?')
2)
Kettler
W., Schmidt A., Zoeppritz
M.
'Erfahrungen
mit zwei natuerlich-sprach
lichen
abfragesystemen',
TR 8 1 . 0 1 . 0 0 1 ,
IBM
Germany,
Heidelberg
Scientific
Center,
1.981.
3)
Lehmann H., Ott N., Zoeppritz
M.
'User experiments
with
Natural
Language
for Data Base access'
Proceedings
7 th.
International
ConfeLinguisitics,
rence
on
Computational
Bergen,
1.978.
4)
L e h m a n n H.
'Interpretation
of Natural
an
Information
System',
Research
and Development,
5, september
1.978.
'Que p a i s io e x p o r t a (a A l e m a n i a ) ? '
( ' W h i c h c o u n t r y e x p o r t s it (to G e r m a n y ) ? ' )
'Quien le vende
('Who sells
him
'Quien
('Whow
(un auto)?'
(a car)?')
se io vende?'
s e l l s it to him?')
And s o m e t i m e s
a Personal
Pronoun
is
used
as
a
redudant
dative
to
emphasize
or
further
explain
the indirect
object
of the
sentence:
~Quien (le)
('Who s e l l s
vende autos a Italia?'
c a r s to I t a l y ? ' )
4.
provided
to
describe
this
O t t N . , M. Z o e p p r i t z
'
USL An
Experimental
Information
System
Based
on
Natural
Language'
in L Bolc
(ed.):
Natural
Communication
with
Computers,
vo] .
2,
Carl
Hanser
Verlag,
Muenchen-Wien,
1.979.
6)
L e h m a n n H.
'A System for
Answering
German'
Proc.
6th.
International
sium, Cambridge - England,
parti-
CONCLUSIONS
overview
of the grammar accepted
by
the
User
Specialty
Languages
parser
has
been given.
The main lines
of the Spanish
Grammar have been described,
together
with
its
particularities
in relation
with
the
German one upon which it is based.
An
7)
It
has been shown that
there
are many
small
differences
and
minor
details
changing
from
one grammar
to
the
other,
but
the
main
lines
have been kept,
and
what is more important,
the interpretation
routines
needed for
the semantic
part
of
t h e USL S y s t e m h a v e b e e n a l s o
used in the
Spanish
version
almost
unchanged.
This
indicates
that
this
same a p p r o a c h
can apply
to
other
languages
(as has already
been
done for
example with
English),
and just
by writing
a g r a m m a r i n t h e USL f o r m a t
a
language
interface
to
a
whole
natural
in
of
n£
5)
'(Le)
suministra
Italia
vino a Alemania?'
('Does
Italy
supply
Germany with wine?)
Rules are
cularity.
Language
IBM
J.
vol.
22,
Questions
ALLC
1.980.
Real Academia Espa~ola
'Esbozo
de una nueva
gramatica
Lengua espa~ola'
Espasa-Calpe,
Madrid,
1.979.
in
Sympo-
de
la
8) S o p e R a L.
' G r a m m a r of S p a n i s h for U s e r S p e c i a l t y
Languages'
TR 8 2 . 0 5 . 0 0 4 ,
IBM G e r m a n y ,
Heidelberg
Scientific
Center,
1.982.
9)
80
Z o e p p r i t z M.
' Syntax for
ty Languages
forthcoming.
German in
System'
the
User
Special