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 desperately 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.
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 text- based emotion to predict and classify the emotion types, such as [
This paper presents a new technique based on Dominant Meaning Technique [
Appraisal is a linguistic theory that tries to model language’s capability to definite opinions and attitudes within text [
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 [
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.
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 [
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 construct 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
To represent the proposed approach to classify sentiment, suppose that the collection consists of
In this definition, each emotion is represented by a finite set of examples
Each example is represented by a fixed set of words
The
Our goal is to choose the top-
・ Calculate the values of
・ Suppose that
・ Calculate the maximum value of
・ Calculate the maximum value of
where
・ Choose
・ Finally, consider the dominant meaning probability
・
Therefore, we divide
The proposed system creates sevens models one for each emotion: joy, fear, anger, sadness, disgust, shame, and guilt.
For each emotion
After applying formulas, we get a set of dominant meanings each word in the set has
We rank the terms of collection
Therefore, we select the top-N values of
Accordingly, we can create seven models to represent the emotion. Each model is a set called emotion dominant meaning models
The corresponding word set of
For a new example
where
The emotion detection algorithm returns the emotion
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.
The dataset uses ISEAR dataset [
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
Emotion | No. of Examples |
---|---|
Anger | 1096 |
Disgust | 1096 |
Fear | 1095 |
Sadness | 1096 |
Shame | 1096 |
Joy | 1094 |
Guilt | 1093 |
Total examples | 7666 |
Emotion | No. of Examples |
---|---|
Anger | 658 |
Disgust | 658 |
Fear | 657 |
Sadness | 658 |
Shame | 658 |
Joy | 656 |
Guilt | 656 |
Total examples | 4601 |
disgust, fear, sadness, shame, joy, and guilt.
Stop words were removed in all examples for examples: for, an, the, a, an, 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
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
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 [
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
The precision and recall of our proposed approach shows a considerable performance comparing to those in related works.
In his classification he found that using SVM produced better results for sadness (F1 = 0.733) which is better than our approach for sadness (F1 = 0.67). In contrast, our approach has better results in others classes such as anger (F1 = 0.66), disgust (F1 = 0.47), fear (F1 = 0.56), shame (F1 = 0.55), joy (F1 = 0.58), and guilt (F1 = 0.50). Where Balahur results were for anger (F1 = 0.38), disgust
(F1 = 0.264), fear (F1 = 0.49), shame (F1 = 0.43), joy (F1 = 0.46), and guilt (F1 = 0.42).
Danisman and Alpkocak [
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. [
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. [
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
Emotion | Precision | Recall | ||
---|---|---|---|---|
Our method | Balahur | Our method | Balahur | |
Anger | 20.2 | 0.353 | 52.1 | 0.414 |
Disgust | 22.4 | 0.292 | 46.9 | 0.241 |
Fear | 26.2 | 0.482 | 55.7 | 0.491 |
Guilt | 20.3 | 0.462 | 51.9 | 0.386 |
Joy | 26.6 | 0.439 | 50.6 | 0.474 |
Sadness | 27.2 | 0.707 | 60.2 | 0.76 |
Shame | 20.2 | 0.441 | 48.9 | 0.412 |
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 [
Razek, M.A. and Frasson, C. (2017) Text-Based Intelligent Learning Emotion System. Journal of Intelligent Learning Systems and Applications, 9, 17-26. https://doi.org/10.4236/jilsa.2017.91002