Twitter Sarcasm Detection Exploiting a Context-Based Model

  • Zelin Wang
  • Zhijian Wu
  • Ruimin Wang
  • Yafeng Ren
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9418)


Automatically detecting sarcasm in twitter is a challenging task because sarcasm transforms the polarity of an apparently positive or negative utterance into its opposite. Previous work focus on feature modeling of the single tweet, which limit the performance of the task. These methods did not leverage contextual information regarding the author or the tweet to improve the performance of sarcasm detection. However, tweets are filtered through streams of posts, so that a wider context, e.g. a conversation or topic, is always available. In this paper, we compared sarcastic utterances in twitter to utterances that express positive or negative attitudes without sarcasm. The sarcasm detection problem is modeled as a sequential classification task over a tweet and his contextual information. A Markovian formulation of the Support Vector Machine discriminative model as embodied by the \(SVM^{hmm}\) algorithm has been employed to assign the category label to entire sequence. Experimental results show that sequential classification effectively embodied evidence about the context information and is able to reach a relative increment in detection performance.


Sarcasm detection Sentiment classification Support vector machine Sequential classification 


  1. 1.
    Liu, B., Zhang, L.: A survey of opinion mining and sentiment analysis. In: Aggarwal, C.C., Zhai, C. (eds.) Mining Text Data, pp. 415–463. Springer, New York (2012)CrossRefGoogle Scholar
  2. 2.
    Tsytsarau, M., Palpanas, T.: Survey on mining subjective data on the Web. Data Min. Knowl. Discov. 24(3), 478–514 (2012)zbMATHCrossRefGoogle Scholar
  3. 3.
    Davidov, D., Tsur, O., Rappoport, A.: Semi-supervised recognition of sarcastic sentences in Twitter and Amazon. In: Processdings of the Fourteenth Conference on Computational Natural Language Learning (CoNLL 2010), Uppsala, Sweden, pp. 107–116 (2010)Google Scholar
  4. 4.
    Pang, B., Lee, L.: Opinion mining and sentiment analysis. Found. Trends Inf. Retireval 2(1–2), 1–135 (2008)CrossRefGoogle Scholar
  5. 5.
    Altun, Y., Tsochantaridis, I., Hofmann, T.: Hidden Markov support vector machines. In: Processdings of the International Conference on Machine Learning (ICML 2003), Washington, pp. 3–10 (2003)Google Scholar
  6. 6.
    Vanzo, A., Crose, D., Basili, R.: A context-based model for sentiment analysis in Twitter. In: Processdings of the 25th International Conference on Computational Linguistics: Technical Papers (COLING 2014), Dublin, Ireland, pp. 2345–2354 (2014)Google Scholar
  7. 7.
    Gonzalez-Ibanez, R., Muresan, S., Wacholder, N.: Identifying sarcasm in Twitter: a closer look. In: Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies (ACL-HLT 2011), Portland, Oregon, pp. 581–586 (2011)Google Scholar
  8. 8.
    Filatova, E.: Irony and Sarcasm: corpus generation and analysis using crowdsourcing. In: Language Resources and Evaluation, pp. 392–398 (2012)Google Scholar
  9. 9.
    Burfoot, C., Baldwin, T.: Automatic satire detection: are you having a laugh? In: Joint Conference of the 47th Annual Meeting of the Association for Computational Linguistics and the 4th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing (ACL-IJCNLP 2009), Singapore, pp. 161–164 (2009)Google Scholar
  10. 10.
    Tepperman, J., Traum, D., Narayanan, S.: “Yeah Right”: Sarcasm recognitio for spoken dialogue Systems. In: Proceedings of the 9th International Conference on Spoken Language Processing, Antwerp, Belgium (2006)Google Scholar
  11. 11.
    Tsur, O., Davidov, D., Rappoport, A.: Semi-supervised recognition of sarcastic sentences in online product reviews. In: AAAI Conference on Weblogs and Social Media, Atlanta, Georgia, pp. 107–116 (2010)Google Scholar
  12. 12.
    Carvalho, P., Sarmento, L., Silva, M.J., de Oliveira, E.: Clues for detecting irony in user-generated contents: oh...!! it’s so easy; -). In: Proceedings of the 1st CIKM Workshop on Topic-Sentiment Analysis for Mass Opinion, New York, NY, pp. 53–56 (2009)Google Scholar
  13. 13.
    Veale, T., Hao, Y.: Detecting ironic intent in creative comparisons. In: Proceedings of the 19th Europen Conference on Artificial Intelligence (ECAI 2010), The Netherlands, Amsterdam, pp. 765–770 (2010)Google Scholar
  14. 14.
    Reyes, A., Rosso, P., Veale, T.: A multidimensional approach for detecting irony in Twitter. Lang. Resour. Eval. 47(1), 239–368 (2012)CrossRefGoogle Scholar
  15. 15.
    Riloff, E., Qadir, A., Surve, P., Silva, L.D., Gilbert, N., Huang, R.: Sarcasm as contrast between a positive sentiment and negative situation. In: Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing (EMNLP 2013), Seattle, USA, pp. 704–714 (2013)Google Scholar
  16. 16.
    Wallace, B.C., Choe, D.K., Kertz, L., Charniak, E.: Humans require context to infer ironic intent (so computers probably do, too). In: Processdings of the 52nd Annual Meeting of the Association for Computational Linguistics (ACL 2014), Baltimore, Maryland, USA, pp. 512–516 (2014)Google Scholar
  17. 17.
    Nakov, P., Rosenthal, S., Kozareva, Z., Stoyanov, V., Ritter, A., Wilson, T.: Semeval-2013 task 2: sentiment analysis in Twitter. In: Second Joint Conference on Lexical and Computational Semantics (*SEM), Proceedings of the Seventh International Workshop on Semantic Evaluation(SemEval 2013), Atlanta, Georgia, USA, vol. 2, pp. 312–330 (2013)Google Scholar
  18. 18.
    Pang, B., Lee, L., Vaithyanathan, S.: Thumbs up? Sentiment classification using machine learning techniques. In: Preceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP 2002), Philadelphia, pp. 79–86 (2002)Google Scholar
  19. 19.
    Owoputi, O., O’Conor, B., Dyer, C., Gimpel, K., Schneider, N., Smith, N.A.: Improving part-of-speech tagging for online conversational text with word clusters. In: The 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL 2013), Atlanta, pp. 380–390 (2013)Google Scholar
  20. 20.
    Brown, P.F., deSouza, P.V., Mercer, R.L., Della Pietra, V.J., Lai, J.C.: Class-based n-gram models of natural language. Comput. Linguist. 18(4), 467–479 (1992)Google Scholar
  21. 21.
    Joachims, T., Finley, T., Chun-Nam, Y.: Cutting-plane training of structural SVMs. Mach. Learn. 77(1), 27–59 (2009)zbMATHCrossRefGoogle Scholar
  22. 22.
    Crammer, K., Singer, Y.: On the algorithmic implementation of multiclass kernel-vector machines. J. Mach. Learn. Res. 2, 265–292 (2001)Google Scholar
  23. 23.
    Barbieri, F., Saggion, H.: Modelling irony in Twitter. In: Proceedings of the Student Research Workshop at the 14th Conference of the Europen Chapter of the Association for Computational Linguistics, Gothenburg, Sweden, pp. 56–64 (2014)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Zelin Wang
    • 1
    • 2
  • Zhijian Wu
    • 1
    • 2
  • Ruimin Wang
    • 3
  • Yafeng Ren
    • 2
  1. 1.State Key Laboratory of Software EngineeringWuhan UniversityWuhanChina
  2. 2.School of ComputerWuhan UniversityWuhanChina
  3. 3.International School of SoftwareWuhan UniversityWuhanChina

Personalised recommendations