Classification of Emotion Based on Social Media Posting Patterns Using the BERT Method

The increasing use of social media such as X in Indonesia has led to a research focusing on analyzing users’ emotional expressions based on their tweets. However, the way expressing emotions in text is often a problem to identify and classify emotions accurately. This research use BERT to classify their emotions based on their tweets in Indonesian. This research collected 8,978 tweets across four emotion categories: happy, anger, sad, and fear. Data preprocessing technique use before the model start training the data, including case folding, cleansing, tokenization, normalization, stemming, and stopword removal were applied to ensure high-quality input for training. Various hyperparameters were tested to optimize model performance, with the best results accuracy is 77% using an 80-20 train-test split, batch size of 8, and learning rate of 0.00001. This research highlights the efficacy of BERT for emotion classification, overcoming challenges such as data imbalance and overfitting through early stopping and careful hyperparameter selection. The findings demonstrate the potential of sophisticated NLP models for interpreting complex human emotions in the context of social media.

Authors

Institutions

Publication Details

Published
2025-07-30
DOI
https://doi.org/10.1109/icoict66265.2025.11192966
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Classification of Emotion Based on Social Media Posting Patterns Using the BERT Method

Warih Maharani, Bintang Sujono
Sentiment Analysis and Opinion Mining
article

Classification of Emotion Based on Social Media Posting Patterns Using the BERT Method

Warih Maharani, Bintang Sujono
article en

Abstract

The increasing use of social media such as X in Indonesia has led to a research focusing on analyzing users’ emotional expressions based on their tweets. However, the way expressing emotions in text is often a problem to identify and classify emotions accurately. This research use BERT to classify their emotions based on their tweets in Indonesian. This research collected 8,978 tweets across four emotion categories: happy, anger, sad, and fear. Data preprocessing technique use before the model start training the data, including case folding, cleansing, tokenization, normalization, stemming, and stopword removal were applied to ensure high-quality input for training. Various hyperparameters were tested to optimize model performance, with the best results accuracy is 77% using an 80-20 train-test split, batch size of 8, and learning rate of 0.00001. This research highlights the efficacy of BERT for emotion classification, overcoming challenges such as data imbalance and overfitting through early stopping and careful hyperparameter selection. The findings demonstrate the potential of sophisticated NLP models for interpreting complex human emotions in the context of social media.

Telkom University (ID)
Openalex Percentile: Top 85%
Sentiment Analysis and Opinion Mining
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.