Skip to main content

Sarcasm Detection Technique on Twitter Data with Natural Language Processing

  • Conference paper
  • First Online:
Proceedings of International Conference on Big Data, Machine Learning and their Applications

Part of the book series: Lecture Notes in Networks and Systems ((LNNS,volume 150))

Abstract

Sarcasm is defined a form of irony that a user uses to express its feeling via social networking platforms such as Twitter or Facebook. Sarcasm can be used in different situations such as mockery or constructive criticism. Verbal sarcasm is rather easy to determine, but detecting sarcasm in the written text is equally difficult. Determining sarcasm in the text improves the sentiment analysis process and also the decision-making process. Sentiment analysis refers to the processing of determining the negative and positive emotions of the Internet user over a specific topic. The dataset used in this research is collected from Twitter via Web scrapping. Four machine learning algorithms such as linear SVC (accuracy = 83%, f1-score = 0.81), Naïve Bayes (accuracy = 74%, f1-score = 0.73), logistic regression (accuracy = 83%, f1-score = 0.81) and random forest classifier (accuracy = 80%, f1-score = 0.77) were implemented.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Aggrawal, N., & Arora, A. (2016). Vulnerabilities issues and melioration plans for online social network over Web 2.0. CDQM, An International Journal, 19(1), 66–73.

    Google Scholar 

  2. Global social media ranking 2019 | Statistic [Online]. Available: https://www.statista.com/statistics/272014/global-social-networks-ranked-by-number-of-users/. Accessed: March 08, 2020.

  3. Gelbukh, A. (2005). Natural language processing. In Fifth International Conference on Hybrid Intelligent Systems (HIS’05), Rio de Janeiro, Brazil, p. 1.

    Google Scholar 

  4. Wicana, S. G., & İbisoglu, T. Y., & Yavanoglu, U. (2017). A review on sarcasm detection from machine-learning perspective. In Proceedings of the International conference on Semantic Computing (pp. 469–476).

    Google Scholar 

  5. Forslid, E. (2015). Automatic irony- and sarcasm detection in social media.

    Google Scholar 

  6. Peng, C., Pan, J. W., Edu, C. S., & Edu, J. S. (2015). Detecting sarcasm in text: An obvious solution to a trivial problem.

    Google Scholar 

  7. Clews, P. (2017). Rudimentary lexicon based method for sarcasm, 5(4), 24–33.

    Google Scholar 

  8. Kumar, L., Somani, A., & Bhattacharyya, P. (2017). ‘Having 2 hours to write a paper is fun!’: Detecting sarcasm in numerical portions of text.

    Google Scholar 

  9. Vadivu, G., & Sindhu, C. S. (2018). A comprehensive study on sarcasm detection technique in sentiment analysis. International Journal of Pure and Applied Mathematics, 118(22), 433–442.

    Google Scholar 

  10. Ratawal, Y., & Tayal, D. (2018). A comprehensive study: Sarcasm detection in sentimental analysis. An International Scientific Journal, 113(October), 218–226.

    Google Scholar 

  11. Qaiser, S., & Ali, R. (2018). Text mining: Use of TF-IDF to examine the relevance of words to documents. International Journal of Computer Applications, 181(1), 25–29.

    Article  Google Scholar 

  12. Gurvir, K., & Parvinder, K. E. (2017). Novel approach to text classification by SVM-RBF kernel and linear SVC. International Journal of Advanced Research, 3, 2015–2018.

    Google Scholar 

  13. Kaviani, P., & Dhotre, S. (2017). Short survey on Naive Bayes algorithm. International Journal of Engineering Science Invention Research & Development, 4(11), 607–611.

    Google Scholar 

  14. Peng, C. Y. J., Lee, K. L., & Ingersoll, G. M. (2002). An introduction to logistic regression analysis and reporting. Journal of Educational Research, 96(1), 3–14.

    Article  Google Scholar 

  15. Klusowski, J. M. (2018). Analysis of a random forest model. Journal of Machine Learning Research, 13(2012), 1063–1095.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shubham Chaudhary .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chaudhary, S., Kakkar, M. (2021). Sarcasm Detection Technique on Twitter Data with Natural Language Processing. In: Tiwari, S., Suryani, E., Ng, A.K., Mishra, K.K., Singh, N. (eds) Proceedings of International Conference on Big Data, Machine Learning and their Applications. Lecture Notes in Networks and Systems, vol 150. Springer, Singapore. https://doi.org/10.1007/978-981-15-8377-3_24

Download citation

Publish with us

Policies and ethics