**6. Results**

14 Will-be-set-by-IN-TECH

EHeBby: Marriage is an expensive way of getting your laundry done

EHeBby: Benjamin Franklin said "'Keep your eyes wide open before

Alice: The state of being married; relation between husband and wife;

The following dialogue shows a comparison between the answers given with the traditional pattern matching by the chat-bot Alice and the answers given by the evocative chat-bot using

EHeBby: Love may be blind but marriage is a real eye-opener.

EHeBby: Everybody is ignorant, only on different subjects

Alice: I think you already know the answer. I will search for it. EHeBby: Men always want to be a woman's first love. Women have a more

EHeBby: What do Windows and a handgun have in common? Both are

opportunities and an optimist is one who makes opportunities of his difficulties. (Harry Truman)

The humorous chatbot is able to update its own sub-symbolic knowledge through a targeting process, which maps new acquired riddles in the semantic space. Targeting is obtained by means of the ad-hoc created AIML tag *addRiddle*, as shown in the following chunk of AIML

EHeBby: A pessimist is one who makes difficulties of his

subtle instinct; what they like to be is a man's last romance.

User: what is the difference between woman and men?

EHeBby: I only work to enjoy when I am not working User: My computer has the windows operating system.

</template> < /category>

If the user question is:

for free.

While the standard Alice chat-bot answers:

Alice: We can learn new things.

EHeBby: Tomorrow is a mistery... User: Do you enjoy working?

Alice: Where did he get it?

**5.4 AIML categories for targeting**

code:

Alice: I enjoy working 24 hours every day.

harmless while not loaded. User:Are you a pessimist or an optimist? Alice: Am I a pessimist or an optimist? Yes.

married life.

the <relatedSentence> tag.

User: You are ignorant.

User: See you tomorrow.

Alice: Goodbye.

User: What do you think about marriage?

The chat-bot will answer randomically in one of the following ways:

marriage, half shut afterwards"'.

In order to validate the humor recognition, two appropriate data set have been created. The former, called *DataSet1*, is composed of 100 humorous phrases extracted by ad-hoc selected web sites, characterized by the presence of a percentual of humoristic features, as shown in table 1.


Table 1. Humoristic Features Distribution in DataSet1

The latter, called *DataSet2*, is composed of 200 phrases, equally distributed between humorous and non-humorous sentences, where the non-humorous examples are always extracted from Internet and chosen among titles of newspapers, proverbs and sets definitions. The implemented algorithms well performed in humor recongition, as shown in table 2.


Table 2. Humor Recognition in the analyzed DataSets

The results can be considered satisfactory. Moreover if with the humor recognition area cannot identify the humorous level of sentences written by the user, the dialogue can continue in a funny way. In fact, the chatbot exploits the semantic space, which allows retrieving amusing sentences so that the dialogue can continue in a funny manner.

The following results show a set of funny answers extracted by the chatbot exploiting the semantic space, and their semantic closeness to the user entry, compared to the answers given by standard Alice chatbot: Example 1:

```
User: What do you think about chocolate?
Alice: Cocoa flavoring used in a variety of food products.
EHeBby:
```
a Humoristic Chatbot 17

An Emotional Talking Head for a Humoristic Chatbot 335

states so we plan to investigate these models using compositions of our current emotion database visemes. Finally, also web technology is going along with emotions management, and new standards like the W3C EmotionML emotionML (2011) are going to be released. In consideration of this, we plan to modify our AIML extensions towards these standards in

Abbattista F, Catucci G, Semeraro G, Zambetta F. SAMIR: A Smart 3D Assistant on the Web.

F. Agostaro, A. Augello, G. Pilato, G. Vassallo, S. Gaglio. A Conversational Agent Based

Francesco Agostaro. Metriche per l'Analisi della Semantica Latente finalizzata ai Modelli

Cassell J, Vilhjálmsson H H, Bickmore T. BEAT: the Behavior Expression Animation Toolkit.

Cohen, M. M., and Massaro, D. W. (1993) Modeling coarticulation in synthetic visual speech.

Cosi P., Tesser F., Gretter R., Avesani C. (2001). FESTIVAL Speaks Italian. In Proceedings Eurospeech 2001, Aalborg, Denmark, September 3-7 2001 (pp. 509-512) Cosi P., Fusaro A., Tisato G. (2003). LUCIA a New Italian Talking-Head Based on a Modified

Heylen Dirk. (2003)Talking Head Says Cheese! Humor as an impetus for Embodied

Dumais Susan T. Thomas K. Landauer (1997). A Solution to Plato's Problem: The Latent

Pawel Dybala, Michal Ptaszynski, Jacek Maciejewski, Mizuki Takahashi, Rafal Rzepka

Ekman, P., Basic Emotions, in Dalgleish, T., Power, M., Handbook of Cognition and Emotion,

G, Fisher C. Confusions among visually perceived consonants. Journal of Speech and Hearing

Environments 2 (2010) 31-48. DOI 10.3233/AIS-2010-0053. IOS Press Ekman, P., and Friesen, W. V (1969). The repertoire of nonverbal behavior: Categories, origins,

Singular Inversions Inc., (2010) FaceGen Modeller: www.facegen.com/modeller.htm

on a Conceptual Interpretation of a Data Driven Semantic Space. Lecture Notes in Artificial Intelligence, Springer-Verlag GmbH, vol. 3673/2005, pp 381-392, ISSN:

del Linguaggio. PhD thesis, Università degli Studi di Palermo. Dipartimento di

s.l. : Proceedings of the 28th annual conference on Computer graphics and interactive

In N. M. Thalmann and D. Thalmann (Eds.) Models and Techniques in Computer

Cohen-Massaro's Labial Coarticulation Model. In Proceedings of Eurospeech 2003,

Conversational Agent Research. CHI-2003 WorkShop: Humor Modeling In the

Semantic Analysis Theory of the Acquisition, Induction, and Representation of

and Kenji Araki. Multiagent system for joke generation: Humor and emotions combined in humanagent conversation. Journal of Ambient Intelligence and Smart

order to enable interoperability with other emotion-oriented web systems.

Ingegneria Informatica, 2006. Supervisor: Prof. S. Gaglio.

techniques (2001), pp. 477-486. doi:10.1145/383259.383315 CMU Dictionary: (2010) http://www.speech.cs.cmu.edu/cgi-bin/cmudict

Geneva, Switzerland, September 1-4, 2003 (pp. 2269-2272).

Psychnology Journal, 2(1):43-60, 2004.

Animation. pp 139-156. Springer-Verlag.

Knowledge. Psychological Review, 104(2)

usage, and coding. Semiotica, 1, 49Ð98.

Sussex, UK: John Wiley and Sons, (1999) http://www.w3.org/TR/2011/WD-emotionml-20110407/

espeak.sourceforge.net/download.html

Research, 11(4):796-804.

**8. References**

0302-9743.

Alice website: www.alicebot.org

Interface.

0.94 A quarter-ounce of chocolate = four pounds of fat. (Slick's Second Universe Law) 0.82 Equal amounts of dark chocolate and white chocolate, is a balanced diet. User: What can you say about children? Alice: I will think about it and get back to you. EHeBby: 0.68 Praise your children openly, reprove them secretly. (W. Cecil) 0.68 When speaking to your children: say what you mean, mean what you say,mbut don't be mean when you say it. User: What do you think of life? Alice: Life is the opposite of death. EHeBby: 0.987 Life is an echo. 0.986 Life is a roller coaster. User: Have you ever seen Santa Claus? Alice: No I haven't. EHeBby: 0.983 The Bermuda Triangle got tired of warm weather. It moved to Finland. Now Santa Claus is missing. 0.746 There are 4 Santa Claus stages:1) When you believe in Santa. 2) When you donŠt believe in Santa.3) When you are Santa. 4) When you look like Santa.ve not seen it. What's it like?

#### **7. Conclusion**

A complete framework for an emotional talking head able to manage humor while conversing with the user has been presented along with its implementation. The whole architecture relies on a suitable AIML-based chatbot, and an animation engine for the talking head.

The chatbot reasoner module is based on an extended AIML architecture where both humor, and emotions can be dealt with using suitable tags. A computational humor engine is able both to detect and to generate humorous sentences. Humor detection relies on the presence of alliteration, antinomy, or adult slang in the user's utterances, which are searched for using suitable thesauri like CMU and WordNet. Generation of humor makes use of a LSA based semantic space where humorous sentences have been placed along with the conversation topics.

The system can also select the control parameters for the animation engine, regarding the mesh deformation due to the emotive state to be expressed, the prosody for controlling speech generation, and the coarticulation model that is used to morph a set of key visemes related to phonemes.

The whole system has been tested on the humor recognition task with satisfactory results. However, our system is currently under development and much work has to be done in order to improve the whole architecture. Humor recognition algorithms can be enhanced, in order to capture different grades of humor, and to fully exploit the different levels of intensity in Talking Head emotional expressions.

The emotion database has to be completed al least with all the six Ekman basic emotions. Moreover, the most recent emotion models Ekman (1999) use more than six basis emotional states so we plan to investigate these models using compositions of our current emotion database visemes. Finally, also web technology is going along with emotions management, and new standards like the W3C EmotionML emotionML (2011) are going to be released. In consideration of this, we plan to modify our AIML extensions towards these standards in order to enable interoperability with other emotion-oriented web systems.
