đ EmoSense-ID: Indonesian Emotion Classifier
EmoSense-ID is a powerful model designed to precisely identify and analyze emotions in Indonesian texts. It leverages Plutchik's eight fundamental emotions, offering valuable insights into users' emotional responses on social media.
đ Quick Start
The widget section below provides real - world examples of how the EmoSense - ID model analyzes different Indonesian texts and outputs the corresponding emotional scores.
Example 1
- Text: How irresponsible it is to just throw garbage into the river like that. There are environmental activists who even end up in jail for speaking out about environmental concerns. This unemployed person actually finds it okay to litter randomly. No wonder you're having a hard time; your behavior is really bothering others.
- Output:
Label |
Score |
Disgust |
0.672 |
Anger |
0.282 |
Sadness |
0.033 |
Joy |
0.004 |
Surprise |
0.003 |
Trust |
0.003 |
Fear |
0.002 |
Anticipation |
0.001 |
Example 2
- Text: In February 2009, a journalist from Jawa Pos Radar Bali was brutally murdered because of a corruption report. In January 2019, the President granted clemency to the mastermind of the Prabangsa murder, reducing the sentence from life imprisonment to just 20 years. What a painful step backward!
- Output:
Label |
Score |
Sadness |
0.604 |
Anger |
0.194 |
Surprise |
0.127 |
Joy |
0.021 |
Fear |
0.018 |
Disgust |
0.018 |
Anticipation |
0.016 |
Trust |
0.003 |
Example 3
- Text: I'm really in awe of their life journey. If it's made into a movie, it'll definitely be a hit and super inspiring.
- Output:
Label |
Score |
Joy |
0.9637 |
Trust |
0.0219 |
Anticipation |
0.0079 |
Surprise |
0.0029 |
Disgust |
0.0013 |
Sadness |
0.0010 |
Anger |
0.0007 |
Fear |
0.0006 |
Example 4
- Text: I swear they must be freed!!! Why don't you just arrest the corruptors instead of dealing with AI memes? I'm so angry!
- Output:
Label |
Score |
Anger |
0.9889 |
Disgust |
0.0035 |
Sadness |
0.0026 |
Fear |
0.0015 |
Surprise |
0.0012 |
Trust |
0.0011 |
Anticipation |
0.0009 |
Joy |
0.0003 |
Example 5
- Text: I've never been in a relationship. Now I'm so lonely. I want my friends to introduce me to a guy, but they're also struggling. I really regret not dating during school and college.
- Output:
Label |
Score |
Sadness |
0.9526 |
Anger |
0.0175 |
Fear |
0.0114 |
Disgust |
0.0079 |
Trust |
0.0038 |
Anticipation |
0.0036 |
Joy |
0.0019 |
Surprise |
0.0013 |
Example 6
- Text: The Indonesian Broadcasting Commission (KPI) has requested that television broadcasts present a positive and educational image of the Indonesian National Police. This was stated by the Chairman of the Central KPI, Ubaidillah, in a panel discussion.
- Output:
Label |
Score |
Anticipation |
0.4323 |
Trust |
0.3996 |
Joy |
0.0500 |
Anger |
0.0388 |
Disgust |
0.0362 |
Surprise |
0.0186 |
Fear |
0.0137 |
Sadness |
0.0108 |
đ Documentation
Model Details
Model Description
The EmoSense - ID is a model crafted to identify and analyze emotions in Indonesian texts based on Plutchik's eight basic emotions: Anticipation, Anger, Disgust, Fear, Joy, Sadness, Surprise, and Trust. This model is developed using the [NusaBERT - base](https://huggingface.co/LazarusNLP/NusaBERT - base) and trained using Indonesian tweets categorized into eight emotion categories. The evaluation results of this model can be utilized to analyze emotions in social media, providing insights into users' emotional responses.
Bias
Keep in mind that this model is trained using certain data which may cause bias in the emotion classification process. Therefore, it is important to consider and account for such biases when using this model.
Evaluation Results
The model was trained using the Hyperparameter Tuning technique with Optuna. In this process, Optuna conducted five trials to determine the optimal combination of learning rate (1e - 6 to 1e - 4) and weight decay (1e - 6 to 1e - 2). Each trial trained the BERT model with different hyperparameter configurations on the training dataset and then evaluated using the validation dataset. After all the experiments are completed, the best hyperparameter combination is used to train the final model.
Epoch |
Training Loss |
Validation Loss |
Accuracy |
F1 |
Precision |
Recall |
1 |
0.758400 |
0.583508 |
0.829932 |
0.830203 |
0.833136 |
0.829932 |
2 |
0.370100 |
0.394630 |
0.866213 |
0.865496 |
0.870364 |
0.866213 |
3 |
0.231500 |
0.355294 |
0.884354 |
0.884585 |
0.888140 |
0.884354 |
4 |
0.071000 |
0.322376 |
0.902494 |
0.902801 |
0.904842 |
0.902494 |
5 |
0.129900 |
0.308596 |
0.900227 |
0.900340 |
0.902132 |
0.900227 |
đ License
This project is licensed under the MIT license.
đ Citation
@misc{Ardiyanto_Mikhael_2024,
author = {Mikhael Ardiyanto},
title = {EmoSense-ID},
year = {2024},
URL = {Aardiiiiy/EmoSense-ID-Indonesian-Emotion-Classifier},
publisher = {Hugging Face}
}