Sarcasm Detection For Sentiment Analysis in Indonesian Tweets

Yessi Yunitasari(1*), Aina Musdholifah(2), Anny Kartika Sari(3)

(1) Master Program of Computer Science; FMIPA UGM, Yogyakarta
(2) Department of Computer Science and Electronics, FMIPA UGM, Yogyakarta
(3) Department of Computer Science and Electronics, FMIPA UGM, Yogyakarta
(*) Corresponding Author


Twitter is one of the social medias that are widely used at the moment. Tweet conversations can be classified according to their sentiments. The existence of sarcasm contained in a tweet sometimes causes incorrect determination of the tweet’s sentiment because sarcasm is difficult to analyze automatically, even by humans. Hence, sarcasm detection needs to be conducted, which is expected to improve the results of sentiment analysis. The effect of sarcasm detection on sentiment analysis can be seen in terms of accuracy, precision and recall. In this paper, detection of sarcasm is applied to Indonesian tweets. The feature extraction of sarcasm detection uses unigram and 4 Boazizi feature sets which consist of sentiment-relate features, punctuation-relate features, lexical and syntactic features, and top word features. Detection of sarcasm uses the Random Forest algorithm. The feature extraction of sentiment analysis uses TF-IDF, while the classification uses Naïve Bayes algorithm. The evaluation shows that sentiment analysis with sarcasm detection improves the  accuracy of sentiment analysis about 5.49%. The accuracy of the model is 80.4%, while the precision is 83.2%, and the recall is 91.3%.


Naïve bayes;sarcasm;tweet;sentiment analysis;random forest

Full Text:



[1] Pandey, “Twitter-sentiment-analysis-using-hybrid-cuckoo-search-method”, Elsevier, 2017[Online].Available: [Accessed: 18-Agustus-2017]

[2] M. Bouazizi and T. Ohtsuki, “Sarcasm detection in twitter” IEEE. 1–6, 2015 [Online]. Available:[Accessed: 8-Nov-2017]

[3] Zhang and Gao., “Performance Analysis and Improvement of Naïve Bayes in Text Classification Application ” IEEE. 1–6, 2013 [Online]. Available:[Accessed: 8-Jan-2018]

[4] Maynard and Greenwood, “Who cares about Sarcastic Tweets? Investigating the Impact of Sarcasm on Sentiment Analysis.,” Lrec, pp. 4238–4243, 2014 [Online]. Available:[Accessed: 1-Jan-2018]

[5] E. Lunando and A. Purwarianti , “Indonesian social media sentiment analysis with sarcasm detection,” 2013 Int. Conf. Adv. Comput. Sci. Inf. Syst. ICACSIS 2013, pp. 195–198, 2013 [Online]. Available: Purwarianti/c82b544f6f43c69bd0b0bf58f4b963f6c4f31377 [Accessed: 23-Jan-2018]

[6] M. V. Datla, “Bench marking of classification algorithms: Decision Trees and Random Forests-a case study using R,” Int. Conf. Trends Autom. Commun. Comput. Technol. I-TACT 2015, 2016 [Online]. Available:[Accessed: 18-Nov-2018]

[7] Suswanto, “Analisis Perbandingan Metode Machine Learning untuk Prediksi Khasiat Jamu” , pp. 1–7, 2016 [Online]. Available: [Accessed: 15-Nov-2018]

[8] Fariz Prawira, “Pengaruh Pendeteksian Sarkasme Terhadap Ukuran Kualitas Analisis Sentimen Pada Twitter”, Jurusan Matematika FMIPA Universitas Gadjah Mada, Yogyakarta, 2017.

[9] C. Manning, P. Raghavan, and H. Schutze, “An Introduction to Information Retrieval,” Inf. Retr. Boston., no. c, pp. 1–18, 2009 [Online]. Available:[Accessed: 6-Okt-2017]

[10] M. Habibi, “Analisis Sentimen Dan Klasifikasi Komentar Mahasiswa Pada Sistem Evaluasi Pembelajaran Menggunakan Kombinasi Knn Berbasis Cosine Similarity Dan Supervised Model”, Tesis, Program Studi S2 Ilmu Komputer, Departemen Ilmu Komputer dan Elektronika, Fakultas Matematika dan Ilmu Pengetahuan Alam, Universitas Gadjah Mada Yogyakarta, 2017.


Article Metrics

Abstract views : 9075 | views : 6500


  • There are currently no refbacks.

Copyright (c) 2019 IJCCS (Indonesian Journal of Computing and Cybernetics Systems)

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright of :
IJCCS (Indonesian Journal of Computing and Cybernetics Systems)
ISSN 1978-1520 (print); ISSN 2460-7258 (online)
is a scientific journal the results of Computing
and Cybernetics Systems
A publication of IndoCEISS.
Gedung S1 Ruang 416 FMIPA UGM, Sekip Utara, Yogyakarta 55281
Fax: +62274 555133 |

View My Stats1
View My Stats2