Abstract
Social media are more and more frequently used by people to express their feelings in the form of short messages. This has raised interest in emotion detection, with a wide range of applications among which the assessment of users’ moods in a community is perhaps the most relevant. This paper proposes a comparison between two approaches to emotion classification in tweets, taking into account six basic emotions. Additionally, it proposes a completely automated way of creating a reliable training set, usually a tedious task performed manually by humans. In this work, training datasets have been first collected from the web and then automatically filtered to exclude ambiguous cases, using an iterative procedure. Test datasets have been similarly collected from the web, but annotated manually. Two approaches have then been compared. The first is based on a direct application of a single “flat” seven-output classifier, which directly assigns one of the emotions to the input tweet, or classifies it as “objective”, when it appears not to express any emotion. The other approach is based on a three-level hierarchy of four specialized classifiers, which reflect a priori relationships between the target emotions. In the first level, a binary classifier isolates subjective (expressing emotions) from objective tweets. In the second, another binary classifier labels subjective tweets as positive or negative. Finally, in the third, one ternary classifier labels positive tweets as expressing joy, love, or surprise, while another classifies negative tweets as expressing anger, fear, or sadness. Our tests show that the a priori domain knowledge embedded into the hierarchical classifier makes it significantly more accurate than the flat classifier.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Ugolotti, R., Sassi, F., Mordonini, M., Cagnoni, S.: Multi-sensor system for detection and classification of human activities. J. Ambient Intell. Humaniz. Comput. 4, 27–41 (2013)
Matrella, G., Parada, G., Mordonini, M., Cagnoni, S.: A video-based fall detector sensor well suited for a data-fusion approach. Assistive Technol. Adap. Equipment Inclusive Environ. Assistive Technol. Res. Ser. 25, 327–331 (2009)
Fornacciari, P., Mordonini, M., Tomauiolo, M.: A case-study for sentiment analysis on Twitter. In: Workshop dagli Oggetti agli Agenti, WOA 2015 (2015)
Fornacciari, P., Mordonini, M., Tomauiolo, M.: Social network and sentiment analysis on Twitter: towards a combined approach. In: 1st International Workshop on Knowledge Discovery on the WEB, KDWeb 2015 (2015)
Parrott, W.G.: Emotions in Social Psychology: Essential Readings. Psychology Press, Philadelphia (2001)
Liu, B.: Sentiment Analysis and Opinion Mining: Synthesis Lectures on Human Language Technologies, vol. 5, pp. 1–167 (2012)
Mohammad, S.M.: Sentiment analysis: detecting valence, emotions, and other affectual states from text. Emotion Measurement (2015)
Mislove, A., Lehmann, S., Ahn, Y.Y., Onnela, J.P., Rosenquist, J.N.: Pulse of the nation: US mood throughout the day inferred from Twitter. Northeastern University (2010)
Healey, C., Ramaswamy, S.: Visualizing Twitter sentiment (2010). Accessed 17 June 2016
Allisio, L., Mussa, V., Bosco, C., Patti, V., Ruffo, G.: Felicittà: Visualizing and estimating happiness in Italian cities from geotagged tweets. In: ESSEM@ AI* IA, pp. 95–106 (2013)
Kao, E.C., Liu, C.C., Yang, T.H., Hsieh, C.T., Soo, V.W.: Towards text-based emotion detection a survey and possible improvements. In: 2009 International Conference on Information Management and Engineering, ICIME 2009, pp. 70–74. IEEE (2009)
Strapparava, C., Valitutti, A., et al.: WordNet affect: an affective extension of WordNet. In: LREC, vol. 4, pp. 1083–1086 (2004)
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)
Poria, S., Cambria, E., Winterstein, G., Huang, G.B.: Sentic patterns: dependency-based rules for concept-level sentiment analysis. Knowl. Based Syst. 69, 45–63 (2014)
Franchi, E., Poggi, A., Tomaiuolo, M.: Social media for online collaboration in firms and organizations. Int. J. Inf. Syst. Model. Des. (IJISMD) 7, 18–31 (2016)
Dumais, S., Chen, H.: Hierarchical classification of web content. In: Proceedings of the 23rd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 256–263. ACM (2000)
Silla Jr., C.N., Freitas, A.A.: A survey of hierarchical classification across different application domains. Data Min. Knowl. Disc. 22, 31–72 (2011)
Addis, A., Armano, G., Vargiu, E.: A progressive filtering approach to hierarchical text categorization. Commun. SIWN 5, 28–32 (2008)
Koller, D., Sahami, M.: Hierarchically classifying documents using very few words. In: Proceedings of the 14th International Conference on Machine Learning (1997)
Armano, G., Mascia, F., Vargiu, E.: Using taxonomic domain knowledge in text categorization tasks. International Journal of Intelligent Control and Systems (2007). Special Issue on Distributed Intelligent Systems
Mitchell, T.: Conditions for the equivalence of hierarchical and flat Bayesian classifier. Technical report, Center for Automated Learning and Discovery, Carnegie-Mellon University (1998)
Ghazi, D., Inkpen, D., Szpakowicz, S.: Hierarchical approach to emotion recognition and classification in texts. In: Farzindar, A., Kešelj, V. (eds.) AI 2010. LNCS (LNAI), vol. 6085, pp. 40–50. Springer, Heidelberg (2010). doi:10.1007/978-3-642-13059-5_7
Al-Hajjar, D., Syed, A.Z.: Applying sentiment and emotion analysis on brand tweets for digital marketing. In: 2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT), pp. 1–6. IEEE (2015)
Esuli, A., Sebastiani, F.: SentiWordNet: a publicly available lexical resource for opinion mining. In: Proceedings of LREC, vol. 6, pp. 417–422. Citeseer (2006)
Mohammad, S.M., Kiritchenko, S.: Using hashtags to capture fine emotion categories from tweets. Comput. Intell. 31, 301–326 (2015)
Ghazi, D., Inkpen, D., Szpakowicz, S.: Hierarchical versus flat classification of emotions in text. In: Proceedings of the NAACL HLT 2010 Workshop on Computational Approaches to Analysis and Generation of Emotion in Text, pp. 140–146. Association for Computational Linguistics (2010)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing AG
About this paper
Cite this paper
Angiani, G., Cagnoni, S., Chuzhikova, N., Fornacciari, P., Mordonini, M., Tomaiuolo, M. (2016). Flat and Hierarchical Classifiers for Detecting Emotion in Tweets. In: Adorni, G., Cagnoni, S., Gori, M., Maratea, M. (eds) AI*IA 2016 Advances in Artificial Intelligence. AI*IA 2016. Lecture Notes in Computer Science(), vol 10037. Springer, Cham. https://doi.org/10.1007/978-3-319-49130-1_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-49130-1_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-49129-5
Online ISBN: 978-3-319-49130-1
eBook Packages: Computer ScienceComputer Science (R0)