Text-Based Intelligent Learning Emotion System

Nowadays, millions of users use many social media systems every day. These services produce massive messages, which play a vital role in the social networking paradigm. As we see, an intelligent learning emotion system is des-perately needed for detecting emotion among these messages. This system could be suitable in understanding users’ feelings towards particular discussion. This paper proposes a text-based emotion recognition approach that uses personal text data to recognize user’s current emotion. The proposed approach applies Dominant Meaning Technique to recognize user’s emotion. The paper reports promising experiential results on the tested dataset based on the proposed algorithm.


Introduction
In collaborative chatting between users, emotions are an important aspect.The detection of the exchange of emotions among users through text messages can help for delivering right emotion in the right time.Several researches used textbased emotion to predict and classify the emotion types, such as [1] [2] [3] and [4].Jraidi et al. [5] show the impact of using emotion in intelligent system and show how these emotions oriented toward developing emotionally sensitive tutors.nant meanings definition is known as "the set of keywords that best fit an intended meaning of a target word" [6].This technique sees the target meaning as a master word.Some slave words are to be added to the master to clarify the target meaning.For example, a word bank has several meaning, 1) a financial bank with slaves' words such as statement, loan, and rate, 2) blood bank with slaves such as medical, transfusion, and human body, 3) river bank with slaves such as land, lake, and edge.
Appraisal is a linguistic theory that tries to model language's capability to definite opinions and attitudes within text [7].The appraisal method contains three distinct aspects: Attitude, Engagement, and Graduation.In this paper, we adopt attitudes in its classification.Attitudes are separated into three categories: Affect, Judgment, and Appreciation.Attitude is defined as a mode that anyone acts in a specific condition and shows how he feels [8].These aspects embody the capability to express emotional, moral, and aesthetic feelings respectively [9].
For example, "when I was in grade 11 in the school, I was punished for no serious mistake of mine" another sentence "when I was in grade 11 in the school, I got an award for my excellence".Using the dominant meaning methods, the words "punish, and mistake" lead the first sentences to a negative emotion, however, the words "award and excellence" classify the second sentences to a positive emotion.
Detecting emotion from text is useful in understanding users' feelings towards particular discussion in intelligent learning system.To test our algorithm, we use ISEAR (International Survey on Emotion Antecedents and Reactions), dataset collected by Klaus R. Scherer and Harald Wallbott [9].ISEAR dataset contains seven major emotions: joy, fear, anger, sadness, disgust, shame, and guilt.The process to classify sentences in this work involves two main steps: representing 40% of dataset to allow learning, extract features based on appraisal method, create dominant meaning hierarchy, train a classifier on prepared examples, and then using the classifier to predict a category.The remainder of this paper is organized as follows.Section 2 presents the methodology to detect the emotion and how to construct dominant meaning tree.Section 3 describes experiments and discusses the results.Finally, Section 4 summarizes the conclusion.

Emotion Detection Methodology
The architecture of the proposed system contains two stages: training stage, and classification stage.The training stage happens on the server side.We apply the dominant meaning methods [6] on the ISEAR dataset [9] to form the hierarchy tree.Based on the ISEAR, the tree consists of seven concepts: joy, fear, anger, sadness, disgust, shame, and guilt.
The classifier unit receives two types of information.A hierarchy tree for dominant meaning for seven classes and ISEAR examples.The classifier in general uses a large amount of labeled training data for text classification, which is a labor-intensive and time-consuming task.In contrast, our approach is to con-struct the dominant meaning tree and then use this tree to classify incoming examples from Emotion Models unit.This unit contains two types of set of words.First, set coming from Emotion Agent, which extract some features from Chatting GUI unit during the chatting between users, remove stop words, and reformulate in the way Emotion unit can deal with it.Stop words are those that occur commonly but are too general-such as "the", "an", "a", "to", etc.The algorithm removed the stop words from the collection.Emotion agent use Emotion Algorithm to assign an emotion for each set of features based on the emotion models coming from emotion models unit.After determining the emotion, Emotion Expression assigns a suitable expression for it and sends it to be shown in the Chatting GUI (see Figure 1).

Constructing Emotion Dominant Meaning Tree
To represent the proposed approach to classify sentiment, suppose that the collection consists of m emotion, i.e.
Given the limited set of examples for each emotion, we try to represent the collection as a hierarchy of dominant meanings.
In this definition, each emotion is represented by a finite set of examples The challenge is how to determine those words.
Each example is represented by a fixed set of words Our goal is to choose the top-T words, which can represent the dominant meanings of emotion k ζ .To do that, we proceed as follows.Suppose that word k c w symbolizes emotion k ζ .
• Calculate the values of • Suppose that kv β is the frequency of emotion k ζ , which appears in exam- • Calculate the maximum value of ,

Constructing Emotion Dominant Meaning Models
The proposed system creates sevens models one for each emotion: joy, fear, anger, sadness, disgust, shame, and guilt.
For each emotion k . For each collection, we apply the formula from (1) to (4).
After applying formulas, we get a set of dominant meanings each word in the set has ki P value for a word i w and in emotion k ζ .
We rank the terms of collection { }  , , , The corresponding word set of k Γ is represented as: , , , , , , l e e e ψ =  , l e represents a word in the new ex- ample.For each emotion, we compute the model value k Ω as flowing: ( ) , , , l e e e ψ =  . The algorithm uses Equation ( 6) to compute the model value for each emotion for the example ψ .Therefore, it calculates the highest value and then returns the index of this value.This index is used to determine the emotion.

Experiments and Results
This section presents two purposes.First purpose is used to build Emotion Dominant Meaning Tree.The second purpose is to test the accuracy of using this tree for detecting the emotion.

Data Sets
The dataset uses ISEAR dataset [9] that contains emotional statements.ISEAR contains 7666 sentences (as shown in Table 1).The dataset is collected from 1096 participants with different cultural background who completed questionnaires about seven emotions: anger, disgust, fear, sadness, shame, joy, and guilt.

Building Emotion Dominant Meaning Tree
Most of text classification methods use keyword-based methods with thesaurus.
In contrast, we use the dominant meaning methods as features to improve accuracy and refine the categories.To build the dominant meaning tree, we use 60% of ISEAR dataset for seven emotion categories (as shown in Table 2): anger, another, but, or, yet, so, towards, before, etc.
Based on the Equation ( 1) to ( 5), we can build the dominant meaning tree of seven emotion categories, as shown in Figure 2.
Each node contains one emotion.Each emotion is associated with top-N dominant meaning words based.The node between word and the emotion is labeled with its dominant meaning probability as shown in Figure 2. To determine N value, we have to conduct some experimentations with different N values to figure out which N reflects a considerable results.The following subsection presents the accuracy of the proposed method to classify emotion examples.

Detecting Algorithm Accuracy
The goal of the experiments is to measure the accuracy of the proposed algorithm to predict a single emotional label given an input sentence.We follow Cohen's Kappa [10] to measure the accuracies of the experiment.We use average precision, recall, and F-measure to measure the classification accuracy.
In this experiment, we use ISEAR dataset to figure out the performance of our proposed mechanism.We used a Java programing language to create a class file to implement Emotion Detection Algorithm.This program classified the tested data in one emotion.The results of precision and recall are shown in Figure 3.
The precision and recall of our proposed approach shows a considerable performance comparing to those in related works.
On the other hand, in order to test the performance of our proposed approach with alternative methods for emotion detection, we chose the work done by Balahur et al. [12], as shown in Table 3.
The results of 10-fold cross validation using Support vector machine to classify the whole set of 1081 examples initially chosen.We found that using dominant meaning classifier produced better results all categories than using the method of SVM in Balahur et al. [12], as shown in Figure 4 shows F1 measure for the results of Dominant meaning approach and 10-fold cross validation using SVM [12].As we see both our proposed approach and Balahur's approach have a similar function for drawing F1 measure.
We see that the top value for the graph for both approach recorded for "Sadness" class and the bottom value for the graph for both approach recorded for "Disgust" class.

Conclusion
Text-Based Emotion detection becomes an important research field with the massive chatting messages coming from social media systems.In this paper, we have proposed an approach to extract user's emotion based on messages who posts.We used a dominant meaning approach, which looks for the meaning of the word rather than the word itself.To do that, we proposed an architecture for   4. Comparison between the results of dominant meaning approach and 10-fold cross validation-using SVM (Balahur, 2011).
the proposed system to finish two tasks: training and classification.For training system, a hierarchy tree for dominant meaning for seven emotions ("joy, fear, anger, sadness, disgust, shame, and guilt") is built using ISEAR dataset.We create an algorithm called Emotion Detection Algorithm to classify and find the suitable emotion class based on the text.To experiment the proposed technique, we tested it on the ISEAR dataset, and compare our results with different results that were implemented by Alexandra Balahur [12] and Danisman and Alpkocak [11].We show that our system has the best results in precision, recall and F-measure.

.
The question now is how can we use those examples to construct dominant meanings of the corresponding emotion?In other words, those examples include some words that almost come with the corresponding emotion.

Figure 1 .
Figure 1.Architecture of the emotion detection system.

F
) Therefore, we divide k jv w by the maximum value k c of the frequency of k ζ , and then we normalize the results by dividing by the number of examples k r in collection k ζ .Based on formula (3), we clearly have according to formula (4).As a result, the dominant meanings of the emotion k ζ can be represented by the set of words that is corresponds to the set { } select the top-N values of kj P to form motion dominant meaning tree (EDMT).EDMT represents seven emotions suggested by (Klaus, 1994) as a tree.Each emotion is joined with a slave word.This slave is represent a dominant meaning and associated with the dominant meaning probability of that emotion as shown in Figure 2. In this paper we put the top-N of kj P values as an arbitrary value.

Figure 3 .
Figure 3. Precision and recall for dominant meanings.

Figure
Figure 4. Comparison between the results of dominant meaning approach and 10-fold cross validation-using SVM(Balahur, 2011).

Table 1 .
Characteristics of the ISEAR Dataset.

Table 2 .
Characteristics of dataset used to build tree.Stop words were removed in all examples for examples: for, an, the, a, an,

Table 3
ue for precision for two classes "Anger" with (20.2) and "Shame" with (20.2),Balahur's results produced a lower value for precision a class "Disgust" with 0.292.

Table 3 .
Characteristics of dataset used to build tree.