Open Access Open Access  Restricted Access Subscription or Fee Access

Hybrid approach for emotion detection in text using spatial-temporal features

Nida Hakak, Mahira Kirmani


In recent years, the incredible exploratory growth of online data in social media mainly Twitter has to lead to growing attention of researchers towards Affective analysis of social media streams. Around 500 million tweets are generated per day all around the globe. Classification of these tweets into different affective classes is an arduous task. We propose a novel approach of classifying a tweet into Ekman’s six basic emotion classes using neural network architectures (convolutional and recurrent neural networks).  We collected data for specific events from Twitter and evaluated our classifier. Results obtained lead us to the conclusion that neural network architectures outperform the supervised learning classifiers. We achieved 80% accuracy for our proposed classifier which is higher than the baseline classifiers.

Keywords: Artificial intelligence, emotion analysis, neural networks, emotion corpora, sentiment analysis

Cite this Article
Nida Hakak, Mahira Kirmani. Hybrid Approach for Emotion Detection in Text using Spatial-Temporal Features. Journal of Advancements in Robotics. 2018; 5(1): 34–44p.

Full Text:



Fan, Weiguo, and Michael D. Gordon. "The power of social media analytics." Communications of the ACM 57.6 (2014): 74-81.

Turney, Peter D. "Thumbs up or thumbs down?: semantic orientation applied to unsupervised classification of reviews." Proceedings of the 40th annual meeting on association for computational linguistics. Association for Computational Linguistics, 2002.

Turney, Peter D., and Michael L. Littman. "Measuring praise and criticism: Inference of semantic orientation from association." ACM Transactions on Information Systems (TOIS) 21.4 (2003): 315-346.

Dave, Kushal, Steve Lawrence, and David M. Pennock. "Mining the peanut gallery: Opinion extraction and semantic classification of product reviews." Proceedings of the 12th international conference on World Wide Web. ACM, 2003.

Das, Sanjiv, and Mike Chen. "Yahoo! for Amazon: Extracting market sentiment from stock message boards." Proceedings of the Asia Pacific finance association annual conference (APFA). Vol. 35. 2001.

Pang, Bo, Lillian Lee, and Shivakumar Vaithyanathan. "Thumbs up?: sentiment classification using machine learning techniques." Proceedings of the ACL-02 conference on Empirical methods in natural language processing-Volume 10. Association for Computational Linguistics, 2002.

Pang, Bo, and Lillian Lee. "A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts." Proceedings of the 42nd annual meeting on Association for Computational Linguistics. Association for Computational Linguistics, 2004.

Zhuang, Li, Feng Jing, and Xiao-Yan Zhu. "Movie review mining and summarization." Proceedings of the 15th ACM international conference on Information and knowledge management. ACM, 2006.

Popescu, Ana-Maria, Bao Nguyen, and Oren Etzioni. "OPINE: Extracting product features and opinions from reviews." Proceedings of HLT/EMNLP on interactive demonstrations. Association for Computational Linguistics, 2005.

Kouloumpis, Efthymios, Theresa Wilson, and Johanna D. Moore. "Twitter sentiment analysis: The good the bad and the omg!." Icwsm 11.538-541 (2011): 164.

Saif, Hassan, Yulan He, and Harith Alani. "Semantic sentiment analysis of twitter." International semantic web conference. Springer, Berlin, Heidelberg, 2012.

Sarlan, Aliza, Chayanit Nadam, and Shuib Basri. "Twitter sentiment analysis." Information Technology and Multimedia (ICIMU), 2014 International Conference on. IEEE, 2014.

Balabantaray, Rakesh C., Mudasir Mohammad, and Nibha Sharma. "Multi-class twitter emotion classification: A new approach." International Journal of Applied Information Systems 4.1 (2012): 48-53.

Canales, Lea, et al. "Exploiting a bootstrapping approach for automatic annotation of emotions in texts." Data Science and Advanced Analytics (DSAA), 2016 IEEE International Conference on. IEEE, 2016.

Mikolov, Tomas, et al. "Efficient estimation of word representations in vector space." arXiv preprint arXiv:1301.3781 (2013).

Manning, Christopher, et al. "The Stanford CoreNLP natural language processing toolkit." Proceedings of 52nd annual meeting of the association for computational linguistics: system demonstrations. 2014.

Miller, George A. "WordNet: a lexical database for English." Communications of the ACM 38.11 (1995): 39-41.

Van Rijsbergen, Cornelis J., Stephen Edward Robertson, and Martin F. Porter. New models in probabilistic information retrieval. London: British Library Research and Development Department, 1980.

Mohammad, Saif M., and Peter D. Turney. "Crowdsourcing a word–emotion association lexicon." Computational Intelligence 29.3 (2013): 436-465.

Farooq, U., Mansoor, H., Nongaillard, A., Ouzrout, Y., & Qadir, M. A. (2017). Negation Handling in Sentiment Analysis at Sentence Level. JCP, 12(5), 470-478.

K. Crammer and Y. Singer. On the Algorithmic Implementation of Multi-class SVMs, JMLR, 2001

Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., ... & Ghemawat, S. (2016). Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467.

Pennington, J., Socher, R., & Manning, C. (2014). Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP)(pp. 1532-1543).

Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8), 1735-1780.

Graves, Alex. "Generating sequences with recurrent neural networks." arXiv preprint arXiv:1308.0850 (2013).


  • There are currently no refbacks.

This site has been shifted to