Generating Lyrics Using Constrained Random Walks on a Word Network

Authors

  • Žiga Babnik University of Ljubljana, Faculty of Computer and Information Science
  • Jasmina Pegan University of Ljubljana, Faculty of Computer and Information Science
  • Domen Kos University of Ljubljana, Faculty of Computer and Information Science
  • Lovro Šubelj University of Ljubljana, Faculty of Computer and Information Science

DOI:

https://doi.org/10.31449/inf.v48i1.3366

Abstract

In the paper we present an approach for automatic lyrics generation. From the American National Corpus of written texts we build a Word Network, which encodes wordsequences. Lyrics are then generated by performing a constrained random walk over the Word Network. The constraints include the structure of the generated sentence, the rhythm of the lines of the stanza or the rhymes of the stanza itself. Lyrics are generated using each constraint individually and also using all three constraints at the same time. We tested the single constraint strategies using a toy example, while the results of the joint strategy were subject to human review. While the given properties of the toy example, were kept in the results, replicating the toy example perfectly proved a difficult task. The results of the questionnaire showed that lack of a deeper meaning and strange capitalization were the main reasons that our results did not appear as though they were written by a human.

Author Biographies

  • Žiga Babnik, University of Ljubljana, Faculty of Computer and Information Science
    University of Ljubljana, Faculty of Computer and Information Science
    MSc student
  • Jasmina Pegan, University of Ljubljana, Faculty of Computer and Information Science
    University of Ljubljana, Faculty of Computer and Information Science
    MSc student
  • Domen Kos, University of Ljubljana, Faculty of Computer and Information Science
    University of Ljubljana, Faculty of Computer and Information Science
    MSc student
  • Lovro Šubelj, University of Ljubljana, Faculty of Computer and Information Science
    University of Ljubljana, Faculty of Computer and Information Science
    Assistant Professor
    Network Scientist

References

Assonance rhyme definitions. https://www.dictionary.com/browse/assonance. Accessed: 06-06-2020.

Consonant rhyme definitions. https://www.thefreedictionary.com/consonant+rhyme. Accessed: 06-06-2020.

Open ANC — Open American National Corpus. http://www.anc.org/data/oanc/. Accessed: 06-06-2020.

Perfect rhyme definition. https://www.collinsdictionary.com/dictionary/english/perfect-rhyme. Accessed: 06-06-2020.

Song Lyrics — Kaggle. https://www.kaggle.com/paultimothymooney/poetry. Accessed: 08-05-2020.

Barbieri, G., Pachet, F., Roy, P., and Degli Esposti, M. Markov Constraints for Generating Lyrics with Style. In Ecai(2012), vol. 242, pp. 115–120.

Cortes, C., and Vapnik, V. Support-vector networks. Machine learning 20, 3(1995), 273–297.

Oliveira, H. G. PoeTryMe: a versatile plat-form for poetry generation. Computational Creativity, Concept Invention and General Intelligence 1(2012), 21.

Oliveira, H. G. Tra-la-lyrics 2.0: Automatic generation of song lyrics on a semantic domain. Journal of Artificial General Intelligence 6, 1 (2015), 87–110.

Oliveira, H. G. A survey on intelligent poetry generation: Languages, features, techniques, reutilisation and evaluation. In Proceedings of the 10th International Conference on Natural Language Generation(2017), pp. 11–20.

Rumelhart, D. E., Hinton, G. E., and Williams, R. J. Learning internal representations by error propagation. Tech. rep., California Univ San Diego La Jolla Inst for Cognitive Science, 1985.

Downloads

Published

2024-01-31

Issue

Section

Student papers

How to Cite

Generating Lyrics Using Constrained Random Walks on a Word Network. (2024). Informatica, 48(1). https://doi.org/10.31449/inf.v48i1.3366