Sarcasm Detection Using Feature-Variant Learning Models

Conference paper
Part of the Lecture Notes in Electrical Engineering book series (LNEE, volume 605)


Sentiment Analysis is the text classification tool that analyses a sentiment, message, emotion, attitude and tells whether the sentiment is positive, negative or neutral. The prime challenging aspect of sentiment analysis is the presence of sarcasm in message. Sarcasm is one kind of sentiment that is expressed verbally through the use of rolling of eyes and tonal stress. It consist of words mean the opposite of what user want to convey in order to be funny, or to show some irritation. The active online users and their reviews on websites are large in number so it is hard to detect even for humans, so in order to achieve error-free sentiment analysis it is imperative for machines to detect it accurately. The paper proposes the use of three different classes of features to help computers identify sarcasm reasonably well. In this paper, we intend to implement and empirically analyze number of computing techniques like Support Vector Machine, Decision Trees, Logistic Regression, Random Forest, K-Nearest Neighbors and Neural Networks for sarcasm detection on social media. The experimentation was done using three datasets i.e. SemEval 2015 Twitter benchmark dataset; random tweets collected using the Streaming API and a publicly available dataset of Reddit posts. The datasets provide interesting insights into how different forms of social media use the tool of sarcasm differently. The evaluated results were based on the performance measures like precision, recall, accuracy and F score. Amongst all, Twitter datasets had achieved the highest accuracy of around 91% to 92%, while the Reddit dataset had obtained peak accuracy of 80%.


Sarcasm Machine learning Lexicons Twitter Reddit 


  1. 1.
    Kumar, A., Abraham, A.: Opinion mining to assist user acceptance testing for open-beta versions. J. Inf. Assur. Secur. 12(4), 146–153 (2017)Google Scholar
  2. 2.
    Kumar, A., Sebastian, T.M.: Sentiment analysis: a perspective on its past, present and future. Int. J. Intell. Syst. Appl. 4(10), 1–14 (2012)Google Scholar
  3. 3.
    Pang, B., Lee, L.: Opinion mining and sentiment analysis. Found. Trends® Inf. Retrieval 2(1–2), 1–135 (2008)CrossRefGoogle Scholar
  4. 4.
    Kumar, A., Sebastian, T.M.: Machine learning assisted sentiment analysis. In: Proceedings of International Conference on Computer Science & Engineering, ICCSE, pp. 123–130 (2012)Google Scholar
  5. 5.
    Tsur, O., Davidov, D., Rappoport, A.: ICWSM—a great catchy name: semi-supervised recognition of sarcastic sentences in online product reviews. In: Fourth International AAAI Conference on Weblogs and Social Media, May 2010Google Scholar
  6. 6.
    Kumar, A., Sebastian, T.M.: Sentiment analysis on twitter. Int. J. Comput. Sci. 9(4), 372–378 (2012)Google Scholar
  7. 7.
    Deshwal, A., Sharma, S.K.: Twitter sentiment analysis using various classification algorithms. In: 5th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions), ICRITO, pp. 251–257. IEEE, September 2016Google Scholar
  8. 8.
    Sharma, S.K., Hoque, X., Chandra, P.: Sentiment predictions using deep belief networks model for odd-even policy in Delhi. Int. J. Synth. Emotions (IJSE) 7(2), 1–22 (2016)CrossRefGoogle Scholar
  9. 9.
    Majid, A.: Current emotion research in the language sciences. Emot. Rev. 4(4), 432–443 (2012)CrossRefGoogle Scholar
  10. 10.
    González-Ibánez, 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: Short Papers-Volume 2, pp. 581–586, June 2011Google Scholar
  11. 11.
    Kumar, A., Jaiswal, A.: Empirical study of Twitter and Tumblr for sentiment analysis using soft computing techniques. In: Proceedings of the World Congress on Engineering and Computer Science, vol. 1, pp. 1–5 (2017)Google Scholar
  12. 12.
    Zhang, M., Zhang, Y., Fu, G.: Tweet sarcasm detection using deep neural network. In: Proceedings of COLING, the 26th International Conference on Computational Linguistics: Technical Papers, pp. 2449–2460 (2016)Google Scholar
  13. 13.
    Rajadesingan, A., Zafarani, R., Liu, H.: Sarcasm detection on Twitter: a behavioral modeling approach. In: Proceedings of the Eighth ACM International Conference on Web Search and Data Mining, pp. 97–106. ACM, February 2015Google Scholar
  14. 14.
    Sulis, E., Farías, D.I.H., Rosso, P., Patti, V., Ruffo, G.: Figurative messages and affect in Twitter: differences between# irony,# sarcasm and# not. Knowl.-Based Syst. 108, 132–143 (2016)CrossRefGoogle Scholar
  15. 15.
    Davidov, D., Tsur, O., Rappoport, A.: Semi-supervised recognition of sarcastic sentences in Twitter and Amazon. In: Proceedings of the Fourteenth Conference on Computational Natural Language Learning, pp. 107–116. Association for Computational Linguistics, July 2010Google Scholar
  16. 16.
    Liebrecht, C.C., Kunneman, F.A., van Den Bosch, A.P.J.: The perfect solution for detecting sarcasm in tweets# not (2013)Google Scholar
  17. 17.
    Riloff, E., Qadir, A., Surve, P., De Silva, L., 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, pp. 704–714 (2013)Google Scholar
  18. 18.
    Liu, P., Chen, W., Ou, G., Wang, T., Yang, D., Lei, K.: Sarcasm detection in social media based on imbalanced classification. In: International Conference on Web-Age Information Management. Springer, Cham, pp. 459–471, June 2014CrossRefGoogle Scholar
  19. 19.
    Barbieri, F., Saggion, H., Ronzano, F.: Modelling sarcasm in Twitter, a novel approach. In: Proceedings of the 5th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, pp. 50–58 (2014)Google Scholar
  20. 20.
    Bharti, S.K., Babu, K.S., Jena, S.K.: Parsing-based sarcasm sentiment recognition in Twitter data. In: Proceedings of the 2015 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, pp. 1373–1380. ACM, August 2015Google Scholar
  21. 21.
    Bouazizi, M., Ohtsuki, T.O.: A pattern-based approach for sarcasm detection on twitter. IEEE Access 4, 5477–5488 (2016)CrossRefGoogle Scholar
  22. 22.
    Bamman, D., Smith, N.A.: Contextualized sarcasm detection on twitter. In: Ninth International AAAI Conference on Web and Social Media, April 2015Google Scholar
  23. 23.
    Amir, S., Wallace, B.C., Lyu, H., Silva, P.C.M.J.: Modelling context with user embeddings for sarcasm detection in social media. arXiv preprint arXiv:1607.00976 (2016)
  24. 24.
    Wang, Z., Wu, Z., Wang, R., Ren, Y.: Twitter sarcasm detection exploiting a context-based model. In: International Conference on Web Information Systems Engineering. Springer, Cham, pp. 77–91, November 2015Google Scholar
  25. 25.
    Abadi, M., Barham, P., Chen, J., Chen, Z., Davis, A., Dean, J., Kudlur, M.: Tensorflow: a system for large-scale machine learning. In: 12th {USENIX} Symposium on Operating Systems Design and Implementation ({OSDI} 16), pp. 265–283 (2016)Google Scholar
  26. 26.
    Ptáček, T., Habernal, I., Hong, J.: Sarcasm detection on czech and English Twitter. In: Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers, pp. 213–223 (2014)Google Scholar
  27. 27.
    Cambria, E., Poria, S., Bajpai, R., Schuller, B.: SenticNet 4: a semantic resource for sentiment analysis based on conceptual primitives. In: Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical papers, pp. 2666–2677 (2016)Google Scholar
  28. 28.
    Nielsen, F.Å.: A new ANEW: evaluation of a word list for sentiment analysis in microblogs. arXiv preprint arXiv:1103.2903 (2011)
  29. 29.
    Hu, M., Liu, B.: Mining and summarizing customer reviews. In: Proceedings of the Tenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 168–177. ACM, August 2004Google Scholar
  30. 30.
    Kumar, A., Rani, R.: Sentiment analysis using neural network. In: Next Generation Computing Technologies, 2nd International Conference on NGCT, pp. 262–267. IEEE, October 2016Google Scholar
  31. 31.
    Sharma, S.K., Hoque, X.: Sentiment predictions using support vector machines for odd-even formula in Delhi. Int. J. Intell. Syst. Appl. 9(7), 61 (2017)Google Scholar
  32. 32.
    Sharma, S.K., Chandra, P.: Constructive neural networks: a review. Int. J. Eng. Sci. Technol. 2(12), 7847–7855 (2010)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Department of Computer Science and EngineeringDelhi Technological UniversityDelhiIndia

Personalised recommendations