Comparison ff Sentiment Labeling Using Textblob, Vader, and Flair in Public Opinion Analysis Post-2024 Presidential Inauguration with IndoBERT

Authors

  • Kusnawi Informatics, Computer Science Faculty, Universitas Amikom Yogyakarta, Indonesia
  • Khoerul Anam Informatics, Computer Science Faculty, Universitas Amikom Yogyakarta, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2025.6.2.4015

Keywords:

Flair, IndoBERT, Presidential Election, Sentimen Analysis, Textblob, Vader

Abstract

The results of the 2024 Indonesian presidential election decided that Prabowo Subianto and Gibran Rakabuming Raka became the elected pair of Indonesian presidential and vice-presidential candidates in 2024. The pair's election triggered various public reactions, especially on social media platforms. Some social media platforms provided diverse opinions, indicating a wide variety of views on this issue. This research aims to analyze public opinion after the election of the 2024 Indonesian president by comparing sentiment using TextBlob, VADER (Valence Aware Dictionary and sEntiment Reasoner), and Flair. Training and testing are done with the IndoBERT model to determine the most effective sentiment labeling. This research starts by collecting text data from social media X, YouTube, and Instagram, then preprocessing, translating, and labeling data using three libraries, training, and testing using IndoBERT. The results of training and testing data show that Flair has an accuracy of 81.29%, TextBlob has an accuracy of 73.35%, and VADER has an accuracy of 74.86%. From the accuracy results obtained, it can be concluded that labeling using Flair provides the greatest accuracy of the others because the Flair labeling process uses deep learning and contextual embedding techniques.

Downloads

Download data is not yet available.

References

[1] Zulham, “Communication of Political Identity & Indonesian Presidential Candidacy in the 2024 Election,” Int. J. Humanit. Soc. Stud., vol. 11, no. 1, pp. 60–63, 2023, doi: 10.24940/theijhss/2023/v11/i1/hs2301-014.
[2] E. Konovalova, G. Le Mens, and N. Schöll, “Social media feedback and extreme opinion expression,” PLoS One, vol. 18, no. 11 November, pp. 1–12, 2023, doi: 10.1371/journal.pone.0293805.
[3] A. ELHAN, M. K. D. HARDHIENATA, H. YENI, S. WIJAYA HARTONO, and J. ADISANTOSO, “Analisis Sentimen Pengguna Twitter terhadap Vaksinasi COVID-19 di Indonesia menggunakan Algoritme Random Forest dan BERT Sentiment Analysis of Twitter Users on COVID-19 Vaccines in Indonesia using Random Forest and BERT Algorithms,” J. Ilmu Komput. Agri-informatika, vol. 9, no. 2, pp. 199–211, 2022, doi: https://doi.org/10.29244/jika.9.2.199-211.
[4] S. T. Kokab, S. Asghar, and S. Naz, “Transformer-based deep learning models for the sentiment analysis of social media data,” Array, vol. 14, no. October 2021, p. 100157, 2022, doi: 10.1016/j.array.2022.100157.
[5] P. K. Rangarjan et al., “The social media sentiment analysis framework: deep learning for sentiment analysis on social media,” Int. J. Electr. Comput. Eng., vol. 14, no. 3, pp. 3394–3405, 2024, doi: 10.11591/ijece.v14i3.pp3394-3405.
[6] U. Pathak and E. P. Rai, “Sentiment Analysis : Methods , Applications , and,” Int. J. Res. Appl. Sci. Eng. Technol., vol. 11, no. February, 2023, doi: 10.22214/ijraset.2023.49165.
[7] M. Mikula, X. Gao, and M. Mach, “Lexicon-based Sentiment Analysis Using the Particle Swarm Optimization,” J. Electron., pp. 1–22, 2020, doi: https://doi.org/10.3390/electronics9081317.
[8] M. Kalaiarasu and C. Ranjeeth Kumar, “Sentiment Analysis using Improved Novel Convolutional Neural Network (SNCNN),” Int. J. Comput. Commun. Control, vol. 17, no. 2, pp. 1–15, 2022, doi: 10.15837/ijccc.2022.2.4351.
[9] D. J. Hussein, M. N. Rashad, K. I. Mirza, and D. L. Hussein, “Machine Learning Approach to Sentiment Analysis in Data Mining,” Passer J. Basic Appl. Sci., vol. 4, no. 1, pp. 71–77, 2022, doi: 10.24271/psr.2022.312664.1101.
[10] N. G. Ramadhan, M. Wibowo, N. F. L. Mohd Rosely, and C. Quix, “Opinion mining indonesian presidential election on twitter data based on decision tree method,” J. Infotel, vol. 14, no. 4, pp. 243–248, 2022, doi: 10.20895/infotel.v14i4.832.
[11] B. M. Alenzi, M. B. Khan, M. H. A. Hasanat, A. K. J. Saudagar, M. Alkhathami, and A. Altameem, “Automatic Annotation Performance of TextBlob and VADER on Covid Vaccination Dataset,” Intell. Autom. Soft Comput., vol. 34, no. 2, pp. 1311–1331, 2022, doi: 10.32604/iasc.2022.025861.
[12] P. Sivalakshmi, P. U. Kumar, M. Vasanth, R. Srinath, and M. Yokesh, “COVID-19 Vaccine –Public Sentiment Analysis Using Python’s Textblob Approach,” Int. J. Curr. Res. Rev., vol. 13, no. 11, pp. 166–172, 2021, doi: 10.31782/ijcrr.2021.sp218.
[13] A. Prof and P. Gujjar, “Sentiment Analysis : Textblob For Decision Making Department of Business Analytics,” Int. J. Sci. Res. Eng. Trends, vol. 7, no. 2, pp. 1097–1099, 2021.
[14] E. Rosenberg et al., “Results in Engineering Sentiment analysis on Twitter data towards climate action,” Results Eng., vol. 19, no. June, p. 101287, 2023, doi: 10.1016/j.rineng.2023.101287.
[15] D. A. Darji and S. A. Goswami, “The Comparative study of Python Libraries for Natural Language Processing ( NLP ),” 2024.
[16] U. Bert, P. Shah, H. Patel, and P. Swaminarayan, “EAI Endorsed Transactions Multitask Sentiment Analysis and Topic Classification,” EAI Endorsed Trans. Scalable Inf. Syst., pp. 1–12, doi: doi: 10.4108/eetsis.5287.
[17] A. S. Alammary, “applied sciences BERT Models for Arabic Text Classification : A Systematic Review,” J. Appl. Sci., pp. 1–20, 2022, doi: https://doi.org/10.3390/app12115720.
[18] V. Fitriyana, L. Hakim, D. Candra, R. Novitasari, and A. Hanif, “Analisis Sentimen Ulasan Aplikasi Jamsostek Mobile Menggunakan Metode Support Vector Machine,” J. Buana Inform., vol. 14, no. April, pp. 40–49, 2023, doi: https://doi.org/10.24002/jbi.v14i01.6909.
[19] D. Rifaldi, A. Fadlil, and Herman, “Teknik Preprocessing Pada Text Mining Menggunakan Data Tweet ‘Mental Health,’” Decod. J. Pendidik. Teknol. Inf., vol. 3, no. 2, pp. 161–171, 2023, doi: http://dx.doi.org/10.51454/decode.v3i2.131.
[20] K. Kusnawi and A. H. Wijaya, “Sentiment Analysis of Pancasila Values in Social Media Life Using the Naive Bayes Algorithm,” in 2021 International Seminar on Application for Technology of Information and Communication (iSemantic), Semarangin, Indonesia, 2021, pp. 96–101. doi: 10.1109/iSemantic52711.2021.9573194.
[21] K. U. Chouhan, R. S. Jha, N. Pradeep, K. Jha, and S. I. Kamaluddin, “Legal Document Analysis,” Int. J. Res. Appl. Sci. Eng. Technol., vol. 11, no. IV, 2023, doi: https://doi.org/10.22214/ijraset.2023.50123.
[22] A. Muzaki and A. Witanti, “SENTIMENT ANALYSIS OF THE COMMUNITY IN THE TWITTER TO THE 2020 ELECTION IN PANDEMIC COVID-19 BY METHOD NAIVE BAYES CLASSIFIER SENTIMEN ANALISIS MASYARAKAT DI TWITTER TERHADAP PILKADA 2020 DITENGAH PANDEMIC COVID-19 DENGAN METODE NA Í VE BAYES CLASSIFIER,” J. Tek. Inform., vol. 2, no. 2, pp. 101–107, 2021, doi: 10.20884/1.jutif.2021.2.2.51.
[23] A. C. Khotimah et al., “COMPARISON NAÏVE BAYES CLASSIFIER , K-NEAREST NEIGHBOR AND SUPPORT VECTOR MACHINE IN THE CLASSIFICATION OF INDIVIDUAL ON PERBANDINGAN ALGORITMA NAÏVE BAYES CLASSIFIER , K-NEAREST NEIGHBOR DAN SUPPORT VECTOR MACHINE DALAM KLASIFIKASI,” J. Tek. Inform., vol. 3, no. 3, pp. 673–680, 2022, doi: DOI: https://doi.org/10.20884/1.jutif.2022.3.3.254.
[24] R. Puspitasari, Y. Findawati, M. A. Rosid, I. S. Program, and U. M. Sidoarjo, “SENTIMENT ANALYSIS OF POST-COVID-19 INFLATION BASED ON TWITTER USING THE K-NEAREST NEIGHBOR AND SUPPORT VECTOR MACHINE ANALISIS SENTIMEN TERHADAP INFLASI PASCA COVID-19 BERDASARKAN TWITTER DENGAN METODE KLASIFIKASI K-NEAREST NEIGHBOR DAN,” J. Tek. Inform., vol. 4, no. 4, pp. 669–679, 2023, doi: https://doi.org/10.52436/1.jutif.2023.4.4.801.
[25] R. Sistem, I. M. S. Putra, P. Jhonarendra, N. Kadek, and D. Rusjayanthi, “Deteksi Kesamaan Teks Jawaban pada Sistem Test Essay Online dengan Pendekatan Neural Network,” J. RESTI (Rekayasa Sist. Dan Teknol. Inf., vol. 5, no. 158, pp. 3–12, 2021, doi: https://doi.org/10.29207/resti.v5i6.3544.
[26] K. Makkar, P. Kumar, M. Poriye, and S. Aggarwal, “Improving Sentiment Analysis using Negation Scope Detection and Negation Handling,” Int. J. Comput. Digit. Syst., vol. 1, no. 1, pp. 239–247, 2024, doi: http://dx.doi.org/10.12785/ijcds/160119.
[27] D. Hazarika, G. Konwar, and S. Deb, “Sentiment Analysis on Twitter by Using TextBlob for Natural Language Processing,” Proc. Int. Conf. Res. Manag. Technovation, vol. 24, pp. 63–67, 2020, doi: 10.15439/2020KM20.
[28] S. Dewi and D. B. Arianto, “TWITTER SENTIMENT ANALYSIS TOWARDS QATAR AS HOST OF THE 2022 WORLD CUP USING TEXTBLOB,” J. Soc. Res., no. 2018, pp. 443–454, 2022, doi: https://doi.org/10.55324/josr.v2i2.615.
[29] M. Arief and N. A. Samsudin, “Hybrid Approach with VADER and Multinomial Logistic Regression for Multiclass Sentiment Analysis in Online Customer Review,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 12, pp. 311–320, 2023, doi: https://doi.org/10.3390/s23010506.
[30] T. Pano and R. Kashef, “A Complete VADER-Based Sentiment Analysis of Bitcoin ( BTC ) Tweets during the Era of COVID-19,” 2020, doi: https://doi.org/10.3390/bdcc4040033.
[31] G. B. Herwanto, A. M. Ningtyas, I. G. Mujiyatna, and I. Nyoman, “Hate Speech Detection in Indonesian Twitter using Contextual Embedding Approach,” IJCCS (Indonesian J. Comput. Cybern. Syst., vol. 15, no. 2, 2021, doi: 10.22146/ijccs.64916.
[32] M. F. Ali, R. Irfan, and T. A. Lashari, “Comprehensive sentimental analysis of tweets towards COVID-19 in Pakistan : a study on governmental preventive measures,” PeerJ Comput. Sci., 2023, doi: 10.7717/peerj-cs.1220.
[33] A. Fadlil, I. Riadi, and F. Andrianto, “Improving Sentiment Analysis in Digital Marketplaces through SVM Kernel Fine-Tuning,” Int. J. Comput. Digit. Syst., vol. 1, no. 1, 2024, doi: http://dx.doi.org/10.12785/ijcds/160113.
[34] E. Yulianti and N. K. Nissa, “ABSA of Indonesian customer reviews using IndoBERT : single- sentence and sentence-pair classification approaches,” vol. 13, no. 5, pp. 3579–3589, 2024, doi: 10.11591/eei.v13i5.8032.
[35] M. F. Cahyadi and T. H. Rochadiani, “Implementasi Ensemble Deep Learning Untuk Analisis Sentimen Terhadap Genre Game Mobile,” vol. 8, pp. 1512–1523, 2025, doi: 10.30865/mib.v8i3.7832.
[36] Kusnawi, M. Rahardi, and V. D. Pandiangan, “Sentiment Analysis of Neobank Digital Banking Using Support Vector Machine Algorithm in Indonesia,” Int. J. INFORMATICS Vis., vol. 7, no. June, pp. 377–383, 2023, doi: http://dx.doi.org/10.30630/joiv.7.2.1652.
[37] M. Özel and Ö. Çetinkaya Bozkurt, “Sentiment Analysis on GPT-4 with Comparative Models Using Twitter Data,” Acta Infologica, vol. 0, no. 0, pp. 0–0, 2024, doi: 10.26650/acin.1418834.
[38] E. Miranda, V. Gabriella, S. A. Wahyudi, and J. Chai, “Text Classification untuk Menganalisis Sentimen Pendapat Masyarakat Indonesia terhadap Vaksinasi Covid - 19 Text Classification for Analysing Indonesian People ’ s Opinion Sentiment for,” J. Sist. Inf., vol. 12, pp. 438–451, 2023, [Online]. Available: http://sistemasi.ftik.unisi.ac.id
[39] O. Bellar, A. Baina, and M. Bellafkih, “Sentiment Analysis of Tweets on Social Issues Using Machine Learning Approach,” Proc. - 2023 Int. Conf. Digit. Age Technol. Adv. Sustain. Dev. ICDATA 2023, vol. 9, no. 4, pp. 126–131, 2023, doi: 10.1109/ICDATA58816.2023.00031.
[40] M. F. Mushtaq, M. M. S. Fareed, M. Almutairi, S. Ullah, G. Ahmed, and K. Munir, “Analyses of Public Attention and Sentiments towards Different COVID-19 Vaccines Using Data Mining Techniques,” Vaccines, vol. 10, no. 5, 2022, doi: 10.3390/vaccines10050661.
[41] S. Marrapu, W. Senn, and V. Prybutok, “Sentiment Analysis of Twitter Discourse on Omicron Vaccination in the USA Using VADER and BERT,” J. Data Sci. Intell. Syst., vol. 00, no. January, pp. 1–11, 2024, doi: 10.47852/bonviewjdsis42022441.
[42] F. Illia et al., “Sentiment Analysis on PeduliLindungi Application Using TextBlob and VADER Library,” Proc. Int. Conf. Data Sci. Off. Stat., no. 64, pp. 278–288, 2021, doi: https://doi.org/10.34123/icdsos.v2021i1.236.
[43] P. Rajkhowa et al., “Factors Influencing Monkeypox Vaccination : A Cue to Policy Implementation,” J. Epidemiol. Glob. Health, vol. 13, no. 2, pp. 226–238, 2023, doi: 10.1007/s44197-023-00100-9.
[44] Y. Asri, W. N. Suliyanti, D. Kuswardani, and M. Fajri, “Pelabelan Otomatis Lexicon Vader dan KlasifikasAsri, Y., Suliyanti, W. N., Kuswardani, D., & Fajri, M. (2022). Pelabelan Otomatis Lexicon Vader dan Klasifikasi Naive Bayes dalam menganalisis sentimen data ulasan PLN Mobile. PETIR, 15(2), 264–275. https://,” Petir, vol. 15, no. 2, pp. 264–275, 2022.
[45] A. A. Arifiyanti, D. S. Y. Kartika, and C. J. Prawiro, “Using Pre-Trained Models for Sentiment Analysis in Indonesian Tweets,” Proc. - Int. Conf. Informatics Comput. Sci., vol. 2022-September, no. February, pp. 78–83, 2022, doi: 10.1109/ICICoS56336.2022.9930599.
[46] J. Maqbool, P. Aggarwal, R. Kaur, A. Mittal, and I. Ali, “ScienceDirect ScienceDirect Stock Prediction by Integrating Sentiment Scores of Financial News and MLP-Regressor : A Machine Learning Approach,” Elsevier, vol. 218, pp. 1067–1078, 2023.

Additional Files

Published

2025-04-26

How to Cite

[1]
K. Kusnawi and K. . Anam, “Comparison ff Sentiment Labeling Using Textblob, Vader, and Flair in Public Opinion Analysis Post-2024 Presidential Inauguration with IndoBERT”, J. Tek. Inform. (JUTIF), vol. 6, no. 2, pp. 803–818, Apr. 2025.