PoeLM: A Meter- and Rhyme-Controllable Language Model for Unsupervised Poetry Generation

Aitor Ormazabal, Mikel Artetxe, Manex Agirrezabal, Aitor Soroa, Eneko Agirre
5/24/2022
cs.CLcs.AI

Official code: aitorormazabal/poetry_generation (7 stars, Python, last commit 2022-10-19).

Abstract

Formal verse poetry imposes strict constraints on the meter and rhyme scheme of poems. Most prior work on generating this type of poetry uses existing poems for supervision, which are difficult to obtain for most languages and poetic forms.

Show full abstract

In this work, we propose an unsupervised approach to generate poems following any given meter and rhyme scheme, without requiring any poetic text for training. Our method works by splitting a regular, non-poetic corpus into phrases, prepending control codes that describe the length and end rhyme of each phrase, and training a transformer language model in the augmented corpus. During inference, we build control codes for the desired meter and rhyme scheme, and condition our language model on them to generate formal verse poetry. Experiments in Spanish and Basque show that our approach is able to generate valid poems, which are often comparable in quality to those written by humans.

View on arXivView PDF

Code Implementations(1)

Code for PoeLM

72Python, ShellMay 24, 20224 years ago

Similar Papers

Cite this paper

@article{ormazabal2022poelm,
  title  = {PoeLM: A Meter- and Rhyme-Controllable Language Model for Unsupervised Poetry Generation},
  author = {Aitor Ormazabal and Mikel Artetxe and Manex Agirrezabal and Aitor Soroa and Eneko Agirre},
  year   = {2022},
  eprint = {2205.12206},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.12206}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.12206.svg)](https://codeofpaper.com/paper/2205.12206)

Discussion