Skip to main content
Log in

Automatic emotion detection in text streams by analyzing Twitter data

  • Regular Paper
  • Published:
International Journal of Data Science and Analytics Aims and scope Submit manuscript

Abstract

Techniques to detect the emotions expressed in microblogs and social media posts have a wide range of applications including, detecting psychological disorders such as anxiety or depression in individuals or measuring the public mood of a community. A major challenge for automated emotion detection is that emotions are subjective concepts with fuzzy boundaries and with variations in expression and perception. To address this issue, a dimensional model of affect is utilized to define emotion classes. Further, a soft classification approach is proposed to measure the probability of assigning a message to each emotion class. We develop and evaluate a supervised learning system to automatically classify emotion in text stream messages. Our approach includes two main tasks: an offline training task and an online classification task. The first task creates models to classify emotion in text messages. For the second task, we develop a two-stage framework called EmotexStream to classify live streams of text messages for the real-time emotion tracking. Moreover, we propose an online method to measure public emotion and detect emotion burst moments in live text streams.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. https://en.wikipedia.org/wiki/Death_of_Eric_Garner.

  2. http://www.qualtrics.com.

References

  1. Wang, W., Chen, L., Thirunarayan, K., Sheth, AP.: Harnessing twitter big data for automatic emotion identification. In: 2012 International Conference on Social Computing (SocialCom), pp 587–592. IEEE (2012)

  2. De Choudhury, M., Counts, S., Gamon, M.: Not all moods are created equal! exploring human emotional states in social media. In: ICWSM’12 (2012)

  3. Wakamiya, S., Belouaer, L., Brosset, D., Lee, R., Kawai, Y., Sumiya, K., Claramunt, C.: Measuring crowd mood in city space through twitter. In: International Symposium on Web and Wireless Geographical Information Systems, pp 37–49. Springer (2015)

  4. Choudhury, MD., Gamon, M., Counts,S., Horvitz, E.: Predicting depression via social media. In: ICWSM’13, The AAAI Press (2013)

  5. Park, M., Cha, C., Cha, M .: (2012) Depressive moods of users portrayed in twitter. In: Proceedings of the ACM SIGKDD Workshop on Healthcare Informatics, HI-KDD

  6. Guthier, B., Alharthi, R., Abaalkhail, R., El Saddik A.: Detection and visualization of emotions in an affect-aware city. In: Proceedings of the 1st International Workshop on Emerging Multimedia Applications and Services for Smart Cities, pp 23–28. ACM (2014)

  7. Resch, B., Summa, A., Zeile, P., Strube, M.: Citizen-centric urban planning through extracting emotion information from twitter in an interdisciplinary space-time-linguistics algorithm. Urban Plann. 1(2), 114–127 (2016)

    Article  Google Scholar 

  8. Kanhabua, N., Nejdl, W.: (2013) Understanding the diversity of tweets in the time of outbreaks. In: Proceedings of the 22nd international conference on World Wide Web companion, International World Wide Web Conferences Steering Committee, pp. 1335–1342

  9. Hasan, M., Agu, E., Rundensteiner, E.: (2014) Using hashtags as labels for supervised learning of emotions in twitter messages. In: Proceedings of the ACM SIGKDD Workshop on Healthcare Informatics, HI-KDD

  10. Go, A., Bhayani, R., Huang, L.: Twitter sentiment classification using distant supervision. CS224N Project Report, Stanford, pp 1–12 (2009)

  11. Pak, A., Paroubek, P.: Twitter as a corpus for sentiment analysis and opinion mining. In: Proceedings of the Seventh conference on International Language Resources and Evaluation (LREC’10), ELRA, Valletta, Malta (2010)

  12. Barbosa, L., Feng, J.: Robust sentiment detection on twitter from biased and noisy data. In: Proceedings of the 23rd ACL: Posters, Association for Computational Linguistics, pp 36–44 (2010)

  13. Kouloumpis, E., Wilson, T., Moore, J.: Twitter sentiment analysis: The good the bad and the omg! In: ICWSM’11, The AAAI Press (2011)

  14. Gunes, H., Schuller, B., Pantic, M., Cowie, R.: Emotion representation, analysis and synthesis in continuous space: A survey. In: 2011 IEEE International Conference on Automatic Face & Gesture Recognition and Workshops (FG 2011), pp. 827–834. IEEE (2011)

  15. Wang, X., Wei, F., Liu, X., Zhou, M., Zhang, M.: Topic sentiment analysis in twitter: a graph-based hashtag sentiment classification approach. In: Proceedings of the 20th ACM international conference on Information and knowledge management, pp 1031–1040. ACM (2011)

  16. Russell, J.A.: A circumplex model of affect. J. Personal. Soc. Psychol. 39, 1161–1178 (1980)

    Article  Google Scholar 

  17. Hasan, M., Rundensteiner, E., Agu, E.: Emotex: Detecting emotions in twitter messages. In: Proceedings of the Sixth ASE International Conference on Social Computing (SocialCom 2014), Academy of Science and Engineering (ASE), USA (2014)

  18. Russell, J.A., Barrett, L.F.: Core affect, prototypical emotional episodes, and other things called emotion: dissecting the elephant. J. Personal. Soc. Psychol. 76(5), 805 (1999)

    Article  Google Scholar 

  19. Ekman, P.: Basic emotions. Handb. Cognit. Emot. 98, 45–60 (1999)

    Google Scholar 

  20. Bollen, J., Mao, H., Pepe, A.: Modeling public mood and emotion: Twitter sentiment and socio-economic phenomena. In: ICWSM’11 (2011)

  21. Purver, M., Battersby, S.: Experimenting with distant supervision for emotion classification. In: Proceedings of the 13th EACL, Association for Computational Linguistics, pp. 482–491 (2012)

  22. Strapparava, C., Mihalcea, R.: Learning to identify emotions in text. In: Proceedings of the 2008 ACM symposium on Applied computing, pp. 1556–1560. ACM (2008)

  23. Liu, H., Lieberman, H., Selker, T.: A model of textual affect sensing using real-world knowledge. In: Proceedings of the 8th international conference on Intelligent user interfaces, pp. 125–132. ACM (2003)

  24. Calvo, R.A., Mac Kim, S.: Emotions in text: dimensional and categorical models. Computat. Intell. 29(3), 527–543 (2013)

    Article  MathSciNet  Google Scholar 

  25. Princeton, U.: (2010) Wordnet. http://wordnet.princeton.edu

  26. Bradley, M.M., Lang, P.J.: Affective norms for english words (anew): Instruction manual and affective ratings. In: Technical Report Citeseer (1999)

  27. Pennebaker, JW., Francis, ME., Booth, RJ.: Linguistic inquiry and word count: Liwc 2001. Mahway: Lawrence Erlbaum Associates p. 71 (2001)

  28. rup Nielsen, F.: A new anew: evaluation of a word list for sentiment analysis in microblogs. In: Proceedings of the ESWC2011 Workshop on ’Making Sense of Microposts’: Big things come in small packages, vol. 718, pp. 93–98 (2011)

  29. Liu, Y., Zhang, H.H., Wu, Y.: Hard or soft classification? Large-margin unified machines. J. Am. Stat. Assoc. 106(493), 166–177 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  30. Zadrozny, B., Elkan, C.: Transforming classifier scores into accurate multiclass probability estimates. In: Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 694–699. ACM (2002)

  31. Platt, J., et al.: Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Adv. Large Margin Classif. 10(3), 61–74 (1999)

    Google Scholar 

  32. Hasan, M., Rundensteiner, E., Kong, X., Agu, E.: Using social sensing to discover trends in public emotion. In: 2017 IEEE 11th International Conference on Semantic Computing (ICSC), pp. 172–179. IEEE (2017)

  33. Branco, P., Torgo, L., Ribeiro, R.P.: A survey of predictive modeling on imbalanced domains. ACM Comput. Surv. (CSUR) 49(2), 31 (2016)

    Article  Google Scholar 

  34. Joachims, T.: Making large-scale SVM learning practical. In: Schölkopf, B., Burges, C.J., Smola, A. (eds.) Advances in Kernel Methods-Support Vector Learning. MIT Press, Cambridge (1999)

    Google Scholar 

  35. Ma, C., Prendinger, H., Ishizuka, M.: Emotion estimation and reasoning based on affective textual interaction. In: Affective Computing and Intelligent Interaction, pp. 622–628. Springer (2005)

  36. Neviarouskaya, A., Prendinger, H., Ishizuka, M.: Textual affect sensing for sociable and expressive online communication. In: Affective Computing and Intelligent Interaction, pp. 218–229. Springer (2007)

  37. Dodds, P.S., Danforth, C.M.: Measuring the happiness of large-scale written expression: songs, blogs, and presidents. J. Happiness Stud. 11(4), 441–456 (2010)

    Article  Google Scholar 

  38. Strapparava, C., Valitutti, A.: Wordnet affect: an affective extension of wordnet. In: Proceedings of 4th International Conference on Language Resources and Evaluation, LREC, vol 4, pp. 1083–1086 (2004)

  39. Mohammad, SM.: # emotional tweets. In: Proceedings of the First Joint Conference on Lexical and Computational Semantics, Association for Computational Linguistics, pp. 246–255 (2012)

  40. Canales, L., Strapparava, C., Boldrini, E., Martnez-Barco, P.: Exploiting a bootstrapping approach for automatic annotation of emotions in texts. In: 2016 IEEE International Conference on Data Science and Advanced Analytics (DSAA), pp. 726–734. IEEE (2016)

  41. Qadir, A., Riloff, E.: Bootstrapped learning of emotion hashtags# hashtags4you. WASSA 2013, 2 (2013)

    Google Scholar 

  42. Suttles, J., Ide, N.: Distant supervision for emotion classification with discrete binary values. In: International Conference on Intelligent Text Processing and Computational Linguistics, pp. 121–136. Springer (2013)

  43. Agrawal, A., An, A .: Unsupervised emotion detection from text using semantic and syntactic relations. In: Proceedings of the The 2012 IEEE/WIC/ACM International Joint Conferences on Web Intelligence and Intelligent Agent Technology-Volume 01, pp. 346–353. IEEE Computer Society (2012)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Maryam Hasan.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hasan, M., Rundensteiner, E. & Agu, E. Automatic emotion detection in text streams by analyzing Twitter data. Int J Data Sci Anal 7, 35–51 (2019). https://doi.org/10.1007/s41060-018-0096-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s41060-018-0096-z

Keywords

Navigation