Classifying Emotions in Twitter Messages Using a Deep Neural Network

  • Isabela R. R. da SilvaEmail author
  • Ana C. E. S. Lima
  • Rodrigo Pasti
  • Leandro N. de Castro
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 801)


Many people use social media nowadays to express their emotions or opinions about something. This paper proposes the use of a deep learning network architecture for emotion classification in Twitter messages, using the six emotions model of Ekman: happiness, sadness, anger, fear, disgust and surprise. We collected the tweets from a labeled dataset that contains about 2.5 million tweets and used the Word2Vec predictive model to learn the relations of each word and transform them into numbers that the deep network receives as input. Our approach achieved a 63% accuracy with all the classes and 77% accuracy on a binary classification scheme.


Deep learning Emotion classification Sentiment analysis 



The authors thank CAPES, CNPq, Fapesp, and MackPesquisa for the financial support. The authors also acknowledge the support of Intel for the Natural Computing and Machine Learning Laboratory as an Intel Center of Excellence in Machine Learning.


  1. 1.
    Ekman, P., Friesen, W.V., Ellsworth, P.: Emotion in the Human Face, 1st edn. Pergamon, New York (1972)Google Scholar
  2. 2.
    Santos, C.N.D., Gatti, M.: Deep convolutional neural networks for sentiment analysis of short texts. In: 25th International Conference on Computational Linguistics: Technical Papers, Dublin, Ireland, pp. 69–78 (2014)Google Scholar
  3. 3.
    Wang, W., Chen, L., Thirunarayan, K., Sheth, A.P.: Harnessing twitter “Big Data” for automatic emotion identification. In: Proceedings of the 2012 AE/IEEE International Conference on Social Computing, Washington, DC, USA, pp. 587–592 (2012)Google Scholar
  4. 4.
    Liu, B.: Sentiment Analysis and Opinion Mining. Morgan & Claypool Publishers, San Rafael (2012)CrossRefGoogle Scholar
  5. 5.
    Damasio, A.R.: Descartes Error: Emotion, Reason and the Human Brain. G.P. Putnam’s Sons, New York (1994)Google Scholar
  6. 6.
    Mikolov, T., Chen, K., Corrado, G.S., Jeffrey, D.: Efficient estimation of word representations in vector space. In: Proceedings of Workshop at ICLRGoogle Scholar
  7. 7.
    Thelwall, M., et al.: Sentiment strength detection for the social web. J. Am. Soc. Inf. Sci. Technol., 2544–2558 (2010)CrossRefGoogle Scholar
  8. 8.
    Balabantaray, R.C., Mohammad, M., Sharma, N.: Multi-class twitter emotion classification: a new approach. Int. J. Appl. Inf. Syst. 4(1), 48–53 (2012)Google Scholar
  9. 9.
    Suttles, J., Ide, N.: Distant supervision for emotion classification with discrete binary values. In: Computational Linguistics and Intelligent Text Processing, pp. 121–136 (2013)CrossRefGoogle Scholar
  10. 10.
    Plutchik, R.: Emotion: Theory, Research and Experience, pp. 370–372. Academic Press, New York (1980)Google Scholar
  11. 11.
    Damasio, A.: Looking for Spinoza: Joy, Sorrow, and the Feeling Brain. Harvest, San Diego (2003)Google Scholar
  12. 12.
    Scherer, K.R.: What are emotions? And how can they be measured? Soc. Sci. Inf. 44, 695–729 (2005)CrossRefGoogle Scholar
  13. 13.
    Stets, J.: Emotions and sentiments. In: Handbook of Social Psychology, pp. 309–335. Springer, US (2006)Google Scholar
  14. 14.
    Tang, D., Wei, F., Qin, B., Liu, T., Zhou, M.: Coooolll: a deep learning system for twitter sentiment classification, pp. 208–212 (2014)Google Scholar
  15. 15.
    Intel Distribution for Python. Accessed 26 Mar 2018

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Isabela R. R. da Silva
    • 1
    Email author
  • Ana C. E. S. Lima
    • 1
  • Rodrigo Pasti
    • 1
  • Leandro N. de Castro
    • 1
  1. 1.Universidade Presbiteriana MackenzieSão PauloBrazil

Personalised recommendations