Generating Lyrics Using Constrained Random Walks on a Word Network

Žiga Babnik, Jasmina Pegan, Domen Kos, Lovro Šubelj


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.

Full Text:



Assonance rhyme definitions. Accessed: 06-06-2020.

Consonant rhyme definitions. Accessed: 06-06-2020.

Open ANC — Open American National Corpus. Accessed: 06-06-2020.

Perfect rhyme definition. Accessed: 06-06-2020.

Song Lyrics — Kaggle. 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.


Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.