Is poetry a peculiarity of human beings only? Can machines learn to generate poems that actually convey deep emotional meanings, just like human poets do?
A lot of work is still necessary to reach such goal, here we present a simple demo in which we trained two models to generate tercets and verses respectively learning from Dante and Petrarca Italian poets.
We treated the problem as an instance of Language Modelling. In the case of Dante’s tercets, we also applied a post processing to force the proper rhyme scheme ABA, typical of tercets in Divine Comedy, whereas for Petrarca’s Canzoniere we do only generate a single verse, so no further actions are taken.
Try yourself the demo. Tercets/verses are generated given one or more incipit words that you should provide to the model, then it will complete the rest by its own.