Understanding Public Sentiments on the 2024 Presidential Election through BERT-Powered Analysis

Social media platforms serve as dynamic communication across boundaries, with X serving as a platform for opinion exchange. This research examines public sentiment on the 2024 Indonesian Presidential Election to understand voter sentiments based on what happened during the pre-election. Using the Twitter API, 2,146 tweets were collected based on election-related keywords and hashtags, focusing on Indonesian-language tweets with direct opinions. The method that we use is data crawling using the Twitter API. Preprocessing steps included case folding (converting text to lowercase), cleansing (removing noise like URLs and emojis), tokenization, stemming (reducing words to base forms), and stop word removal (e.g., “yang,” “dan”). Slang was standardized with a custom dictionary to ensure consistency and accurate interpretation. Leveraging BERT for sentiment analysis, the model achieved 99% accuracy; results indicate that 93.1% of analyzed tweets expressed negative sentiment, highlighting public dissatisfaction about the 2024 presidential election. Hyperparameters are also tested to optimize model performances. With the best result accuracy in 99% using an 80:20 split ratio, with a batch size of 16 and a learning rate of 0.00001. This research underlines the importance of sentiment analysis in elections, demonstrating BERT’s capability to handle linguistic complexities and providing a methodological framework for analyzing social media data in political contexts.

Authors

Institutions

Publication Details

Journal
EDUMATIC Jurnal Pendidikan Informatika
Published
2025-04-11
DOI
https://doi.org/10.29408/edumatic.v9i1.29267
Primary Topic
Computational and Text Analysis Methods
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Understanding Public Sentiments on the 2024 Presidential Election through BERT-Powered Analysis

Warih Maharani, Abiyyu Daffa Haidar Setiawan
EDUMATIC Jurnal Pendidikan Informatika
Computational and Text Analysis Methods
article

Understanding Public Sentiments on the 2024 Presidential Election through BERT-Powered Analysis

Warih Maharani, Abiyyu Daffa Haidar Setiawan
article en

Abstract

Social media platforms serve as dynamic communication across boundaries, with X serving as a platform for opinion exchange. This research examines public sentiment on the 2024 Indonesian Presidential Election to understand voter sentiments based on what happened during the pre-election. Using the Twitter API, 2,146 tweets were collected based on election-related keywords and hashtags, focusing on Indonesian-language tweets with direct opinions. The method that we use is data crawling using the Twitter API. Preprocessing steps included case folding (converting text to lowercase), cleansing (removing noise like URLs and emojis), tokenization, stemming (reducing words to base forms), and stop word removal (e.g., “yang,” “dan”). Slang was standardized with a custom dictionary to ensure consistency and accurate interpretation. Leveraging BERT for sentiment analysis, the model achieved 99% accuracy; results indicate that 93.1% of analyzed tweets expressed negative sentiment, highlighting public dissatisfaction about the 2024 presidential election. Hyperparameters are also tested to optimize model performances. With the best result accuracy in 99% using an 80:20 split ratio, with a batch size of 16 and a learning rate of 0.00001. This research underlines the importance of sentiment analysis in elections, demonstrating BERT’s capability to handle linguistic complexities and providing a methodological framework for analyzing social media data in political contexts.

EDUMATIC Jurnal Pendidikan InformatikaVol. 9(1)
Telkom University (ID)
Openalex Percentile: Top 81%
Computational and Text Analysis Methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.