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
- Warih Maharani (ORCID: https://orcid.org/0000-0003-1574-921X)
- Bintang Sujono
Institutions
- Telkom University (ID)
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