Hostname: page-component-74656f9884-2dmjx Total loading time: 0 Render date: 2026-11-07T10:03:12.548Z Has data issue: false hasContentIssue false

Multilingual extension and evaluation of a poetry generator*

Published online by Cambridge University Press:  01 June 2017

HUGO GONÇALO OLIVEIRA
Affiliation:
CISUC, Dep. Engenharia Informática, Universidade de Coimbra, Portugal e-mail: hroliv@dei.uc.pt
RAQUEL HERVÁS
Affiliation:
Dep. de Ing. de Software e Int. Artificial, Universidad Complutense de Madrid, Spain e-mail: raquelhb@fdi.ucm.es, albertodiaz@fdi.ucm.es
ALBERTO DÍAZ
Affiliation:
Dep. de Ing. de Software e Int. Artificial, Universidad Complutense de Madrid, Spain e-mail: raquelhb@fdi.ucm.es, albertodiaz@fdi.ucm.es
PABLO GERVÁS
Affiliation:
Dep. de Ing. de Software e Int. Artificial, Universidad Complutense de Madrid, Spain e-mail: raquelhb@fdi.ucm.es, albertodiaz@fdi.ucm.es Inst. de Tecnología del Conocimiento, Universidad Complutense de Madrid, Spain e-mail: pgervas@sip.ucm.es
Rights & Permissions [Opens in a new window]

Abstract

Poetry generation is a specific kind of natural language generation where several sources of knowledge are typically exploited to handle features on different levels, such as syntax, semantics, form or aesthetics. But although this task has been addressed by several researchers, and targeted different languages, all known systems have focused on a limited purpose and a single language. This article describes the effort of adapting the same architecture to generate poetry in three different languages – Portuguese, Spanish and English. An existing architecture is first described and complemented with the adaptations required for each language, including the linguistic resources used for handling morphology, syntax, semantics and metric scansion. An automatic evaluation was designed in such a way that it would be applicable to the target languages. It covered three relevant aspects of the generated poems, namely: the presence of poetic features, the variation of the linguistic structure and the semantic connection to a given topic. The automatic measures applied for the second and third aspect can be seen as novel in the evaluation of poetry. Overall, poems were successfully generated in the three languages addressed. Despite minor differences in different languages or seed words, poems revealed to have a regular metre, frequent rhymes, to exhibit an interesting degree of variation, and to be semantically-associated with the initially given seeds.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2017 
Figure 0

Fig. 1. The architecture of PoeTryMe.

Figure 1

Fig. 2. Semantic network example.

Figure 2

Fig. 3. Grammar example rule set.

Figure 3

Fig. 4. Structure files for a haiku, a block of four ten-syllable lines, and an English sonnet with a rhyme pattern.

Figure 4

Fig. 5. Poetry generation example with PoeTryMe.

Figure 5

Table 1. Summary of tools and resources used for each language

Figure 6

Table 2. Relation types, number of triplets in the semantic networks, and renderings in the generation grammar used for each language

Figure 7

Table 3. Seed words used for generating the poems of the evaluation sample

Figure 8

Table 4. Additional relevant words for the word artificial, in each language and polarity

Figure 9

Fig. 6. Portuguese poem, generated with the seed ‘artificial’ and negative polarity. Additional relevant words were: fingida (fake), afectada (affected), artificiais (artificials) and artificialidade (artificiality).

Figure 10

Fig. 7. Portuguese poem, generated with the seed ‘amor’ and positive polarity. Additional relevant words were: amorosos (lovely), afecto (affection), amorosidade (loveliness) and cultas (cult).

Figure 11

Fig. 8. Spanish poem, generated with the seed ‘leer’ and positive polarity. Additional relevant words were: examinar (examine), adivinar (guess), reconocer (recognise) and entender (understand).

Figure 12

Fig. 9. Spanish poem, generated with the seed ‘amor’ and no polarity set. Additional relevant words were: afección (affection), afectas (affected), cariño (endearment) and amores (loves).

Figure 13

Fig. 10. English poem, generated with the seed ‘poetry’ and no polarity set. Additional relevant words were: rhyme, still, hush and verse.

Figure 14

Fig. 11. English poem, generated with the seed ‘love’ and negative polarity. Additional relevant words were: fear, crush, fuck and object.

Figure 15

Table 5. Average ratio of syllables per line and mean absolute deviation from the ideal (ten syllables) according to language and seed or polarity

Figure 16

Table 6. Average ratio of rhymes per line and standard deviation, according to language and seed or polarity

Figure 17

Table 7. Average ratio of distinct words out of all the content words, according to language and seed

Figure 18

Table 8. Examples for the evaluation metrics

Figure 19

Fig. 12. Configurations used in the evaluation of structure: (1) One-One Comparison; (2) One-All Comparison; (3) Whole Comparison and (4) One-Alone Comparison.

Figure 20

Table 9. ROUGE results obtained for the evaluation of the structural similarity of the generated poems

Figure 21

Table 10. Precision at top-nine results, obtained for the evaluation of the semantic similarity between the seeds and the generated poems