Markov Text Generator for Basque Poetry

  • Aitzol Astigarraga
  • José María Martínez-OtzetaEmail author
  • Igor Rodriguez
  • Basilio Sierra
  • Elena Lazkano
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10415)


Poetry generation is a challenging field in the area of natural language processing. A poem is a text structured according to predefined formal rules and whose parts are semantically related. In this work we present a novel automated system to generate poetry in Basque language conditioned by non-local constraints. From a given corpus two Markov chains representing forward and backward 2-grams are built. From these Markov chains and a semantic model, a system able to generate poems conforming a given metric and following semantic cues has been designed. The user is prompted to input a theme for the poem and also a seed word to start the generating process. The system produces several poems in less than a minute, enough for using it in live events.


Poetry generation Basque language N-grams 



This paper has been supported by the Spanish Ministerio de Economía y Competitividad, contract TIN2015-64395-R (MINECO/FEDER, UE), as well as by the Basque Government, contract IT900-16. The authors gratefully acknowledge Bertsozale Elkartea (Association of the Friends of Bertsolaritza), whose verse corpora has been used to test and develop the proposed method.


  1. 1.
    Amuriza, X.: Hiztegi Errimatua. Lanku (1981)Google Scholar
  2. 2.
    Astigarraga, A., Jauregi, E., Lazkano, E., Agirrezabal, M.: Textual coherence in a verse-maker robot. In: Hippe, Z.S., Kulikowski, J.L., Mroczek, T., Wtorek, J. (eds.) Human-Computer Systems Interaction: Backgrounds and Applications 3. AISC, vol. 300, pp. 275–287. Springer, Cham (2014). doi: 10.1007/978-3-319-08491-6_23 Google Scholar
  3. 3.
    Astigarraga, A., Agirrezabal, M., Lazkano, E., Jauregi, E., Sierra, B.: Bertsobot: the first minstrel robot. In: 2013 The 6th International Conference on Human System Interaction (HSI), pp. 129–136. IEEE (2013)Google Scholar
  4. 4.
    Barbieri, G., Pachet, F., Roy, P., Esposti, M.D.: Markov constraints for generating lyrics with style. In: Proceedings of the 20th European Conference on Artificial Intelligence, pp. 115–120. IOS Press (2012)Google Scholar
  5. 5.
    Cardoso, A., Veale, T., Wiggins, G.A.: Converging on the divergent: the history (and future) of the international joint workshops in computational creativity. AI Mag. 30(3), 15 (2009)CrossRefGoogle Scholar
  6. 6.
    Das, A., Gambäck, B.: Poetic machine: computational creativity for automatic poetry generation in bengali. In: 5th International Conference on Computational Creativity, ICCC (2014)Google Scholar
  7. 7.
    Deerwester, S., Dumais, S.T., Furnas, G.W., Landauer, T.K., Harshman, R.: Indexing by latent semantic analysis. J. Am. Soc. Inf. Sci. 41(6), 391 (1990)CrossRefGoogle Scholar
  8. 8.
    Egaña, A.: The process of creating improvised bertsos. Oral Tradit. 22(2), 117–142 (2007)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Garzia, J., Sarasua, J., Egaña, A.: The art of bertsolaritza: improvised Basque verse singing. Bertsolari liburuak (2001)Google Scholar
  10. 10.
    Gervás, P.: Computational modelling of poetry generation. In: Artificial Intelligence and Poetry Symposium, AISB Convention 2013. The Society for the Study of Artificial Intelligence and the Simulation of Behaviour, University of Exeter, United Kingdom (2013)Google Scholar
  11. 11.
    Gervás, P.: Deconstructing computer poets: making selected processes available as services. Comput. Intell. 33(1), 3–31 (2015)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Gervás, P.: Constrained creation of poetic forms during theme-driven exploration of a domain defined by an N-gram model. Connection Sci. 28(2), 111–130 (2016)CrossRefGoogle Scholar
  13. 13.
    Jauregi, O.: Euskal testuetako silaba egituren maiztasuna diakronikoki. Anuario del Seminario de Filología Vasca “Julio de Urquijo” 37(1), 393–410 (2013)Google Scholar
  14. 14.
    Jurafsky, D., James, H.: Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition. Prentice Hall, Upper Saddle River (2000)Google Scholar
  15. 15.
    Lamb, C., Brown, D.G., Clarke, C.L.: A taxonomy of generative poetry techniques. In: Bridges Finland Conference Proceedings, pp. 195–202 (2016)Google Scholar
  16. 16.
    Langkilde, I., Knight, K.: Generation that exploits corpus-based statistical knowledge. In: Proceedings of the 36th Annual Meeting of the Association for Computational Linguistics and 17th International Conference on Computational Linguistics, vol. 1, pp. 704–710. Association for Computational Linguistics (1998)Google Scholar
  17. 17.
    Lord, A.B., Mitchell, S.A., Nagy, G.: The Singer of Tales, vol. 24. Harvard University Press, Cambridge (2000)Google Scholar
  18. 18.
    Manning, C.D., Schütze, H., et al.: Foundations of Statistical Natural Language Processing, vol. 999. MIT Press, Cambridge (1999)zbMATHGoogle Scholar
  19. 19.
    Gonçalo Oliveira, H., Cardoso, A.: Poetry generation with PoeTryMe. In: Besold, T.R., Schorlemmer, M., Smaill, A. (eds.) Computational Creativity Research: Towards Creative Machines. ATM, vol. 7, pp. 243–266. Atlantis Press, Paris (2015). doi: 10.2991/978-94-6239-085-0_12 Google Scholar
  20. 20.
    Oulipo, A.: Atlas de litterature potentielle. Gallimard, Collection Idees (1981)Google Scholar
  21. 21.
    Queneau, R.: de poemes. Gallimard Series, Schoenhofs Foreign Books (1961)Google Scholar
  22. 22.
    Toivanen, J., Toivonen, H., Valitutti, A., Gross, O., et al.: Corpus-based generation of content and form in poetry. In: Proceedings of the Third International Conference on Computational Creativity, Dublin, Ireland, pp. 175–179 (2012)Google Scholar
  23. 23.
    Toivanen, J.M., Järvisalo, M., Toivonen, H., et al.: Harnessing constraint programming for poetry composition. In: Proceedings of the Fourth International Conference on Computational Creativity, Sydney, Australia, pp. 160–167 (2013)Google Scholar
  24. 24.
    Zelaia, A., Arregi, O., Sierra, B.: Combining singular value decomposition and a multi-classifier: A new approach to support coreference resolution. Eng. Appl. AI 46, 279–286 (2015)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Aitzol Astigarraga
    • 1
  • José María Martínez-Otzeta
    • 1
    Email author
  • Igor Rodriguez
    • 1
  • Basilio Sierra
    • 1
  • Elena Lazkano
    • 1
  1. 1.Department of Computer Sciences and Artificial IntelligenceUniversity of the Basque Country UPV/EHUDonostia-San SebastianSpain

Personalised recommendations