Combining Machine Learning Techniques and Natural Language Processing to Infer Emotions Using Spanish Twitter Corpus

  • Gonzalo Blázquez Gil
  • Antonio Berlanga de Jesús
  • José M. Molina Lopéz
Part of the Communications in Computer and Information Science book series (CCIS, volume 365)


In the recent years, microblogging services, as Twitter, have become a popular tool for expressing feelings, opinions, broadcasting news, and communicating with friends. Twitter users produced more than 340 million tweets per day which may be consider a rich source of user information. We take a supervised approach to the problem, but leverage existing hashtags in Twitter for building our training data. Finally, we tested the Spanish emotional corpus applying two different machine learning algorithms for emotion identification reaching about 65% accuracy.


Emotion Context Emotion Recognition Microblogging Twitter Features extraction Machine Learning 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Picard, R.: Affective computing (1997)Google Scholar
  2. 2.
    Cowie, R., Douglas-Cowie, E., Tsapatsoulis, N., Votsis, G., Kollias, S., Fellenz, W., Taylor, J.: Emotion recognition in human-computer interaction. IEEE Signal Processing Magazine 18(1), 32–80 (2001)CrossRefGoogle Scholar
  3. 3.
    Soyel, H., Demirel, H.: Facial expression recognition using 3D facial feature distances. In: Kamel, M., Campilho, A. (eds.) ICIAR 2007. LNCS, vol. 4633, pp. 831–838. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  4. 4.
    Reilly, J., Ghent, J., McDonald, J.: Modelling, classification and synthesis of facial expressions. In: Affective Computing: Emotion Modelling, Synthesis and Recognition, pp. 107–132Google Scholar
  5. 5.
    Wang, W., Chen, L., Thirunarayan, K., Sheth, A.: Harnessing Twitter ’Big Data’ for Automatic Emotion Identification (2012),
  6. 6.
    Blázquez Gil, G., Berlanga, A., Molina, J.: Incontexto: Multisensor architecture to obtain people context from smartphones. International Journal of Distributed Sensor Networks 2012 (2012)Google Scholar
  7. 7.
    Ekman, P., Friesen, W.: Facial action coding system: A technique for the measurement of facial movement (1978)Google Scholar
  8. 8.
    Pang, B., Lee, L., Vaithyanathan, S.: Thumbs up?: Sentiment classification using machine learning techniques. In: Proceedings of the ACL 2002 Conference on Empirical Methods in Natural Language Processing, vol. 10, pp. 79–86. Association for Computational Linguistics (2002)Google Scholar
  9. 9.
    Derks, D., Bos, A., Von Grumbkow, J.: Emoticons and online message interpretation. Social Science Computer Review 26(3), 379–388 (2008)CrossRefGoogle Scholar
  10. 10.
    Schlosberg, H.: Three dimensions of emotion. Psychological Review 61(2), 81 (1954)CrossRefGoogle Scholar
  11. 11.
    Petrovic, S., Osborne, M., Lavrenko, V.: The Edinburgh twitter corpus. In: Proceedings of the NAACL HLT 2010 Workshop on Computational Linguistics in a World of Social Media, pp. 25–26 (2010)Google Scholar
  12. 12.
    Shaver, P., Schwartz, J., Kirson, D., O’Connor, C.: Emotion knowledge: further exploration of a prototype approach. Journal of Personality and Social Psychology 52(6), 1061 (1987)CrossRefGoogle Scholar
  13. 13.
    Wilson, T., Wiebe, J., Hoffmann, P.: Recognizing contextual polarity: An exploration of features for phrase-level sentiment analysis. Computational Linguistics 35(3), 399–433 (2009)CrossRefGoogle Scholar
  14. 14.
    Pak, A., Paroubek, P.: Twitter as a corpus for sentiment analysis and opinion mining. In: Proceedings of LREC, vol. 2010 (2010)Google Scholar
  15. 15.
    De Choudhury, M., Counts, S., Gamon, M.: Not all moods are created equal! exploring human emotional states in social media. In: Sixth International AAAI Conference on Weblogs and Social Media (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Gonzalo Blázquez Gil
    • 1
  • Antonio Berlanga de Jesús
    • 1
  • José M. Molina Lopéz
    • 1
  1. 1.Applied Artificial Intelligence GroupUniversidad Carlos III de MadridColmenarejoSpain

Personalised recommendations