G ÉRARD M ILHAUD É LISABETH G ODBERT
A logic-based environment for developing natural language processing applications
Mathématiques et sciences humaines, tome 143 (1998), p. 41-63
<http://www.numdam.org/item?id=MSH_1998__143__41_0>
© Centre d’analyse et de mathématiques sociales de l’EHESS, 1998, tous droits réservés.
L’accès aux archives de la revue « Mathématiques et sciences humaines » (http://
msh.revues.org/) implique l’accord avec les conditions générales d’utilisation (http://www.
numdam.org/conditions). Toute utilisation commerciale ou impression systématique est consti- tutive d’une infraction pénale. Toute copie ou impression de ce fichier doit conte- nir la présente mention de copyright.
Article numérisé dans le cadre du programme Numérisation de documents anciens mathématiques
http://www.numdam.org/
A LOGIC-BASED ENVIRONMENT FOR DEVELOPING NATURAL LANGUAGE PROCESSING APPLICATIONS
Gérard MILHAUD and
Élisabeth
GODBERT*RÉSUMÉ 2014 Un environnement basé sur la logique pour développer des applications du traitement automatique
du langage naturel
Nous présentons un système formé d’un ensemble d’outils pour le
développement
d’applicationsdu traitement automatique du
langage
naturel(interfaces
enlangage
naturel, systèmes d’aide à la com- munication,etc.).
Ce système est construit sur deux principes : modularité de la représentation desconnaissances pour assurer la portabilité du système, et aide à la composition des phrases pour assurer la transparence, c’est-à-dire assurer que les phrases produites sont bien formées aux niveaux lexical, syntaxique, sémantique et conceptuel. Nous décrivons les formalismes que nous avons définis pour la
représentation des connaissances, le processus d’aide à la composition de phrases, et quelques exemples d’applications développées à partir de ce système.
SUMMARY - We present a system
providing
a set of tools for developingnatural language processing (NLP)
applications such asnatural language
interfaces, communication aid systems, etc. This system is based on two principles: modularity of knowledge representation to ensure the portability of the system, and guided sentence composition to ensure transparency, i.e. to ensure that the produced sentences arewell-formed at the lexical, syntactic, semantic and conceptual levels. We first describe the formalisms we
have defined for knowledge representation. Then we explain how
guided
sentence composition is carried out. Finally, we give several examples of applications developed from this system.1 Introduction
The current state of art in the area of
computational linguistics clearly
shows that the elaboration of ageneral natural language processing (NLP) system requires
alarge
amountof work in
modelling
all theknowledge
there is to be taken into account:knowledge
aboutthe
language itself,
itssemantics,
and the world of discourse.Besides,
it is clear that all the current functional NLPsystems only
work on subsets of naturallanguage,
becauseall the
knowledge
to be modelled is so extensive andcomplex
thatdefining
a total model for it seemsquite utopian.
To be realistic in view of this state of
facts,
the ILLICOsystem (see [Battani
et al.91], [Milhaud 94], [Pasero
et al.95])
has beendesigned
from anoriginal approach
we thinkpertinent regarding
the unavoidable limitations of any NLPsystem.
ILLICOprovides
aset of tools
making
itpossible
togenerate
various NLPsystems (NL interfaces,
commu-nication aid
systems, computer
assistedteaching
orlearning systems, etc.);
it has been based on thefollowing
twoprinciples :
e
Modularity
inknowledge representation,
to ensure theportability
of thesystem;
* Laboratoire d’Informatique de Marseille,
Imilhaud, godbertlûlim.univ-mrs.fr
e Guided sentence
composition
to ensuretransparency (i.e.
to ensure that the pro-duced sentences are well-formed at each level:
lexical, syntactic, conceptual
andcontextual).
Guided sentence
composition requires
a real-timeprocessing
oflanguage;
to realizeit,
weuse a
logical approach,
where :- The whole necessary
knowledge
is modelled inlogic-like formalisms;
- All the constraints on the different levels of well-formedness are
simultaneously
usedthrough parallel-like logical
calculations.The paper is
organized
as follows:In section 2 we describe the main
objectives
of theapproach: portability
andtransparency
of the
system.
In section 3 we describe the different formalisms we have defined forknowledge representation, and,
for each ofthem,
we recall related works. In section 4we
explain
how the constraints on the different levels of well-formedness arecoroutined,
to
perform
real-timeanalysis/synthesis
of sentences. In section 5 we makeexplicit
thelimitations of the
system.
In section 6 wegive
severalexamples
ofapplications developed
from this
generic system.
2 Objectives: portability and transparency
For the
development
of anygeneral
NLPsystem,
one must admit that nopresent linguistic
model
provides
an exhaustive grammar for naturallanguage (or
even for asignificant
part
ofit). Moreover,
it islikely
that this situation will not have a short or even middle termappreciable
evolution. As for the semantic level inNLP,
one is far frombeing
ableto
represent
themeaning
ofsentences,
even if thestudy
is restrictedonly
to sentencescomposed
frompresently
available grammars. In suchcircumstances,
we canonly
choosebetween two main
options:
- Continue
trying
to conceivesystems
with asyntactic
coveragepresumably equal
totheir users’
syntactic knowledge;
- Admit our
present inability
to elaboratesystems provided
with all humanlinguistic knowledge,
but take allpossible steps
to ensure that the unavoidable limitations arei)
astolerable
(i.e.
the leastconstraining)
aspossible
andii) explicit
for the user.We think that the elaboration of a
system belonging
to the firstoption
is bound to fail:despite
all theconceptor’s efforts,
thesystem
willreject unavoidably
andunexpectedly
some sentences.
Besides,
asystematic production
of aparaphrase
is desirable so that theuser can be sure that his sentence has been
correctly understood,
but thisprocessing
iscostly
and makes thedialogue
much slower. Such asystem
is called opaque : the userhas to
investigate
with someuncertainty
to find a "convenientstyle"
withrespect
to agrammar issued from the
conceptor’s
ownpreferences.
We think that such asystem
isnot viable.
The
generic
ILLICOsystem
stems from the secondoption.
Our aim is to prove that it isnow
possible
to elaboratedialogue systems
that areactually
usable. The two basicprinci-
ples
of ILLICO arez) portability by
means ofknowledge modularity
andii) transparency
by
means ofguided composition
of sentences.2.1 Portability by
meansof knowledge modularity
We think that the
requirement
ofgenerality
must bereplaced by
arequirement
ofporta- bility.
Instead ofaiming
at asingle system fitting
all(or
at leastmany) domains,
-which
implies
that it contains considerableknowledge
-, we think it is better todesign
a
system easily portable
from one domain to another.Portability
is related toknowledge modularity:
ILLICO is meant to be an environment fordeveloping dialogue systems
for anyapplications,
and the investmentrequired
for thetransition from one
application
to another will be all the more reduced if the differenttypes
of
knowledge (lexical, syntactic, etc.)
areindependently
encoded in distinct modules.Besides the fact that
modularity
is basic to achieveportability,
it also makes itpossible
toillustrate our views on the
processing
of sentences withrespect
to differenthierarchically
sorted levels of
representation
andwell-formedness.
Generally
a sentence is consideredcompletely
well-formed if itrespects
the constraints defined at different levels:prosodic, phonetic, lexical, syntactic, semantic, conceptual, contextual, pragmatic.
InILLICO,
westudy
the well-formedness of sentences at thelexical, syntactic, semantic, conceptual
and contextual levels.Any
NLPsystem developed
from ILLICO contains fivemodules,
each associated to adifferent level of
representation
and well-formedness:e A lexicon
(lexical level)
containsexpected
words andexpressions.
e A grammar
(syntactic level) specifies
theexpected
sentence structures and the gram- maticalagreement.
* A set of semantic
composition
rulesproduce
semanticrepresentations
from the syn- tactic rules of the grammar.e A
conceptual
model(conceptual level) specifies
the lexicalpresuppositions
associ-ated with the
expected
words andexpressions.
e A contextual and discursive model
(contextual level) specifies
the state of the"world" described
by
thepreceding
sentences(i.e.
existentialpresuppositions
onindividuals in the world of
discourse).
A sentence is
lexically
well-formed if the lexicon contains all the wordsoccurring
init;
itis
syntactically
well-formed if the grammar contains all the structuresoccurring
init;
it isconceptually
well-formed if it describes aconceptually possible situation,
i.e. in which all the mentioned individuals and relations arecompatible;
it iscontextually
well-formed if the situation it describes iscompatible
with the referencesituation,
i.e. with the discourse context.The formalisms
adopted
forknowledge representation
in the first four modules are de- scribed in section 3. The module related to the last level ispresently being
defined andimplemented,
and is described in[Mouret 98]
Separating
the differenttypes
ofknowledge provides
otheradvantages.
Incremental de-velopment
of an NLPsystem generated
from ILLICO is the mostimportant
one: thelexical and
syntactical
modules are firstdeveloped,
thesystem
is checked at these firsttwo
levels,
and then the other levels aredeveloped
infollowing steps.
2.2 Transparency by
meansof guided composition
Our
objective
is to enable elaboration of NLPsystems
- Provided
by
a limited butclearly
definedcompetence,
to ensure a totalreliability
within this
competence;
- As little
constraining
aspossible,
so that the user caneasily adjust.
Such
systems
are calledtransparent
since the unavoidable restrictions areclearly
exhibitedto the user:
they
arepermanently
able tospecify
their exactcompetence,
so that thedialogue
is never blocked and the user neverdisappointed.
Transparency,
when carried outcorrectly, provides
many otheradvantages:
- The user
rapidly perceives
the limits of thesystem,
which is used at its best.- The
conceptor
does not have toprovide
a lexicon and a grammar with many syn- onymous variants: one of them isenough.
This makes itpossible
to workrapidly,
withreasonably
limitedlinguistic components.
- The
system
is neverblocked,
for it shows the user theright possible expressions
assoon as an error occurs.
-
Finally,
if thesystem
is wellimplemented,
noambiguous
sentences will ever be pro-duced,
andparaphrases
are nolonger
needed.In
[Milhaud 94]
we describe several more or lesstransparent approaches
and show thatours is the
only totally transparent
one: all theadvantages
enumerated above are effective.To achieve
transparency,
a"guided
mode" has been chosen for thecomposition
of sen-tences : at each
step
in theproduction
of asentence,
thesystem
proposes to the userthe
only
words that can lead to alexically, syntactically, conceptually
andcontextually
well-formed sentence. In order to do
this,
the words are selected fromlinguistic,
concep- tual and contextualknowledge
about the world of the consideredapplication.
Guidedcomposition
of sentences(GC)
is doneby partial synthesis
ofsentences,
aprinciple
intro-duced in
[Colmerauer
et al.82]
and discussed in[Sabatier 89];
the samesystem
is usedfor
analyzing
and forproviding partial synthesis
of a sentence.In the ILLICO
system,
the GC can be thrown out of gear, so that the user works in a"free mode": in this case, his sentence is
classically analyzed by
thesystem.
This mode of sentencecomposition
is the best one forpeople
who are used toworking
with the GC:the user feels as free as in an opaque
system.
The GC mode occurs when the userdirectly
asks the
system
forhelp,
or as soon as thesystem
has detected anunexpected expression.
At any
moment,
the user can go back to the free mode.Finally,
the GC mode is the feature that makes thesystem
a verygeneral tool,
whoseapplications
canbe,
as mentionedabove, natural language interfaces,
communication aidsystems,
etc.Applications developed
from ILLICO are described in section 6.3 Knowledge représentation and adopted formalisms
Each
type
ofknowledge
isrepresented by
means of a distinctformalism,
within a dis-tinct module. The
adopted
formalisms aresimple, high-level,
andindependent
of anyprogramming language (although
our work has been drivenby
alogical-based
and evenProlog-based approach, according
to along
Marseilles tradition forNLP).
In what fol-lows,
webriefly
describe these formalisms and theunderlying
theories(for
acomplete
description
see[Milhaud 94]).
3.1 Modelling syntactic knowledge
We
represent syntactic knowledge
in a formalismstemming
frommetamorphosis
gram-mars
(MG)
introduced in[Colmerauer 75].
Here is an
example
of a MG rule(the
lastexpression
between brackets expresses a condi-tion) :
noun_phrase(t_ype)
=>preposition_or_void(t_ype) determiner(t_ype,x)
common_noun (y) relat ive_clause (z)
~gender_number_agreement(x,y,z)~
We have chosen MG for two reasons:
- We want to use a uniform
approach
based onlogic
andlogic programming;
since MGare issued from Colmerauer’s research on NLP which have led to
Prolog,
MG rules canalmost be considered as
Prolog
code.- MG constitute a very
simple
formalism forwriting
grammars, and this isimportant
because the grammars of the
systems generated
from ILLICO will notalways
be writtenby linguists.
3.2 Modelling semantic knowledge
Our
objective
is to associate a semanticrepresentation
s to anylexically
andsyntactically
well-formed sentence of a
fragment
F of anatural language,
in order to be able to calcu-late from s the well-formedness of the sentence at the
conceptual
and contextual levels.The semantic
representation
isexpressed
in alogical language L,
definedby
thedeveloper by
means of one of the toolsprovided by ILLICO,
the semanticknowledge description f ormalism (SKDF);
in oursystem,
suchlogical languages
definedby
thedeveloper
arecalled
meaning representation
intermediateformalisms (MRIF) -
So we do not want to achieve a direct
interpretation
ofconceptual
and contextual well- formedness from the sentencesthemselves,
but an indirectinterpretation,
from the trans-lation of sentences into L. The indirect
interpretation
makes itpossible
toget
rid ofnatural
language ambiguities by using
therigourous syntax
and semantics of alogical language.
Toperform
a strict andsystematic
translation weadopt
anapproach
similarto
Montague’s ([Montague 73]).
Our SKDF
only imposes
two constraints:1. The MRIF must be
logic-like (first-order) ;
2. The translation of a sentence into the MRIF must be
compositional :
the translation of acompound expression
is a function of the translation of itscomponents
and oftheir mode of combination.
The second constraint is related to the
"guided
sentencecomposition
mode": we must de- tect any error as soon as it occurs, even before the end of thecomposition
of the sentence.So each
partially composed
sentence must have a translation.Since our
system
ismodular, arguments
ofgrammatical symbols
mustonly
convey syn- tacticknowledge
and cannot be used to build the translations of theanalyzed/synthesized
sentences. So rules
of
translation are defined in aspecial heading
of the SKDF: to eachdefinition of a
syntactic category
C as a function of itscomponents
cl , ... , cn, we asso- ciate in the semantic module a rulegiving
the translation of C as a function of the translations~c1 ~ , ... , il
of CI, ... , c~,.Our formalism must therefore allow the
developer
to express the combination of the[ici 1
~... Our SKDF makes this combinationpossible
via thetyped
A- calculus for-malism.
Then,
thecompiler
mixes these rules with thesyntactic
and lexical ones into asingle
program: the program
sentence(D,R)
is able togenerate
inparallel
all thepairs (D, R)
where D is a derivation tree
generated according
to the grammar, and R its translation into the MRIF.To
perform
a strict andsystematic
translation likeMontague’s,
we process like him. To obtain the necessaryhomomorphism
between thesyntactic
trees of the sentences of thefragment F
and thesyntactic
trees of the translations of the sentences into theMRIF,
wedefine a translation process whose
compositionality
ensures thehomomorphism.
First,
eachelementary category
of the MRIF(predicates, formulas,... )
is labelledby
atype
which expresses how thecategories
can be combined to definehigher-level categories (and
associatedtypes).
Then,
asystematic correspondence
is established between thesyntactic categories
of F(grammatical categories)
and those of the MRIF(types) (heading types
of theSKDF,
described in
part 3.2.1).
If theC f category
in Fcorresponds
to theCl category
in theMRIF,
then each element ofCf
must be translated into an element ofCI.
Then,
the rules of translation of non-terminalcategories
aredefined, expressing
how theexpressions
of thesecategories
of F have to be translated into the MRIF. These rules mustrespect
the above mentionedcorrespondence,
to ensure that thecategories
of thetwo
languages
are associated in a coherent way.The last
step
is thedefinition, always respecting
the above definedcorrespondence,
of therules
translating
the basicexpressions
ofF,
i.e. theexpressions
ofpreterminal categories.
Each basic
expression
of F is translated into asingle expression
of the MRIF.The
typed
a-calculus is a very crucialpoint
of our SKDF. We use thetypes
in a usualway,
shortly
described below.Création. From an initial set of basic
types,
an infinite set oftypes
can begenerated:
each basic
type
is atype
and if a and b aretypes,
a, b > is atype.
Use.
Types
are used to label sets ofexpressions,
and to express thepossible
combinations of theseexpressions.
This is done in accordance with thesimplification
rule: if A is anexpression
oftype a, (3
>, then it canonly
be combined with anexpression
B oftype
a to
give
theresulting expression A(B) (application of
A onB)
oftype (3.
For
example,
ift1, t2
andt3
are basic orcomplex types,
thent4
=tl,
» and t5 ==«t3, t2
>,t3, t2
» arecomplex types.
Anexpression
oftype t4
canonly
beapplied
on anexpression
oftype tl
to obtain anexpression
oftype t2, ti
>; anexpression
of
type
t5 canonly
beapplied
ont3, t2
> to obtain anexpression
oftype t3, t2
>.3.2.1 Our semantic formalism: SKDF
The SKDF allows the
developer
to define his own MRIFL,
and toexplain
the com-positional
translation of thefragment F (described by
itsgrammar)
into the associatedMRIF. The SKDF is made up of several
headings,
related to the different actions men-tioned above.
a)
Définition of thesyntactic categories
of the MRIF: the"types" heading
In the ILLICO
system,
there areonly
two basictypes:
the formulatype,
noted o, and the individual variables and constants one, noted 1.In the
"types" heading,
asyntactic category
of the MRIF is associated to eachgrammatical category.
Thecorresponding
rules have the form X =t,
where X is agrammatical category
and t atype.
Here are someexamples
of such rules:Typing expressions
conveys aspecial meaning:
if o is thetype
of formulas and 1 thetype
of
individuals,
it seems natural to associate thetype
o to thecategory
sentence sincesentences are
usually
translated into formulas. Moreexplanations
about the choice oftypes
aregiven
in[Milhaud 94].
b)
Definition of thequantifiers
of the MRIF and theirtypes:
the"quantifiers"
heading
The
developer
of a NLPsystem generated
from ILLICO must define thequantifiers
of theMRIF. These
quantifiers
will appear ina-expressions
so, for each ofthem,
thedeveloper
must
specify
itssyntactic category,
i.e. itstype,
which defines thepossible types
of theexpressions
in the scope of thequantifier.
For us, the
expression ~~
p - whereQ
is aquantifier, r
thequantified
variable and p anexpression
- iscompositionally
builtby
theapplication of Q
on p(p
is theargument
ofQ).
For
example,
wegive
the rulesdefining
the threequantifiers the,
some,two
or- three(in
our
formalism,
and in all thefollowing parts,
theapplication A(B~
of theexpression
Aon the
expression B
is noted[A, B]; in f
meansThe
quantified
variables(i.e.
the variables of theMRIF)
are oftype i,
forthey
modelindividuals. The above rules show
that,
in the definition of aquantifier,
thequantified
variable is
coupled
with apair
of constants c =a, b
> which does not interfere withtypes
and a-calculusoperations.
Thispair a, b
> encodes the lower(a)
and upper(b)
bounds of the
cardinality
of the setof
individualsrepresented by
thequantified
variable:we
impose actually
that the variables of all our MRIFrepresent
setsof
individuals sothat we can process
conceptual
constraints oncardinality
toprevent conceptually
incorrectexpressions
such as * The nosesof
Peter. These constraints will be described in section 3.4.c)
Definition of the connectors of the MRIF and theirtypes:
the "connectors"heading
The definition of the connectors is done in the same way as the definition of
quantifiers.
Here are
examples
of rulesdefining
connectors:d)
Translation of theexpressions
of the non-terminalgrammatical categories:
the "rules"
heading
We
give
below anexample
of twosimple
translationrules,
labelledTi,
i =1,2.
Wefirst mention the entire
context,
i.e. the associated grammar rules(labelled Gi )
and thenecessary definitions from the
"types" heading.
The abstraction a~ lV is noted x, N >.One can
verify,
as thecompiler
doesit,
that thetypes
of theright
and leftexpressions
of
Ti
rules are identical. How does thecompiler
process the free a-variables(like
x inT2)?
It associates thetype
which makes correct the first occurrence encountered(here
the x,... >; so the
type
i is associated to~~
and then it checks whether thistype
isalso convenient for every other occurrence it will encounter
(here [verôl , x];
it iscorrect):
if
not,
it shows an error.e)
Translation of theexpressions
of thepreterminal grammatical categories:
the
"preterminal" heading
Finally,
tocomplete
the definition of hisMRIF,
thedeveloper
mustdefine,
for each basicexpression
of thefragment,
i.e. eachexpression Ep,
of thepreterminal categories,
itsHere is an
example,
for indefinite article:3.3 Modelling lexical knowledge
The lexical module constitutes the terminal
part
of thesyntactic
and semantic ones. It is aset of lexical items. Each of them is a
4-uple
e,f, g, l
> where e is a lexicalentry (word
or
expression), f
a set ofphonetic information, g
a set ofgrammatical
information and l thelogical
terminal(for
theonly preterminal categories
whichrequire it,
see3.2.1, e)).
Information is
expressed by
means of features(couples
of the formvalue».
Morphological
rules may calculate derived lexical items(e.g.
different forms ofverbs)
from basic ones. For
example,
the word "tree" would be encoded as follows(only
lexicalentry, preterminal category
andlogical
terminal arerequired by
the ILLICOsystem).
3.4 Modelling conceptual knowledge
In this
section,
ourobjective
is the definition of alogical
model forconceptual knowledge
associated to the
application,
i.e. to the world ofdiscourse;
it expresses common senseinferences and we elaborate it to
prevent
theproduction
ofconceptual
incoherencesduring
the
composition
of sentences.We focus on two
types
ofconceptual
constraints(introduced
in[Godbert 94]):
domainconstraints
prevent
incoherences such as the motherof
themountain,
the mountain eatsan
idea,
which come fromincompatibility
betweenwords,
andconnectivity
constraintsprevent
incoherences such as the mothersof Peter,
the averageof
mymark,
the bird isnumerous, which come from the misuse of a
singular
orplural
form.From the semantic
representation
of sentences and from theconceptual
constraints wedefine in this
section, logical
calculations enable us to determine whether a sentence isconceptually
coherent. These calculations are described in section 4.2.3.4.1 Related works on
conceptual
incoherenceAs it is
usually done,
we consider that a sentence is incoherent if it is inopposition
to com-mon sense inferences i.e. if it expresses information that cannot be true in any normal sit- uation.
Besides,
an incoherentexpression
"contaminates" any sentence in which it occurs;for
example,
if aproposition
isincoherent,
itsnegation
is also incoherent([Cruse 86]).
Common sense inferences have been studied in different areas and modelled in different
ways: in lexical semantics
(lexical relations,
semanticfeatures,
selectionalrestrictions, etc.,
e.g. in[Cruse 86]);
inknowledge representation (ISA link,
rolerestrictions,
rolecardinality,
e.g. in[Brachman 85]);
in relational data bases(cardinality
ofattributes,
functional or multivalued
dependencies,
e.g. in[Aho
et al.79]).
To model this common senseknowledge
in oursystem,
we define in thefollowing
sections alogical
formalism forconceptual constraints,
which takes into account these various related works.3.4.2
Modelling
relations between setsWe consider the world of discourse as a set E of individuals inter-connected
by
relationsexpressed through natural language
sentences. Inplural
nounphrases,
these individualsoccur inside
sets,
so westudy
relationsconnecting
sets.For the formal
point
ofview,
thelogical language L
used for therepresentation
of sentences(i.e.
theMRIF)
will beinterpreted
inP(£),
the set of all the subsets of S.We associate a set x, element of
P(£)
to each nounphrase occurring
in asentence,
andwe
note 1 x 1
itscardinality (in
thepresent
state of ourwork,
weonly study
countablesets). According
to thetype
of the nounphrase denoting
the setx, ~ 1 x 1
is more or lesswell known
(a rabbit,
John andPaul,
threecats, books, etc.).
Let be the set of all intervals of the
type la, b],
where a is apositive integer
and bis an
integer greater
orequal
to a, or b is +00 .From a natural
interpretation
ofdeterminers,
we associate an element of 1 to each nounphrase
n: if r is the setrepresenting
n, there exists a minimal element of I towhich ~ x ~ 1 belongs.
Forexample,
if n is asingular
nounphrase, 1 x lE [1, 1];
for an indefiniteplural,
we
only
knowthat ) r ) 1
isgreater
than1, so 1 xiE [2,
We then consider a set R of relations on
~(E):
eachverb,
noun oradjective
defines averb
phrase,
and we associate to it a relation on~(~);
each n-ary relation r in R is anapplication
from(p(£))n
into{O, 1};
itsgraph
is a subset ofExamples: talk(x), send(x,y,z), be-human(x), be-John(x), be-father-of(x,y), be-blue(x),
etc.;
thearguments
x, y,...represent
the elements ofP(£)
associatedby
the relations(in
a sentencerepresented by
the formular(~1, ~2, ... , Xn), they correspond
to the sub-ject
and variouscomplements
of the verbphrase
modelledby r).
These relational
symbols (talk(x), send(x,y,z), etc.)
of thelogical language
are associatedwith
verbs,
nouns andadjectives
vza thelogical
terminals defined in the lexical module(see 3.3).
The
conceptual
constraints we have to model toprevent
incoherences in sentences will be defined on elements of R: theconceptual
constraints attached to a n-ary relation rcorrespond
to common sense inferences associated to the verbphrase represented by
r.More
precisely, they
define necessary conditions an element(XI,X2,...,Xn)
of(p(e»n
must fulfill to be in the
graph
of r(i.e.
conditions on r and(Xl,
~2, in order tor(xl,
x2, ... ,xn)
to betrue).
3.4.3 Domain constraints Definition
Domain constraints
correspond
to the selectional restrictions defined in lexicalsemantics,
and to the role restrictions defined in
knowledge representation.
A domain constraint on a relation rimposes
that theargument
~2, ... , of r is included in aspecial
subsetof en . To model this
type
ofconstraint,
it is necessary todistinguish
a number of subsetsof E and to
specify
theirpossible
inclusion ordisjunction
inter-relations.We first define a set D of domains of E to which the individuals
belong:
a domain dis a subset of
S,
definedby
oneproperty,
and often related to a naturalspecies (human, animal, fruit tree, etc.).
This notion of domain is close to the classical notion ofconcept
defined for
knowledge representation (see [Brachman 85]). E
is thegreatest
domain. Theset D of all the domains is
partially
orderedby
the inclusion relation defined inP(E).
We then define a set Dec of
decompositions
of domains.Definition
A
decomposition
of a domain d is a setId,, d2, dpl
ofdisjoint domains,
eachstrictly
included in
d ;
thedecomposition
is noted:dec(d, dl.d2.... dp).
Our
system
allows the definition of severaldecompositions
of the samedomain,
and thisenables the
developer
to build a"multiple" taxonomy,
much less restricted than the usual taxonomies of classes defined forknowledge representation.
Examples
dec(Animate, Human.Animal); dec(Human, Man.Woman.Child);
dec(Animal, Dog.Horse.Rabbit.Cow); dec(H uman, Teacher. Doctor . Farmer. Trader).
Definition
We define an
application
dorn from R intoUn>l
D’~that,
to each n-ary relation r, asso-ciates an element of D~.
dom(r) == (~i, ~2,... ? dn)
is the domain constraint of r.This definition means: if the
n-uple (XI,
~2?. ’ ’ ?Xn)
is in thegraph
of r, xi is included indi
for each i.Examples
For the relations
speak(x)
andoperate-on(x, y),
we define the domain constraints:dom(eat) - (Animate); dom(speak) - (Human); dom(operate-on) _ (Doctor,Animate).
3.4.4
Connectivity
constraintsConnectivity
constraints are defined toprevent
incoherences due to a misuse ofsingular
or
plural.
Aconnectivity
constraint on a relation rspecifies dependencies
between the cardinalities of the sets xioccurring
in a formular(xl, x~, ... , xn).
The notion of connec-tivity
introduced here fornatural language processing
is anadaptation
of the notions ofcardinality
and multi-valueddependency.
Examples
- In the formula
1
must be smaller orequal to 1 y
- In the formula
practise (XI
p,d), (the
person xpractises
theprofession
p at the dated),
ifwe assume that a person can
practise only
oneprofession
at atime,
eachpair (x, d)
canbe connected to
only
one p.So, if ~ x ~ =k 1 ==h, 1 p 1
must be smaller orequal
to(I~
xh).
To model
connectivity constraints,
we need the notion ofc-triplet.
Definitions
For n >
1,
we callc-triplet of type
n anytriplet (8, k,j)
such that:s is a strict subset of
~l, ... ,
1~ E~1, ... , nl, k es, i
E I.We note
T(n)
the set of thec-triplets
oftype n,
and T =We define an
application
conn from R into~(~’):
for any n-arysymbol
r,conn(r)
isa finite set of
c-triplets
oftype
n.conn(r) = {~i,..., tql
is theconnectivity
constraint of r.The relation
(s, k, j)
Econn(r)
has thefollowing meaning:
if then-uple (xl, ~2, ... , xn)
is in the
graph
of r, if eachargument
with i in theset s,
is a set withcardinality 1,
then the
cardinality
of the k-thargument
isin j.
Examples
For the relations
be-mother-of (x, y)
and we define theconnectivity
con-straints :
conn (be-mother-
We
generalize
the conditions defined above for these twoexamples by
the definition of the formula x2, ... , where t isa c-triplet:
4 A real-time processing of sentences
4.1 Coroutining constraints for
areal-time processing of
sen-tences
To compose sentences in a
guided
modeby partial synthesis,
all the different levels of well- formedness must besimultaneously
taken into account when thesystem analyzes
agiven
sentence or
synthesizes
apartial
one. Ourexigence
ofmodularity
makes this necessaryparallelism
much morecomplex.
The solution we have
adopted
is to simulate itby coroutining
constraints associated tothe different levels of well-formedness. The core
algorithm (in Prolog)
is thefollowing:
We coroutine constraints in a classic way. The program
sentence(D,R), generated
from thelexical, syntactic
and semantic rulesby
the ILLICOcompilator (see 3.2),
is a build-ing
process controlledby
two coroutined constraints. As mentionedabove,
itgenerates
all the