Emotion-Based Indonesian Song Retrieval Using BM25 and Sentence-BERT

Authors

  • Delely Rahmawati Hidayah Siliwangi University
  • Alam Rahmatulloh Siliwangi University

Keywords:

BM25, Emotion, Indonesian Song, Information Retrieval, Sentence-BERT

Abstract

Finding songs that align with specific emotional conditions can be challenging when searches rely solely on song titles, artist names, or limited keywords. This study develops a web-based information retrieval system for Indonesian songs that accepts natural-language descriptions of emotion and situation. The system combines BM25 for lexical matching and Sentence-BERT (SBERT) for semantic similarity, reinforced by a rule-based metadata prior to enhance contextual matching between search queries and each song's emotion and situation labels. Lyric text is preprocessed through case folding, text cleaning, tokenization, stopword removal, and Sastrawi stemming, while domain-thesaurus query expansion is applied to bridge vocabulary mismatch between user queries and song lyrics. The implementation utilizes 361 Indonesian songs distributed across four emotion classes and eight situation categories, with hybrid ranking weights assigned at 0.40 for BM25, 0.35 for SBERT, and 0.25 for metadata prior. Performance evaluation using Precision@5 across 10 natural-language queries demonstrates that BM25 achieves an average Precision@5 of 0.74, Sentence-BERT achieves 0.20, while the hybrid method achieves an average of 0.97. The resulting web interface enables users to retrieve the top five songs, examine detailed relevance score components, and read representative lyric snippets.

References

L. Xu, Z. Sun, X. Wen, Z. Huang, C. Chao, and L. Xu, “Using Machine Learning Analysis To Interpret The Relationship Between Music Emotion and Lyric Features,” PeerJ Comput. Sci., vol. 7, pp. 1–23, Nov. 2021, doi: 10.7717/peerj-cs.785.

H. Piliang and R. Kusumaningrum, “Music Emotion Classification Based on Indonesian Song Lyrics Using Recurrent Neural Network,” in 2019 3rd International Conference on Informatics and Computational Sciences (ICICoS), Semarang: IEEE, Oct. 2019, pp. 1–4. doi: 10.1109/ICICoS48119.2019.8982532.

A. S. Sams and A. Zahra, “Multimodal Music Emotion Recognition In Indonesian Songs Based On CNN-LSTM, Xlnet Transformers,” Bulletin of Electrical Engineering and Informatics, vol. 12, no. 1, pp. 355–364, Feb. 2023, doi: 10.11591/eei.v12i1.4231.

H. Sastypratiwi, H. Muhardi, and M. Noveanto, “Klasifikasi Emosi Pada Lirik Lagu Menggunakan Algoritma Multiclass SVM dengan Tuning Hyperparameter PSO,” JURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 6, no. 4, p. 2279, Oct. 2022, doi: 10.30865/mib.v6i4.4609.

A. Alfonso, F. Insani, O. Okfalisa, M. Fikry, F. Kurnia, and S. Wahyuni, “An Indobert-Based Framework for Emotion Classification In Indonesian Song Lyrics,” Science, Technology, and Communication Journal, vol. 6, no. 3, pp. 219–228, Jun. 2026, doi: 10.59190/stc.v6i3.372.

S. W. Aji, T. Setia Wicaksono, M. Yosep, and T. Sulistyono, “Sistem Pencarian dan Rekomendasi Musik dengan Analisis Lirik Lagu untuk Pengalaman Mendengarkan yang Lebih Personal Menggunakan Content-Based Filtering,” Semarang, Aug. 2025. Accessed: Sep. 19, 2026. [Online]. Available: https://doi.org/10.36040/mnemonic.v8i2.14879

M. V. Anggoro and M. Izzatillah, “Sistem Rekomendasi Musik dengan Metode Collaborative Filtering Berbasis Android,” Jakarta, Aug. 2022. Accessed: Sep. 19, 2026. [Online]. Available: http://dx.doi.org/10.30998/string.v7i1.10300

A. S. Koepke, A.-M. Oncescu, J. F. Henriques, Z. Akata, and S. Albanie, “Audio Retrieval with Natural Language Queries: A Benchmark Study,” IEEE Trans. Multimedia, vol. 14, pp. 1–11, Jan. 2022, doi: 10.1109/TMM.2022.3149712.

S. Robertson and H. Zaragoza, “The Probabilistic Relevance Framework: BM25 and Beyond,” Foundations and Trends® in Information Retrieval, vol. 4, no. 1–2, pp. 1–174, Sep. 2009, doi: 10.1561/1500000019.

A. Suparto, M. J. Clement, A. Rahman, and H. Irsyad, “Implementation of Preprocessing and Synonym Expansion for Indonesian News Retrieval System,” Journal of Software Engineering and Computational Intelligence, vol. 3, pp. 10–17, Jun. 2025, Accessed: Sep. 19, 2026. [Online]. Available: https://doi.org/10.36982/jseci.v3i01.5405

A. Y. Yulestiono, A. P. Sari, and A. Rakhmadi, “Evaluasi Hybrid Retrieval Berbasis Reciprocal Rank Fusion untuk Pencarian Informasi pada Dokumen Peraturan Daerah,” Prosiding Seminar Nasional Informatika Bela Negara, vol. 6, no. 1, pp. 148–153, Jul. 2026, doi: 10.33005/santika.v6i1.1233.

N. Reimers and I. Gurevych, “Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks,” in Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Stroudsburg, PA, USA: Association for Computational Linguistics, Nov. 2019, pp. 3980–3990. doi: 10.18653/v1/D19-1410.

N. Reimers and I. Gurevych, “Making Monolingual Sentence Embeddings Multilingual using Knowledge Distillation,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Stroudsburg, PA, USA: Association for Computational Linguistics, Nov. 2020, pp. 4512–4525. doi: 10.18653/v1/2020.emnlp-main.365.

A. B. Pratama, “Indonesian Song Lyric Emotion Dataset,” Kaggle.

H. K. Azad and A. Deepak, “Query expansion techniques for information retrieval: A survey,” arXiv Computer Science, Jun. 2019, doi: 10.1016/j.ipm.2019.05.009.

J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” in Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Stroudsburg, PA, USA: Association for Computational Linguistics, Jun. 2019, pp. 4171–4186. doi: 10.18653/v1/N19-1423.

Published

2026-11-30

How to Cite

Rahmawati Hidayah, D., & Rahmatulloh, A. (2026). Emotion-Based Indonesian Song Retrieval Using BM25 and Sentence-BERT. Infoman’s : Jurnal Ilmu-Ilmu Informatika Dan Manajemen, 20(2). Retrieved from http://ejournal.unsap.ac.id/index.php/infomans/article/view/3122

Issue

Section

Articles

Most read articles by the same author(s)

Obs.: This plugin requires at least one statistics/report plugin to be enabled. If your statistics plugins provide more than one metric then please also select a main metric on the admin's site settings page and/or on the journal manager's settings pages.