Identifying Narrative Contexts in Brazilian Popular Music Lyrics Using Sparse Topic Models: A Comparison Between Human-Based and Machine-Based Classification

  • André Dalmora University of Campinas
  • Tiago Tavares University of Campinas


Music lyrics can convey a great part of the meaning in popular songs. Such meaning is important for humans to understand songs as related to typical narratives, such as romantic interests or life stories. This understanding is part of affective aspects that can be used to choose songs to play in particular situations. This paper analyzes the effectiveness of using text mining tools to classify lyrics according to their narrative contexts. For such, we used a vote-based dataset and several machine learning algorithms. Also, we compared the classification results to that of a typical human. Last, we compare the problems of identifying narrative contexts and of identifying lyric valence. Our results indicate that narrative contexts can be identified more consistently than valence. Also, we show that human-based classification typically do not reach a high accuracy, which suggests an upper bound for automatic classification. narrative contexts. For such, we built a dataset containing Brazilian popular music lyrics which were raters voted online according to its context and valence. We approached the problem using a machine learning pipeline in which lyrics are projected into a vector space and then classified using general-purpose algorithms. We experimented with document representations based on sparse topic models [11, 12, 13, 14], which aims to find groups of words that typically appear together in the dataset. Also, we extracted part-of-speech tags for each lyric and used their histogram as features in the classification process.

Palavras-chave: Computational Musicology, Music Information Retrieval


Thomas Scheff. What’s Love got to do with It? Emotions and Relationships in Popular Songs. Routledge, 2016.

Yi-Hsuan Yang and Homer H. Chen. Prediction of the distribution of perceived music emotions using discrete samples. IEEE Transactions on Audio, Speech, and Language Processing, 19(7):2184 – 2196, 2011.

Andrew H. Gregory. The Social Psychology of Music, chapter 7, pages 123–140. Oxford University Press, 1997.

Eduard Hanslick. On The Musically Beautiful. Hackett Publishing Company, 1986.

Lisa Feldman Barrett. The theory of constructed emotion: an active inference account of interoception and categorization. Social Cognitive and Affective Neuroscience, 12(1):1–23, 10 2016.

Yukiko Uchida, Sarah S. M. Townsend, Hazel Rose Markus, and Hilary B. Bergsieker. Emotions as within or between people? cultural variation in lay theories of emotion expression and inference. Personality and Social Psychology Bulletin, 35(11):1427–1439, 2009. PMID: 19745200.

Joseph Campbell. The hero with a thousand faces. New World Library, 2008.

C. G. Jung. The Archetypes and the Collective Unconscious. Princeton University Press, 1980.

Paula Dornhofer Paro Costa. Two-Dimensional Expressive Speech Animation. PhD dissertation, Universidade Estadual de Campinas - Faculdade de Engenharia Elétrica e de Computação, 2015.

James A Russell and Lisa Feldman Barrett. Core affect, prototypical emotional episodes, and other things called emotion: dissecting the elephant. Journal of personality and social psychology, 76(5):805, 1999.

Sanjeev Arora;Rong;Ankur Moitra. Learning topic models- going beyond SVD. CoRR, abs/1204.1956, 2012.

C. Jareanpon, W. Kiatjindarat, T. Polhome, and K. Khongkraphan. Automatic lyrics classification system using text mining technique. In 2018 International Workshop on Advanced Image Technology (IWAIT), pages 1–4, Jan 2018.

Y. Hu and M. Ogihara. Identifying accuracy of social tags by using clustering representations of song lyrics. In 2012 11th International Conference on Machine Learning and Applications, volume 1, pages 582–585, Dec 2012.

Swati Chauhan;Prachi Chauhan. Music mood classification based on lyrical analysis of hindi songs using latent dirichlet allocation. 2016 International Conference on Information Technology (InCITe) - The Next Generation IT Summit on the Theme - Internet of Things: Connect your Worlds, pages 72–76, 2016.

Stuti Shukla;Pooja Khanna;Krishna Kant Agrawal. Review on sentiment analysis on music. 2017 International Conference on Infocom Technologies and Unmanned Systems (Trends and Future Directions) (ICTUS), pages 777–780, 2017.

Lili Nurliyana Abdullah Teh Chao Ying, Shyamala Doraisamy. Genre and mood classification using lyric features. 2012 International Conference on Information Retrieval & Knowledge Management, pages 260–263, 2012.

Felipe S. Tanios;Tiago F. Tavares. Impact of genre in the prediction of perceived emotions in music. 16th Brazilian

Symposium on Computer Music, 2017. 17th Brazilian Symposium on Computer Music - SBCM 2019

J.D. Rajaraman, A.;Ullman. Data mining. In Mining of Massive Datasets, pages 1–17. Cambridge University Press, 2011.
Como Citar

Selecione um Formato
DALMORA, André; TAVARES, Tiago. Identifying Narrative Contexts in Brazilian Popular Music Lyrics Using Sparse Topic Models: A Comparison Between Human-Based and Machine-Based Classification. In: SIMPÓSIO BRASILEIRO DE COMPUTAÇÃO MUSICAL (SBCM), 17. , 2019, São João del-Rei. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2019 . p. 17-21. DOI: