Transcript

Expert Systems with Applications 39 (2012) 7330–7337

Contents lists available at SciVerse ScienceDirect

Expert Systems with Applications

journal homepage: www.elsevier .com/locate /eswa

A case based reasoning model for multilingual language generation in dialogues

Víctor López Salazar ⇑, Eduardo M. Eisman Cabeza, Juan Luis Castro Peña, Jose Manuel Zurita LópezDept. Computer Science and Artificial Intelligence, ETSIIT, University of Granada, C/Periodista Daniel Saucedo Aranda, s/n, Granada, Spain

a r t i c l e i n f o a b s t r a c t

Keywords:DialogueSpeech actsConversational AgentsNatural Language Generation

0957-4174/$ - see front matter � 2012 Elsevier Ltd. Adoi:10.1016/j.eswa.2012.01.085

⇑ Corresponding author.E-mail addresses: [email protected] (V. López S

(E.M. Eisman Cabeza), [email protected] (J.L. Castr(J.M. Zurita López).

The process of Natural Language Generation for a Conversational Agent translates some semantic lan-guage to its surface form expressed in natural language. In this paper, we are going to show a Case BasedReasoning technique which is easily extensible and adaptable to multiple domains and languages, thatgenerates coherent phrases and produces a natural outcome in the context of a Conversational Agent thatmaintains a dialogue with the user.

� 2012 Elsevier Ltd. All rights reserved.

1. Introduction

The industry has got a growing interest in natural languageinterfaces which make possible that users easily interact in a nat-ural way with the devices they use. These interfaces are usuallyEmbodied Conversational Agents (ECAs) or, in general, Conversa-tional Systems. In the educational field, there are many opportuni-ties where these systems could be employed, e.g. tutoring systemswhich give curricular advice or lessons about a particular matter(Graesser, Chipman, Haynes, & Olney, 2005), conversational gamestesting emotional abilities (Rehm & Wissner, 2005), embodiedagents to simulate different roles in a professional environment(Kopp, Gesellensetter, Kramer, & Wachsmuth, 2005). These agentscarry out, in a broad view, three big tasks: Natural LanguageUnderstanding, Dialogue Management, and Natural Language Gen-eration (NLG). For the last one, although there is an agreement be-tween the global subtasks that a NLG process should carry out(Reiter & R, 1997), there is not a standard technique to do it be-cause it depends in many ways on the selected problem domain.Basically, there are three approaches to tackle the NLG problem;which are in ascending order of complexity and generality: cannedtext, templates, and symbolic approaches employing knowledgerepresentations at different linguistic levels and rules to manipu-late them. Canned text has the advantage of being a simple ap-proach; it only needs the final text to be generated, but has thedrawback that it is not reusable. Templates have got a more ab-stract view generating Natural Language (NL), mixing fixed textwith variable text. An example of a classical system using this ap-proach is ELIZA (Weizenbaum, 1966), which inserts part of the userinput in the system answers to simulate the process of a psycho-therapist doing a therapy. This is a more general NLG technique,

ll rights reserved.

alazar), [email protected] Peña), [email protected]

because it does not need to pre-generate all the system answers,although these templates could not be reused in other situationsthat those for which they have been initially created. The last ap-proach usually employs linguistic knowledge as grammars or rhe-torical operators (Mann & Thompson, 2005) to describe the part ofthe language used by the system making it more generic, althoughthis leads to raising the complexity of the system.

Conversational agents usually focus their NLG methodology onthe use of templates. A well known language to develop conversa-tional agents is AIML (Wallace, 2000). It is based on stimulus–response scheme for answer generation, using pattern matchingfor recognizing the user input and templates for natural languagegeneration. The semantics of the contents of the agent’s answercould be specified as two simple string tags, by the ‘‘topic’’ and‘‘that’’ tags. This scheme is clearly insufficient to establish thecontents of the answer, because the agent cannot say what hewants but only the matching answer to a user input.

One proposal developing this scheme is given by Kimura andKitamura (2006) which extends the AIML language allowing toincorporate SPARQL queries to extract sentences from web pagesannotated with RDF, making the agent more dynamic. Lim andCho (2005) use a genetic programming algorithm to make the an-swers of a conversational agent more varied using Sentence PlanTrees (SPT) elements which contain the structure of the answer.SPT are binary trees containing templates in their leaves and jointoperators joining these sentences in their parent nodes. The algo-rithm works crossing and mutating these operators, creating newsentences.

ProtoPropp (Gervas, Diaz-Agudo, Peinado, & Hervas, 2005) is astory plot generation program which uses a CBR technique to builda story from an initial description of its plot, using Propp functionsto organize the tale and an ontology to capture the domain entitiesand to set all the relevant entities for the generation task. Cases arecomplete plot tales composed by related movements. A movementis a kind of procedure related to several Propp functions that allows

V. López Salazar et al. / Expert Systems with Applications 39 (2012) 7330–7337 7331

following the history until a certain point, i.e. until an objective inthe plot has been reached. The CBR module retrieves a similar casefrom the input query which contains a partial description of the taleand the retrieved case is adapted doing substitutions with therestrictions of the input query, searching for compatible movementsin the ontology to adapt the case. Later, the resulting structure ispassed to an NLG module which selects the content to be includedin the tale discarding the already presented information, structuresthe discourse establishing a presentation order between the facts ofthe tale based on priorities, makes an aggregation of facts talkingabout the same subject or the same action, selects the word torepresent the salient entities of the tale, and expresses the plot ina natural language instantiating the templates.

Mairesse and Walker (2010) describe PERSONAGE as a psycho-logically motivated, parameterizable natural language generatorable to produce texts with different styles associated with aspectsof personality. The system is composed by several modules: a con-tent planner which selects the content of the sentences and struc-tures the discourse using rhetorical operators, a sentence plannerwhich specifies how the sentences have to be arranged and a reali-zation module which produces the final text. Each of these modulesholds parameters controlling some aspects of the type of text to gen-erate, e.g. for the content planning, twelve parameters influence thesize of the content plan, the content ordering, the used rhetoricalrelations, and the polarity of the expressed propositions.

There have been more approaches related with the automaticgeneration of the language. Daniel S. Paiva carries out a survey of19 NLG systems (Paiva, 1998), most of them using symboliclanguage representations. From this survey and the other revisedliterature, we can state the following:

� Symbolic conversational systems must have a semantic level,like the entities of the ontology describing the domain of talesin the ProtoPropp system and a lexical level describing thedomain entities in natural language.� A symbolic view of NLG using linguistic knowledge, e.g. gram-

mars or any other knowledge representation about somelinguistic level like rhetorical operators to structure the dis-course, is hard to adapt from one domain to another becausethe operators used in one linguistic level for a given domaincould not be applicable to this same level of another domain.� A symbolic view of an NLG system requires an appreciable the-

oretic knowledge about linguistics and some methodology tomake it successfully applicable.� If grammatical rules are employed in any level to capture syn-

tactic structure, it is necessary to adapt the rules for eachrequired language.� Usually, although not always, symbolic approaches based in

transformations or grammars produce texts having a veryclosed style, turning these techniques hard to use in conversa-tional agents employed for dialogues that must be believable.

In many cases, the desirable objectives for NLG in a conversa-tional agent are to keep the employed methodology as simple aspossible, without having a deep linguistic knowledge embeddedinto the system while maintaining an acceptable generality de-gree, i.e., the conversational agent should use some kind of prede-fined answers and variations of them, when the contents of theanswer and the intentions of the agent were similar to those ofa human being in the same situation. Usually, computational lin-guistics human experts are expensive or unavailable resourcesand the effort of building an NLG module for a conversationalagent should be minimized. If the employed technique is genericenough, this module could be reused in other agents devoted todifferent domains and languages without developing another spe-cific NLG system for each domain and language.

We are interested in developing an NLG system used for dia-logues which does not need a deep linguistic knowledge and whichcould be reused in many domains without changing the systemfunctionality. Our work takes the ideas by Searle about speech acts(Searle, 1969), that have been later implemented and derived in sev-eral theories and conversational systems (Stent, 2002, 1995).Speech acts are of interest to classify the possible kinds of sentencesthat a conversational agent could use in a dialogue, establishing arelationship between the semantic content of the utterance andthe intentionality of the agent.

In the following section, we describe a Case Based Reasoning(CBR) methodology for the NLG process explaining in detail theknowledge representation and each of the CBR stages, startingfrom the indexation and retrieving of cases from the semantic in-put, to the adaptation of the cases to get the final natural lan-guage answer. Section 3 will show the tests made to the systemin the context of a virtual simulated patient that maintains dia-logues in several languages and will discuss the results of thesetests. Finally, the conclusions are drawn in Section 4.

2. Material and methods

Many authors agree on a high level architecture that stands fora group of high level tasks which are necessary for NLG. However,developed conversational systems do not keep either the order orthe functions that each one carries out (Bateman & Zock, 2003;Reiter & R, 1997):

Macro-planning tasks select the relevant information from aknowledge source (content determination) and organize it tobuild a text plan (discourse planning). This generally producesa tree composed of a set of leaves, messages to be expressed,generally clauses or sentences, and a set of nodes and arcsexpressing the rhetoric relation type and the textual status ofthe segment.Micro-planning tasks decide how to describe an entity, i.e.,they give enough information to allow the entity to be discrim-inated from other alternatives (reference); they group togetherrelated material, removing redundant elements to build betterintegrated and more concise text (aggregation) and select thecorrect words to express the chosen content and to achievethe necessary cohesion degree (lexicalization, pronominaliza-tion, and keywords selection).Surface Realization tasks impose the chosen grammatical con-structions, as the linear order, the sentence complexity, insertfunction words, and select the final form of the words.

Although these are general tasks in an NLG process, the languagerequirements are different whether the task is writing a discourseor maintaining a conversation. In the former, macro planning tasksare very important because usually, the writer must follow an argu-mentation to come to a conclusion and the produced text is usuallylarge. However, if the task is to maintain a conversation, then keep-ing track of the intentions and beliefs of the hearer and our ownones becomes more important so Micro-planning tasks are the pri-mary tasks and the type of text produced is shorter. These stages inNLG for a dialogue language generation task could be realized com-bining some knowledge structures to describe the entities of thedomain and the necessary structures to support a CBR process,assimilating the cases with a sort of template.

Communicative Objective.This expresses the communicative intention of the sentence, like‘‘Greeting’’ or ‘‘Answer’’. It has a priority indicating the orderbetween objectives.

7332 V. López Salazar et al. / Expert Systems with Applications 39 (2012) 7330–7337

Communicative Action. This represents different kinds ofspeech acts, like ‘‘Informing’’ or ‘‘Complaining’’. It has a priorityindicating the order between actions.Phrase Restriction. This represents a concrete natural languagerealization of an entity, e.g. for the Human entity, a phraserestriction will contain Human as its domain entity referenceand ‘‘person’’ as its natural language realization. Another couldbe Human ? ‘‘homo sapiens’’, or even Human ? ‘‘humanbeing’’. Besides the lexical level associated to an entity, eachphrase restriction may have some constraints indicating thekind of situation this restriction is applicable. It could havesome morphological constraints, like the gender or number ofthe lexical realization, logical constraints related with proper-ties of the entity, e.g. an instance of Human can only be labeledas ‘‘elderly’’ if the constraint ‘‘Human.age >70’’ is true, or ad hocconstraints made specifically to group together some phraserestrictions.Phrase. It is a template representing a natural language sen-tence. It is composed of a text field containing the sentenceof the template, a communicative action, and several refer-ences to phrase restrictions. The text field invokes somedomain entities between ‘‘#’’ characters. These entities areassociated to the phrase restrictions in the phrase, but in a spe-cial way. If the domain entities are structured in a hierarchy,the invoked entities in the template may employ some super-type of the phrase restrictions’ entities linked to the phrase.This way, several phrase restrictions in the phrase could applyto the same gap. Besides, each entity in the template may havesome constraints specified for the phrase, reducing the numberof possible phrase restrictions applicable for each gap in thetemplate.Case. This class represents a complex template. A case is com-posed by a communicative objective and a set of orderedphrases referenced in a text template. This way, cases areabstract sentences like templates which gather together someentities, the text that describes them, and the intentionality ofthe phrase.

Part of the macro-planning stage, like selecting the text struc-ture, is contained in the cases because they have the possible struc-tures of the text. Micro-planning and surface realization tasks arecarried out by means of the adaptation of the template of the caseto the final text: selecting the adequate words to describe the re-quired entities is implemented with the words associated to theentities by means of the phrase restrictions, the aggregation taskis executed by means of multi-phrase case and using referentialwords like pronouns is achieved by means of the text templatesof the cases when its structure allows it. In order to understandbetter how these types are employed, we are going to arrangethe conversations in Table 1 using these types. For the sake of clar-ity, we are going to show only three phrases that will be later em-ployed in cases:

� The phrase PhraseStrongPainInLocs is extracted from the sen-tence ‘‘I’ve got a strong headache on the left side’’ and containsthe following text template ‘‘I’ve got a #Intensity# #Loca-tion##Symptom# on the #Location#’’. The words: ‘‘strong’’,‘‘head’’, ‘‘ache’’, ‘‘left side’’ are replaced with references tophrase restrictions linked to the phrase. These phrase restric-tions are associated to the domain entities Intensity, Location,and Symptom, those with the name between the ’#’ characters.These entities in the phrase have got ad hoc constraints specify-ing the eligibility of only phrase restrictions linked to the phrasethat matches with them. These constraints are for the first andthe second Location entities in the template. The first has got a‘‘jointloc = true’’ and the second a ‘‘dir = left’’ predicate, like the

ones created for the phrase restrictions of the ‘‘head’’ and ‘‘leftside’’ expressions (see Table 2). The phrase also has got a refer-ence to the communicative action ‘‘Answer’’.� The phrase PhraseFS2L is extracted from the sentence ‘‘some-

times my hands and tongue became numb’’. Like the previoussentence, it has a reference to a communicative action‘‘Answer’’, the template ‘‘#Frequency# my #Location# and#Location# became #Symptom#’’ and the phrase restrictionsthat are built by ‘‘sometimes’’, ‘‘hands’’, ‘‘tongue’’, ‘‘numb’’ andreferenced in this template by those entities.� The phrase PhraseSuggestDisease comes from ‘‘I think I have a

cold’’. It has the same communicative action as the two previousphrases, the template ‘‘I think I have #Symptom#’’ and the cor-responding phrase restrictions.

These phrases are employed in the cases (see Table 3) whichcombine the lexical, semantic, and pragmatic levels which at theend are the communicative repertory of the conversational agent.Now, we are going to show how these cases and ontology are em-ployed in the stages of a CBR process (indexation, retrieving, andadaptation) to generate natural language sentences for a conversa-tion. For each stage, first, we describe the generic process andafterwards we will show the process application with the extractedcases.

2.1. Case indexation

The cases are indexed by:

1. The communicative objective referenced by the case.2. The number of phrases in the case.

The indexation process uses the communicative action for thecases with only one phrase as an additional index following thisalgorithm. A trace of this process with the cases in Table 3 is shownin Fig. 1:

(a) Group the cases by their objective.(b) If a group has more than two cases, regroup these cases by

the number of phrases.(c) Regroup one phrase cases into subgroups that share the

same actions.

Phrases in each case are also indexed by the entities invoked inthe template of the phrase. For each of these entities, the phraserestrictions linked to the phrase with child entities make a group.In the phrase PhraseStrongPainInLocs, the group for the invokedentity Location would contain the phrase restrictions created for‘‘head’’ and ‘‘left side’’, because both are children of Location.

2.2. Case retrieving

The input of the algorithm is a ‘‘semantic answer’’. It consists ina communicative objective and some communicative actions. Theactions have got some domain entities specifying the content ofthe action (see Fig. 2). This structure represents what the conversa-tional agent conceptually wants to say.

The process retrieves the set of cases with the same communi-cative objective as the semantic answer. From this set, it retrievesthe subsets with the same number of phrases as the objective’s ac-tions, so if our present objective has two actions, the set wouldcontain cases with two phrases. If there is no case with the re-quired number of phrases, the algorithm starts with the set of caseswith the largest number of phrases less than the number of actions(see Fig. 3).

Table 1Conversation examples.

Conversation 1 Conversation 2

Doctor: Hello Mr. Robinson, come in and sit down please. Doctor: Hello, how are you?Patient: Hello doctor. Patient: Hello, doctor. I think I have caught a cold.Doctor: What’s the matter? Doctor: Have you got a sore throat?Patient: I’ve got a strong headache on the left side and sometimes my

tongue and hands become numb.Patient: Yes, a little, but only when I cough.

Doctor: How long have you been feeling this pain? Doctor: When did you start to feel these symptoms?Patient: For the last two weeks. Patient: I started feeling them three days ago.Doctor: Have you got a temperature? Doctor: Do you feel something more, like vomits, sickness, or anything else?Patient: No, I haven’t. Patient: Well, I have a congestion.Doctor: Did you feel your hands inflamed? Doctor: Ok, don’t worry. You only have to rest, and take this nose drops for your

congestion, three drops every eight hours.Patient: No I didn’t, but sometimes my left eye gets inflamed. Patient: Thanks.Doctor: Ok, I see. . ., take this for four days and if the pain and inflammation

doesn’t go down come again.Patient: Thank you very much, doctor.

Table 2Phrase restrictions and its lexical terms.

PhraseStrongPainInLocs PhraseFS2L

Intensity: intensity >70 ? ‘‘strong’’ Frequency ? ‘‘sometimes’’Location: dir = left ? ‘‘left side’’ Hands ? ‘‘hands’’Head: jointloc = true ? ‘‘head’’ Tongue ? ‘‘tongue’’Pain ? ‘‘ache’’ Numbness ? ‘‘numb’’

V. López Salazar et al. / Expert Systems with Applications 39 (2012) 7330–7337 7333

At this moment, the process tries to match the action and theentities associated to each phrase restriction in the cases’ phrasewith the action and their entities in the semantic answer. If everyset of phrase restrictions in a phrase matches an action’s entityand every phrase in the case matches a different action in the presentsemantic answer’s objective, then, the case is selected (see Table 4).

When all the cases of the set are tested, one of the selected casesis randomly retrieved and the matched entities and actions aredeleted from the semantic answer. This process starts over untilall the entities and actions have been employed to retrieve a set ofcases or until there are no actions which can be matched to any case.

2.3. Case adaptation

Once the cases have been retrieved with the restrictions theymet, they go through an adaptation process. This process ‘‘fillsthe gaps’’ of each template of the phrases with the concrete phraserestrictions that met the action’s entities of the semantic answer(Table 4). The final eligible phrase restrictions to fill the templateare those which met the constraints of the entities in the template.If there are any matches in the constraints of the template’s

Table 3Cases extracted from the conversations in Table 2.

CaseMotive1

Utterance ‘‘I’ve got a strong headache on the left side and sometimes my heaTemplate ‘‘#PhraseStrongPainInLoc# and #PhraseFS2L#’’Objective GiveInformation

CaseD

Utterance ‘‘I started feeling this three days ago’’Template ‘‘#PhraseDurationStart#’’Objetive GiveInformation

CaseCompNeg

Utterance ‘‘No, I didn’t, but sometimes my left eye gets inflamed’’Template ‘‘#PhraseNeg#, #PhraseFreqSymptonInLoc#’’Objetive GiveInformation

entities and those of the phrase restrictions, then the words inthe matched phrase restrictions are used to replace the corre-sponding entity in the template. This process goes on until thereis not any case to adapt.

So the process takes the first case in the list CaseMotive1, andextracts its template, ‘‘#PhraseStrongPainInLoc# and #Phrase-FS2L#’’, then checks the instances of a phrase contained in the tem-plate and again takes their templates: ‘‘I’ve got a #Intensity##Location##Symptom# on the #Location#’’ and ‘‘#Frequency#my #Location# and #Location# become #Symptom#’’. Now, theprocess gets the corresponding phrase restrictions’ lexical itemand replaces the entities in the template: ‘‘(I’ve got a strong head-ache on the left side) and (sometimes my hands and tongue be-come numb)’’. This process is repeated for the other cases on thelist, CaseDisease, resulting in ‘‘I think I have a cold’’. The final an-swer of the agent, joining the two answers is ‘‘I’ve got a strongheadache on the left side and sometimes my hands and tongue be-come numb. I think I have a cold’’.

3. Results and discussion

Testing the CBR-NLG has been tackled in the context of anEuropean Project, the Multilingual Virtual Simulated Patient(MVSP). This project is an ECA simulating a patient in the contextof a doctor–patient appointment (Lopez, Eisman, & Castro, 2008).The agent takes some sentences in a natural language input bythe user and builds a semantic answer that contains referencesto entities in a domain of diseases and human body locations. Be-sides the Spanish language that we initially employed to test themodel, partners from 6 different European countries have popu-lated the database of cases with their own linguistic knowledge,i.e. English, German, Italian, Hungarian, Bulgarian and Portuguese.

CaseDisease

d and tongue become numb’’ ‘‘I think I have caught a cold’’‘‘#PhraseSuggestDisease#’’GiveInformation

CaseHaveS

‘‘Well, I have a congestion’’‘‘Well, #PhraseHaveSympton#’’GiveInformation

CaseThanks

‘‘Thank you very much, doctor’’, ‘‘Thanks’’‘‘#PhraseThanks#’’Bye

(a) (b)

(c)Fig. 1. Case indexation stage.

Fig. 2. A semantic answer.

7334 V. López Salazar et al. / Expert Systems with Applications 39 (2012) 7330–7337

It is worth mentioning that, although partners can be consideredexperts in their own language because they are native, none ofthem were linguists and they do not have any specific educationin computational grammars or any other computational linguisticformalism. Their task was to create the dialogue for the patientusing the sentences that they believed would be more appropriateand naturally employed in each foreseen situation in the context ofa dialogue between a doctor and their patients. The situations, ordialogue states as we call them, that are actually taken into ac-

count in this ECA are introduction, that comprises introductory sen-tences, i.e. when the patient initially meets the doctor, information,comprising the sentences that the patient may say during the clin-ical interview when answering the doctor’s questions, error, thatcomprises sentences that the patient may say in case of a interpre-tation error of the user’s input, and farewell, that are the sentencesthat a patient may say when the appointment is over. The most dif-ficult dialogue state to characterize is the information state, but ina typical appointment, the dialogue is centered around the

Fig. 3. Retrieving a set of cases to match the semantic answer.

Table 4Selecting the semantic restrictions of phrase matching the semantic answer.

Case Phrase SemanticAnswer

CaseMotive1 PhraseStrongPainInLocs ans2Intensity High Intensity HighFrequency null Frequency nullSymptom Pain Symptom PainDuration null Duration nullLocalization Head Localization HeadLocalization LeftSide Localization LeftSide

PhraseFS2L ans1Intensity null Intensity nullFrequency sometimes Frequency sometimesSymptom Numbness Symptom NumbnessDuration null Duration nullLocalization Hands, Left Localization HandsLocalization Tongue, Eye Localization Tongue

V. López Salazar et al. / Expert Systems with Applications 39 (2012) 7330–7337 7335

symptoms that the patient feels or shows, working as a question–answer dialogue in which the doctor makes some question about asymptom and the patient answers it. So in our ECA, the language

Fig. 4. A phrase in the engl

generated by the partners for the patient in this state is limitedto describe this feelings for each of the symptoms, locations, andproperties, like intensity, frequency, and duration, defined in thedomain.

An editor was developed to help the partners to introduce thelinguistic knowledge into the case base (Fig. 4). It has got specifictabs for paragraphs (cases), phrases, and phrase restrictions, i.e.symptoms, locations, intensities, frequencies, and durations. Theseare the domain’s entities associated with the phrase restrictions.The last tab is free text that is a category for general comments thata patient may say in a given moment of the conversation. It isworth mentioning that few cases with more than one phrase wereintroduced in the case base due to time project limitations and tothe fact that the conducted tests were carried out with thisdatabase. The outcome of the CBR-NLG module employing thislinguistic knowledge in each one of these 7 different languagescan be checked at the URL http://ic2.ugr.es/mvsptest. This URL pro-vides a link to an interface to the MVSP that is employed just to testthe CBR-NLG in a given language. In this interface, the questionsare posed to the patient directly in a semantic way, selecting inthe list-boxes at the bottom of the interface a symptom, a location

ish partner’s database.

Fig. 5. MVSP’s testing interface.

7336 V. López Salazar et al. / Expert Systems with Applications 39 (2012) 7330–7337

(whether the symptom has any), and a property like intensity, fre-quency, or duration. So the question, if a property and location areselected, would ask about the intensity, duration, or frequency of asymptom in some location. Fig. 5 shows the look and fell of thisinterface.

Each partner conducted a piloting session with a complete inter-face to the virtual patient, making questions in natural language inits own language. The individuals who made the interviews to thepatients in these sessions were primarily first or second year col-lege students in medicine. They were settled in a testing environ-ment consisting of a PC running a virtual patient suffering fromHorton’s migraine, although the students did not know this. Thetask was a 10 min clinical interview with the virtual patient, posingquestions in natural language to figure out by the answers receivedwhat the disease was. After the test, they had to fill out a question-naire about several aspects of the MVSP, as how were their feelingsabout the interaction with the patient, the visual aspect, the qualityof the employed language and other aspects. As regards thelanguage generation, they were asked to rate from 0 to 5 the

Fig. 6. Results for the

aspects of credibility, naturalness, and realism. The averagedresults for each aspect and language are shown in Fig. 6.

The development of a framework to avoid the use of specific ex-pert linguistic knowledge or grammars formalisms to make theframework more usable is not an easy problem. The results of thisstudy show that the CBR-NLG methodology can be employed togenerate natural language for situated dialogues in several lan-guages with an acceptable to good naturalness, credibility, andrealism without using these formalisms. In spite of this, the qualityof the results in our method is directly linked to the linguisticknowledge created for each situation. In the German case, someof the testers commented when asked about their scoring thatsometimes the patient was giving too much or too little informa-tion in one turn or that the answers given by the virtual patient,although grammatically correct and possible, were odd in theposed situations. This is not a problem of the generation model it-self, because the adopted approach is incremental and allows theimprovement of the results just introducing more cases. Moreover,

conducted tests.

V. López Salazar et al. / Expert Systems with Applications 39 (2012) 7330–7337 7337

the majority of the cases introduced by the partners were onephrase cases with no complex sentences.

4. Conclusions

We have shown a case based reasoning technique to carry out thenatural language generation process which is easily extensible andadaptable to many languages and problem domains and produces anatural outcome in the context of a conversational agent that main-tains a dialogue. When the conversational system creates a semanticanswer, it is used by the CBR system as input to retrieve and adapt anappropriate set of cases generating the final natural language answer.This allows a conversational agent to generate natural language forany language in a dialogue situation and does not require a deepunderstanding of grammar or any linguistic theory.

Acknowledgments

We would like to acknowledge the financial support of Conse-jería de Innovación, Ciencia y Empresa of the Junta de Andalucía(TIC 1424), and the Spanish government (TIN2007-67984). TheMVSPP is financed by the European Union inside the TransversalProgramme KA3-ICT: Lifelong Learning Programme, Call for Pro-posals 2008 (EAC-30/07), Reference: 143423-2008-LLP-ES-KA3-KA3MP from January 2009 to December 2010.

References

Allen, J. F., Schubert, L. K., Ferguson, G., Heeman, P., Hwang, C. H., Kato, T., et al.(1995). The trains project – A case-study in building a conversational planningagent. Journal of Experimental and Theoretical Artificial Intelligence, 7, 7–48.

Bateman, J., & Zock, M. (2003). Natural language generation. The Oxford Handbookof Computational Linguistics.

Gervas, P., Diaz-Agudo, B., Peinado, F., & Hervas, R. (2005). Story plot generationbased on cbr. Knowledge-Based Systems, 18, 235–242.

Graesser, A. C., Chipman, P., Haynes, B. C., & Olney, A. (2005). Autotutor: Anintelligent tutoring system with mixed-initiative dialogue. IEEE Transactions onEducation, 48, 612–618.

Kimura, M., & Kitamura, Y. (2006). Embodied conversational agent based onsemantic web. In Z. Z. Shi & R. Sadananda (Eds.), Agent Computing and Multi-Agent Systems. Lecture Notes in Artificial Intelligence (vol. 4088, pp. 734–741).Berlin: Springer-Verlag Berlin.

Kopp, S., Gesellensetter, L., Kramer, N. C., & Wachsmuth, L. (2005). A conversationalagent as museum guide – design and evaluation of a real-world application. InPanayiotopoulos, T., Gratch, J., Aylett, R., Ballin, D., Olivier, P., & Rist T., (Eds.),Intelligent Virtual Agents, Proceedings. Lecture Notes in Artificial Intelligence. 5thInternational working conference on intelligent virtual agents September 12–14,Kos, Greece (Vol. 3661, pp. 329–343).

Lim, S., & Cho, S.B. (2005). Language generation for conversational agent byevolution of plan trees with genetic programming. In Torra, V., Narukawa, Y., &Miyamoto S., (Eds.), Modeling decisions for artificial intelligence proceedings,Lecture Notes in Artificial Intelligence (Vol. 3558, pp. 305–315).

López Salazar, V., Eisman, E. M., & Castro, J. L. (2008). A tool for training primaryhealth care medical students: The virtual simulated patient. In 20th IEEEinternational conference on tools with artificial intelligence proceedings (Vol. 2, pp.194–201).

Mairesse, F., & Walker, M. (2010). Towards personality-based user adaptation:psychologically informed stylistic language generation. User Modeling and User-Adapted Interaction, 20, 227–278.

Mann, W., & Thompson, S. A. (2005). Rhetorical structure theory: Toward afunctional theory of text organization. Text, 8(3), 8, 243–28.

Rehm, M., & Wissner, M., 2005. Gamble – A multiuser game with an embodiedconversational agent. In F. Kishino, Y. Kitamura, H. Kato, & N. Nagata (Eds.),Entertainment computing – Icec 2005, Lecture Notes in Computer Science. 4thinternational conference on entertainment computing (ICEC 2005) September 16–21, 2005 Sanda, Japan (Vol. 3711, pp. 180–191).

Reiter, H., & R., D. (1997). Building applied natural language generation systems.Natural Language Engineering, 3 (1), (pp. 57–87).

Paiva, D. S. (1998). A survey of applied natural language generation systems.Information Technology Research Institute Report Series, 98.

Searle, J. R. (1969). Speech acts: an essay in the philosophy of language. CambridgeUniversity Press.

Stent, A. J. (2002). A conversation acts model for generating spoken dialoguecontributions. Computer Speech and Language, 16, 313–352.

Wallace, R. (2000). http://www.pandorabots.com/pandora/pics/wallaceaiml tutorial.html.

Weizenbaum, J. (1966). Eliza – A computer program for study of natural languagecommunication between man and machine. Communications of the Acm, 9,36–45.


Recommended