Classification of Multiple Emotions in Indonesian Text Using The K-Nearest Neighbor Method - Ahmad Zamsuri; Sarjon Defit; Gunadi Widi Nurcahyo (Journal of Applied Engineering and Technological Science (JAETS), 2023)
Emotions are expressions manifested by individuals in response to what they see or experience. In this study, emotions were examined through individuals' tweets regarding the election issues in Indonesia in 2024. The collected tweets were then labeled based on emotions using the emotion wheel, which consisted of six categories: joy, love, surprise, anger, fear, and sadness. After the labeling process, the next step involved weighting using TF-IDF (Term Frequency-Inverse Document Frequency) and Bag-of-Words (BoW) techniques. Subsequently, the model was evaluated using the K-Nearest Neighbor (KNN) algorithm with three different data splitting ratios: 80:20, 70:30, and 60:40. From the six labels used in the modeling process, the accuracy was then calculated, and the labels were subsequently merged into positive and negative categories. Then the modeling was conducted using the same process with the six labels. The results of this study revealed that the utilization of TF-IDF outperformed BoW. The highest accuracy was achieved with the 80:20 data splitting ratio, attaining 58% accuracy for the six-label classification and 79% accuracy for the two-label classification