Poem Machine - a Co-creative NLG Web Application for Poem Writing

We present Poem Machine, an interactive online tool for co-authoring Finnish poetry with a computationally creative agent. Poem Machine can produce poetry of its own and assist the user in authoring poems. The main target group for the system is primary school children, and its use as a part of teaching is currently under study.


Introduction
Automatic poem generation has received a fair share of attention in the recent years (Gervás, 2001;Colton et al., 2012;Bay et al., 2017). However, these generators can only seldom be interacted with by a user. Our system, Poem Machine 1 , makes poem generation an interactive NLG task with full engagement from the user part.
In the field of computational creativity, the discourse has moved lately more and more towards human-computer co-creativity. The interest does not lie anymore on how a computer can generate creative artifacts on its own, but rather how such systems can be used together with human creativity to assist a person in a creative task. Poem Machine works by creating a poem based on the user defined theme or a user provided URL. 1 http://runokone.cs.helsinki.fi/ This poem is presented to the user in a user interface that is tailored towards co-creativity (see Figure 1). The user can edit the poem freely by natural gestures such as drag and drop. Furthermore, the user can consult Poem Machine's assisting functionalities to achieve his goals such as finding rhymes or following meter.
The primary user group of interest are primary school children, and it has been successfully used in schools to teach children about poetry (Kantosalo et al., 2015). The fact that the system can create a poem as a starting point removes the problem of not coming up with where to start when writing.

Poem Generator
The single most difficult NLG task the system has to tackle is the generation of the initial poem the user will then start to modify. The complex morphosyntax of Finnish does not make this task any less difficult.
For morphology, we use Omorfi (Pirinen et al., 2017), which is an FST based transducer to produce morphological forms. This tool is used by Syntax Maker (Hämäläinen and Rueter, 2018) which is a surface generation tool for Finnish. It resolves morphosyntax (agreement and government) based on an abstract syntactic structure filled with lemmas.
The poem generator in place is based on the one presented in (Hämäläinen, 2018). It uses SemFi (Hämäläinen, 2017) which is a semantic data set of relations of Finnish words based on their syntactic dependencies to produce poetry.
In order to initiate the poem generation, the user is provided with a list of themes such as family or nature. Each theme contains a list of seed nouns that are passed on to the poem generator for producing a novel poem. If the user provides a URL, the contents of the link are analyzed with TreeTag-ger (Schmid, Helmut, 1995) after removing boilerplate and the poem is generated by using those words instead of the ones originating from SemFi.

User Assisting Functionality
In addition to just a one way NLG interaction in producing the initial poem, Poem Machine sports a multitude of user assisting functionalities.
Poem Machine can suggest phonetically similar words for words the user drags into the rhymer tool. This tool will look up the Poem Machine database for rhyming or alliterating words, or words with assonance or consonance rhyme type. Additionally, Poem Machine can asses the meter of the poem the user is authoring. Selectable meters are haiku, tanka, kalevala and so on. Poem Machine uses Voikko 2 to divide verses into syllables to asses how well they follow the meter. For more complex meters such as the kalevala meter, Poem Machine provides additional stylistic feedback apart from syllabic count, such as the existence of alliterations and that longer words should be placed at the end of a verse.
The user can also reconsult the poem generator described earlier. This will generate a new verse at the end of the poem by following the same parameters that were set upon the creation of the poem.
Words can also be substituted by new ones by using the magic wand tool. Using the tool analyzes the verse syntactically and looks up for a suitable replacement for the word the wand was dragged on from SemFi. For easier replacement, Poem Machine will also inflect the word to match the original morphology with Omorfi.

Conclusions
Poem Machine is a complex computationally creative tool for helping people create poems of their own. The meter tool also helps people learn more about the poetic meter. Initial observations suggest that Poem Machine is successful in eliciting motivation and provoking more interest towards poetry in school kids.
It has been made publicly available for everyone to use it as an online service. Thus making it possible for the system to have more impact outside of the academia. Furthermore this has made it possible for technology enthusiastic teachers to use it as a part of their teaching without the need