Analisis Emosi dalam Lirik Lagu menggunakan Natural Language Processing
Original Full-Text Article
Download published version for reading and archivingAbstract
Music is a universal medium for expressing emotions, with song lyrics serving as a narrative component rich in affective content. This study aims to analyze the emotional landscape within popular English song lyrics collected from the Spotify platform and to examine the effectiveness of Natural Language Processing (NLP) approaches in classifying these emotions. The research corpus consists of 57,494 randomly collected song lyrics without genre restrictions. Through a comprehensive analytical pipeline---ranging from text preprocessing (case folding, normalization, cleaning, tokenization, filtering, stemming), custom lexicon-based emotion labeling, TF-IDF feature extraction, to classification using a Random Forest model---the study reveals two key findings. Empirically, song lyrics are dominated by positive emotions, with romantic (36.2%) and happy (26.2%) emerging as the main themes, followed by sad (16.3%), while angry expressions (4.4%) appear least frequently, indicating significant class imbalance. Methodologically, the proposed model demonstrates solid performance with an overall accuracy of 83.03% and a weighted avg F1 score of 0.82. However, analysis of the confusion matrix and classification report uncovers performance disparities across emotion classes: angry and energetic emotions exhibit low recall (42% and 62%, respectively), likely due to imbalanced data distribution and lexicon limitations in capturing context. In conclusion, this study not only succeeds in mapping the dominance of love- and happiness-related themes in popular song lyrics but also demonstrates that classical NLP models can achieve competitive performance. The findings additionally highlight the importance of addressing class imbalance and developing more context-rich emotion lexicons or employing deep learning models in future research, in order to capture the emotional spectrum of lyrics more evenly and comprehensively.
Keywords:
Author Biographies
Program Studi Teknik Informatika, Fakultas Teknologi Informasi, Universitas Kristen Satya Wacana, Kota Salatiga, Provinsi Jawa Tengah, Indonesia.
Program Studi Teknik Informatika, Fakultas Teknologi Informasi, Universitas Kristen Satya Wacana, Kota Salatiga, Provinsi Jawa Tengah, Indonesia.
How to Cite
This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International License .
- Share: You are free to copy, distribute, and transmit the work in any medium or format.
- Adapt: You are free to remix, transform, and build upon the work for any purpose, even commercially.
- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
References
Total: 19 References- Abdillah, J., Asror, I., & Wibowo, Y. F. A. (2020). Emotion classification of song lyrics using Bidirectional LSTM method. Resti Journal, 4(4), 723–729. https://doi.org/10.29207/resti.v4i4.2156.
- Akaishi, J., Sakata, M., Yoshinaga, J., Nakano, M., Koshi, K., & Kiyota, K. (2022). Estimating the emotional information in Japanese songs using search engines. Sensors, 22(5), 1–11. https://doi.org/10.3390/s22051800.
- Ara, A., & Rekha, V. (2024). Enhancing music emotion classification using multi-feature approach. International Journal of Advanced Computer Science and Applications (IJACSA), 15(9), 794–803. https://doi.org/10.14569/IJACSA.2024.0150981.
- Ardianti, I. A. P. G., Andriyani, A. A. A. D., & Swabawa, I. B. M. S. (2023). Discourse analysis on Jiwa yang Bersedih song lyrics. Lire Journal (Journal of Linguistics and Literature), 7(2), 290–300. https://doi.org/10.33019/lire.v7i2.227.
- Bužić, D., & Dobša, J. (2025). Emotions in Eurovision Song Contest lyrics. 2025 MIPRO 48th ICT and Electronics Convention, 137–142. https://doi.org/10.1109/MIPRO65660.2025.11131930.
Similar Articles
Articles sharing related keywords and machine learning classifications: