Classification of Sarcastic Tweets on Platform X Using Bidirectional Encoder Representations from Transformers

  • Rizal Akbar Fitrianto Teknik informatika, fakultas ilmu komputer, universitas nahdlatul ulama sidoarjo
  • Arda Surya Editya Teknik informatika, fakultas ilmu komputer, universitas nahdlatul ulama sidoarjo


X is a digital platform that facilitates the sharing of thoughts and criticisms through written content. A multitude of individuals and organizations depend on the perspectives or sentiments of the general populace while making decisions. Consumers generally rely on the viewpoints of other consumers when it comes to evaluating a product or service that they come across on social media sites. Through the surveillance of social media activity, companies that sell products and services can gain insight into the emotion expressed by consumers towards their offerings. Nevertheless, due to the limitations of writing, which lacks the ability to transmit nonverbal cues like gestures, facial expressions, and intonation, it is often challenging to identify implicit signs such as sarcasm. Sarcasm in a tweet can lead to an erroneous evaluation of the message's sentiment. Hence, it is crucial to conduct sarcasm detection, as it can greatly enhance the outcomes of sentiment analysis. This study assesses the efficacy of four transformer models, namely IndoBERT, RoBERTa, BERT, and BERT Multilingual, in detecting sarcasm in Indonesian on X platform. The experimental results demonstrate that the IndoBERT model, which has been specifically tailored for the task, gets an impressive F1-score of 95%.


Download data is not yet available.


Ritchie, H., Mathieu, E., Roser, M., & Ortiz-Ospina, E. (n.d.). Internet. Our World in Data.

Hakiki, G., & Ulfa, A. 2018. Perempuan dan laki-laki di Indonesia 2017.

X. 2022. Q4 and fiscal year 2021: Letter to shareholders.

Hancock, J. T., Landrigan, C., & Silver, C. 2007. Expressing emotion in text-based communication. ACM, 929–932. doi:10.1145/1240624.1240764

Filik, R., Turcan, A. T., Thompson, D., Harvey, N., Davies, H., & Turner, A. 2016. Sarcasm and emoticons: Comprehension and emotional impact. Quarterly Journal of Experimental Psychology, 69, 2130–2146. doi:10.1080/17470218.2015.1106566

Yunitasari, Y., Musdholifah, A., & Sari, A. K. 2019. Sarcasm detection for sentiment analysis in Indonesian tweets. IJCCS (Indonesian Journal of Computing and Cybernetics Systems), 13, 53. doi:10.22146/ijccs.41136

Bouazizi, M., & Ohtsuki, T. 2017. A pattern-based approach for multi-class sentiment analysis in Twitter. IEEE Access, 5, 20617–20639. doi:10.1109/ACCESS.2017.2740982

Sarsam, S. M., Al-Samarraie, H., Alzahrani, A. I., & Wright, B. 2020. Sarcasm detection using machine learning algorithms in Twitter: A systematic review. International Journal of Market Research, 62, 578–598. doi:10.1177/1470785320921779

Parmar, K., Limbasiya, N., & Dhamecha, M. 2018. Feature based composite approach for sarcasm detection using mapreduce. IEEE, 587–591. doi:10.1109/ICCMC.2018.8488096

Wang, Z., Wu, Z., & Wang, R. 2015. Twitter Sarcasm Detection Exploiting a Context-Based Model, 77–91. doi:10.1007/978-3-319-26190-46

Mukherjee, S., & Bala, P. K. 2017. Sarcasm detection in microblogs using na¨ıve bayes and fuzzy clustering. Technology in Society, 48, 19–27. doi:10.1016/j.techsoc.2016.10.003

Ren, Y., Ji, D., & Ren, H. 2018. Context-augmented convolutional neural networks for Twitter sarcasm detection. Neurocomputing, 308, 1–7. doi:10.1016/j.neucom.2018.03.047

Barbieri, F., & Saggion, H. 2014. Modelling irony in Twitter. Association for Computational Linguistics, 56–64. doi:10.3115/v1/E14-3007

Rahayu, D. A. P., Kuntur, S., & Hayatin, N. 2018. Sarcasm detection on Indonesian Twitter feeds. IEEE, 137–141. doi:10.1109/EECSI.2018.8752913

Son, L. H., Kumar, A., & Sangwan, S. R. 2019. Sarcasm detection using soft attention-based bidirectional long short-term memory model with convolution network. IEEE Access, 7, 23319–23328. doi:10.1109/ACCESS.2019.2899260

Ghosh, A., Li, G., Veale, T., Rosso, P., Shutova, E., Barnden, J., & Reyes, A. 2015. Semeval-2015 task 11: Sentiment analysis of figurative language in twitter. Association for Computational Linguistics, 470–478. doi:10.18653/v1/S15-2080

Majumder, N., Poria, S., Peng, H., Chhaya, N., Cambria, E., & Gelbukh, A. 2019. Sentiment and sarcasm classification with multitask learning. IEEE Intelligent Systems, 34, 38–43. doi:10.1109/MIS.2019.2904691

Mishra, A., & Bhattacharyya, P. 2018. Predicting Readers’ Sarcasm Understandability by Modeling Gaze Behavior, 99–115. doi:10.1007/978-981-13-1516-95

Wijaya, W., Murwantara, I. M., & Mitra, A. R. 2020. A simplified method to identify the sarcastic elements of bahasa indonesia in youtube comments. IEEE, 1–6. doi:10.1109/ICoICT49345.

Khotijah, S., Tirtawangsa, J., & Suryani, A. A. 2020. Using LSTM for context-based approach of sarcasm detection in Twitter. ACM, 1–7. doi:10.1145/3406601.3406624.

Handoyo, A. T., Rahman, H., Setiadi, C. J., & Suhartono, D. 2022. Sarcasm detection in Twitter - performance impact while using data augmentation: Word embeddings. International Journal of Fuzzy Logic and Intelligent Systems, 22(4), 401–413. doi:10.5391/IJFIS.2022.22.4.401.

Wu, et. all. Google’s Neural Machine Translation System: Bridging The Gap Between Human and Machine Translation.

Sudirjo, F., Diantoro, K., Al-Gasawneh, J. A., Azzaakiyyah, H. K., & Ausat, A. M. A. 2023. Application of ChatGPT in improving customer sentiment analysis for businesses. Jurnal Teknologi Dan Sistem Informasi Bisnis, 5(3), 283-288.

Guntara, R. G. 2023. Pemanfaatan google colab untuk aplikasi pendeteksian masker wajah menggunakan Algoritma Deep Learning YOLOv7. Jurnal Teknologi Dan Sistem Informasi Bisnis, 5(1), 55-60.

Pamungkas, M. R. S. P., Asyivadibrata, A., Susilawati, T., & Huda, M. N. 2023. Unleashing the Potentials of Artificial Intelligence for Micro, Small, and Medium Enterprises: A Systematic Literature Review. Jurnal Teknologi Dan Sistem Informasi Bisnis, 5(3), 303-310.

How to Cite
Fitrianto, R., & Editya, A. (2024). Classification of Sarcastic Tweets on Platform X Using Bidirectional Encoder Representations from Transformers. Jurnal Teknologi Dan Sistem Informasi Bisnis, 6(3), 366-371.