Detecting Emotion from Text and Emoticon

London Journal of Research in Computer Science and Technology
Volume | Issue | Compilation
Authored by Romana Rahman , Tajul Islam, Md. Humayan Ahmed
Classification: H.5.2
Keywords: emotion class, emotion database, proverbs, emoticon, human-computer interaction.
Language: English

Emotion detection from text and emoticon is related to the field of NLP (natural language processing). To detect emotion from text and emoticon, here we proposed some methodology. These methodologies solve the problem of detecting the emotion in the case of sentence level and emoticon. Our created method works based on keyword analysis (KA), keyword negation analysis (KNA), a set of proverbs, emoticon, short form of words, exclamatory word and so on. To find emotion we created 25 emotion classes. This analysis should generate a better result for detecting emotion from the text and emoticon. Our method should give 80% accuracy.

               

Detecting Emotion from Text and Emoticon

Tajul Islamα, Romana Rahman Emaσ & Md. Humayan Ahmedσ

____________________________________________

  1. ABSTRACT 

Emotion detection from text and emoticon is related to the field of NLP (natural language processing). To detect emotion from text and emoticon, here we proposed some methodology. These methodologies solve the problem of detecting the emotion in the case of sentence level and emoticon. Our created method works based on keyword analysis (KA), keyword negation analysis (KNA), a set of proverbs, emoticon, a short form of words, exclamatory word and so on. To find emotion we created 25 emotion classes. This analysis should generate a better result for detecting emotion from the text and emoticon. Our method should give 80% accuracy.

Keywords: emotion class, emotion database, proverbs, emoticon, human-computer interaction.

Author α σ: Dept. of Computer Science and Engineering (CSE) North Western University, Khulna, Bangladesh.

σ : Dept. of Computer Science and Engineering (CSE) Sheikh Fazilatunnesa Mujib University, Jamalpur, Bangladesh.

  1. INTRODUCTION 

Emotions are one kind of influence that is mainly generated by human thinking and internal activity [1]. It is also one kind of human nature [2]. Detecting emotions from text play a vital role in a human-computer interaction [3]. Emotions can help for making a decision and also process cognitive relationship [13].  

Mainly emotions are split into two kinds, i.e. positive emotions and negative emotions. Positive emotions are interest, laughter, happiness etc. Negative emotions are fear, anger, sadness and so on [13]. There are different ways to find emotion such as image, speech, facial expressions, textual data, emoticons etc. Among all types of approaches, textual data is important for researchers. Here, mainly we have discussed text analysis and emotion.

  1. Related WORK

Shiv N. et.al [1] described emotion detection from textual documents and blogs. They proposed two components: Emotion Detector, Emotion Ontology for finding emotion from the text.

Nadia A.et.al [5] proposed a framework that analyses text from emotion. Here they also worked with an emoticon. For finding emotion, they used DW(Data Warehouse) technique.

Abdul Hannan  [2] detected emotion from text using NLP (natural language processing).Here he described mainly two kinds of NLP methods .i.e. keywords or pattern matching technique and parsing technique.

Shadi S.et.al [17] describes emotion detection from text generated automatically rules. These rules are called emotion-recognition rule (ERR). These ERR extracts from a lot of training set. This training set classified by K-nearest neighbours (KNN), PMI (Mutual point information).

  1. METHODOLOGY

To determine emotion from the text, we propose some method based on keyword class. These keywords class contains similar types of keywords, emoticon, proverbs, short from an exclamatory sentence.  

Determine keyword class:

Emotion classes are determined by Basic emotions model (Ekman, Izard, Plutchik) and different psychological matter. Emotion class related keywords can be found from antonym and synonym.

4.1  Proverb match

In the proverb match method, we have fixed emotion class for proverbs based on sentence meaning of proverbs. At the last step, if proverb sentences exist then they give emotion. On the other hand, the emotion is not existed then goes to keyword class-based method for finding emotion.

Figure 1: Flowchart for detecting emotion from Proverbs                     

4.2  Keyword class-based method

In this method, we first took input sentence as input and the output is a name of emotion. The first step of this method is checking related keyword from the emotional database. If no related keywords found, it gave a simple message. On the other hand, if related keywords found then next step is negation check. At the last stage of all them go to the emotion class and give expected emotion.

Figure 2: Flowchart for finding emotion from keyword analysis

4.3  Emoticon and short tokenisation method

In the modern world, emoticon and short of play a vital role in expressing emotion in human language. Short form and emoticon are the shortest forms of expressing emotion. Here we mainly tokenize the word and spotting that it is short form or emoticon. After spotting that, it gives a suitable emotion class name.

We mainly collected these emoticons and short forms from different social media (Facebook, Twitter etc.)

Figure 3: Short Form or emoticon spotting technique

For finding emotion class, we have created almost 25 emotion class and 460 keywords that are related to emotion class. Moreover, we have also created emotion class for proverbs using sentence meaning, short form, emoticon, and exclamatory sentence related to emotion class. In below we are giving some examples.

Table 1: Some examples of emotion class and related keyword

Emotion Class

Related Keywords

Happy

Joyous, great, happiness, good, glad

Angry

Wild, furious, bad, hot, stormy

Sad

Sorry, tragic, depressed, unhappy, pensive

Disgust

Disturbed, annoying, suck, repel, offended

Excited

Amazement, wonder, astonished, surprise.

Helpless

Incapable, powerless, vulnerable

Confident

Captivated, attached, loving

Good

Peace, comfort

Negation checking keywords:

Rarely, seldom, not, nor, can’t, isn’t, aren’t, never, none etc. these type of 100 keywords are in my keywords database.

Table 2: Some examples of emotion class and related Proverbs

Emotion Class

Related Proverbs

Sad

Day of sorrow is longer than a month of joy; a constant guest is never welcome

Hurt

A burnt child dreads the fire

Angry

Hit the ceiling

Fear

Shaking like a leaf

Jealous

On pins and Needles

Advice

Cut your coat according to your cloth.

Table 3: Some examples of emotion  and related short from

Emotion Class

Short from

Sad

H8, is, plz, pls

Hurt

Ih8u

Happy

A lot, f9, yd

Angry

O&o, onna

confused

U2?

Advice

TC, g4u

Table 4: Some examples of emotion and related Emoticon

Emotion Class

Emoticon

Sad

:-(

Happy

;-D

Angry

:-E

Excited

^-^

Depressed

=p,:-p

Table 5: Some examples of emotion and related exclamatory sentence

Emotion

Related exclamatory keyword

Sad

Alas, oww

Excited

Boo, wow

Happy

Yahoo, hurrah, yay

Fear

Aah

Angry

Grrr

V.    PERFORMANCE RESULTS

We analysed many kinds of sentences for finding emotion from the text. For different kinds of sentences, we got a different kind of success rate based on our proposed methodologies. In case of calculating success rate, we have used the equation given below. We multiplied with hundred for finding percentage calculation:

Success rate= Number of correct sentence *100

Number of sentences given

Table 6:  Success rate finding

Number of Sentences

Number of Correct sentences

Success rate (%)

120

82

68

120

100

83

120

72

60

120

103

86

120

104

87

For understanding the relationship among the number of the input sentence, a number of the correct sentences given emotion and success rate, we have given a graphical representation below. We find almost 80% correct output using all of our methodologies.

Figure 4: Graph for showing relationship among number of the input sentence, number of the correct sentences given emotion and success rate(%).

  1. CONCLUSION AND FUTURE WORK

Detecting emotion is a vital field in case of human-computer interaction. In this paper, we proposed some methodologies to find emotion from text based on keyword class, negation checking, proverbs and so on. These methodologies work based on sentence level and emoticon. In future, we want to work with paragraph level and want to find a different methodology for solving this issue.  

REFERENCES

  1. Shiv Naresh Shivhare, Shakun Garg and Anitesh Mishra, “Emotion Finder: Detecting Emotion From Blogs and Textual Documents,” in International Conference on Computing, Communication and Automation (ICCCA 2015).
  2. Abdul Hannan, “Emotion Detection from Text,” in International Journal of Engineering Research and Development, volume 11, issue pp 23-34, July 2015.07,
  3. N. Fragopanagos* and J.G. Taylor, “ Emotion recognition in human-computer interaction,” Elsevier.
  4. C.Yang, K.H.-Y.Lin and H.-H.chen, “Emotion Classification using Web Blog Corpora”.
  5. Nadia Afroz, Mahim-Ul Asad, Lily Dey, Rudra Pratap Deb Nath and Muhammad Anwarul Azim, “An Intelligent Framework for Text-to-Emotion Analyzer,” in International Conference on Computer and Information Technology (ICCIT), 2015.
  6. Jasleen Kaur and Jatinderkumar R.Saini, “Emotion Detection and Sentiment Analysis in Text Corpus: A Differential Study with Informal and Formal Writing Styles,” in International Journal of Computer Applications (0975-8887), Volume 101-No 9, September 2014.
  7. Erik Cambria, Andrew Livingstone and Amir Hossain, “The hourglass of emotions,” Cognitive behavioural systems.Springer, 2012.
  8. Myriam D, Munezero, Calkin Suero Montero and John Pajunen, “Are They Different? Affect, Feeling, Emotion, Sentiment and Opinion Detection in Text,” in IEEE transactions on affective computing.
  9. Ruchi Hirat and Namita Mittal, “A survey on Emotion Detection Techniques using Text in Blog posts,” in International Bulletin of Mathematical Research, Volume 02, Issue 1, 2015.
  10. Manasa M Tilakraj, Deepika. D. Shetty, Nagarathna M. Shruthi K. and Sougandhika Narayan, “Emotion Finder: Detecting Emotions From Text, Tweets and Audio,” in International Journal of Scientific Engineering and Applied Science, Volume-2, Issue-5, May 2016.
  11. Shiv Naresh Shivhare and Prof. Saritha Khethawat, “Emotion Detection  From  Text”.
  12. Parrot, W.G, “Emotions in Social Psychology,” in Psychology Press, Philadelphia 2001.
  13. Shyamol Banerjee and Prof. Unmukh Dutta, “ Detecting of Emotions in Text: A Survey,” in International Journal of Advanced Engineering and Global Technology, Vol-03, Issue-12, December 2015.
  14. Huang, “Multimodal approaches for Emotion Recognition, A survey,” USA
  15. Chun-Chieh Liu, Ting-Hao Yang, Chang-Tai Hsieh and Von-Wun Soo, “Towards text-based Emotion Detection: A Survey and Possible Improvements,”  in International Conference on Information Management and Engineering, 2009.
  16. Radim Burget, Jan Karasek and Zdenek Smekal,  “Recognition of emotions in Czech newspaper headlines,”  Radioengineering 20.1 (2011).
  17. Shadi Shaheen, Wassim El-Hajj, Hazem Hajj and Shady Elbassuoni, “Emotion  Recognition from Text Based on Automatically Generated Rules,” in International Conference on Data Mining Workshop, IEEE, 2014.
  18. EC-C. Kao. et.al.” Towards Text Based Emotion Detection A Survey and Possible Improvements,” Information management and engineering, IEEE, 2009.
  19. R. Cowie, E. Douglas Cowie, N. Tsapatsoulis, G.Votsis and S.Kollias, “Recognition of Emotional States in Natural Human-computer interaction,” in IEEE signal processing magazine.
  20. C. Maaoui, A. Pruski and F. Abdat, “Emotion recognition for human-machine communication.”



author

For Authors

Author Membership provide access to scientific innovation, next generation tools, access to conferences/seminars
/symposiums/webinars, networking opportunities, and privileged benefits.
Authors may submit research manuscript or paper without being an existing member of LJP. Once a non-member author submits a research paper he/she becomes a part of "Provisional Author Membership".

Know more

institutes

For Institutions

Society flourish when two institutions come together." Organizations, research institutes, and universities can join LJP Subscription membership or privileged "Fellow Membership" membership facilitating researchers to publish their work with us, become peer reviewers and join us on Advisory Board.

Know more

subsribe

For Subscribers

Subscribe to distinguished STM (scientific, technical, and medical) publisher. Subscription membership is available for individuals universities and institutions (print & online). Subscribers can access journals from our libraries, published in different formats like Printed Hardcopy, Interactive PDFs, EPUBs, eBooks, indexable documents and the author managed dynamic live web page articles, LaTeX, PDFs etc.

Know more