Skip to main content
QUICK REVIEW

[Paper Review] Shall I Compare Thee to a Machine-Written Sonnet? An Approach to Algorithmic Sonnet Generation

John Benhart, Peter Hase|arXiv (Cornell University)|Nov 13, 2018
Topic Modeling19 references4 citations
TL;DR

This paper presents a hybrid neural and rule-based approach to generating Shakespearean sonnets with precise meter, rhyme, and grammatical structure. By integrating in-line punctuation, part-of-speech constraints, and curated training corpora, the method produces high-quality, human-like poetry that won the 2018 PoetiX Literary Turing Test, outperforming prior systems in formal accuracy and poetic coherence.

ABSTRACT

We provide an approach for generating beautiful poetry. Our sonnet-generation algorithm includes several novel elements that improve over the state of the art, leading to metrical, rhyming poetry with many human-like qualities. These novel elements include in-line punctuation, part of speech restrictions, and more appropriate training corpora. Our work is the winner of the 2018 PoetiX Literary Turing Test Award for computer-generated poetry.

Motivation & Objective

  • To develop a system capable of generating Shakespearean sonnets that adhere strictly to iambic pentameter and the ABABCDCDEFEFGG rhyme scheme.
  • To improve upon existing neural poetry generation methods by incorporating hard constraints on meter, rhyme, and part-of-speech usage.
  • To produce sonnets with human-like qualities such as punctuation, grammatical correctness, and stylistic coherence.
  • To evaluate the quality of generated poetry through expert human judgment in a Turing test setting.
  • To demonstrate that combining neural language models with domain-specific rules yields more linguistically and poetically accurate results than purely statistical approaches.

Proposed method

  • The method uses a neural language model trained on curated corpora of Shakespearean sonnets to generate lines with high likelihood.
  • It applies beam search to select lines that maximize likelihood under the model while satisfying hard constraints on meter and rhyme.
  • The system uses the CMU Pronouncing Dictionary to enforce iambic pentameter by assigning stress patterns (0 for unstressed, 1 for stressed) to each word.
  • It enforces part-of-speech-based sampling constraints to prevent ungrammatical phrases, such as adjacent nouns or comparative adjectives and verbs.
  • In-line punctuation is explicitly modeled and generated to improve syntactic clarity and poetic rhythm.
  • Rhyme words are selected based on cosine similarity between the user prompt’s GloVe embedding and precomputed rhyme pairs, ensuring thematic and phonetic coherence.

Experimental results

Research questions

  • RQ1Can a hybrid neural and rule-based system generate Shakespearean sonnets that strictly adhere to iambic pentameter and the ABABCDCDEFEFGG rhyme scheme?
  • RQ2How do part-of-speech constraints and in-line punctuation affect the grammatical and stylistic quality of algorithmically generated poetry?
  • RQ3To what extent can curated training corpora improve the stylistic fidelity of generated sonnets compared to general-purpose text?
  • RQ4Can a machine-generated sonnet achieve high enough quality to win a human-judged literary competition like the PoetiX Literary Turing Test?
  • RQ5How do hard constraints on meter and rhyme compare to soft constraints in terms of poetic accuracy and human perception?

Key findings

  • The proposed method successfully generates sonnets that consistently follow iambic pentameter and the ABABCDCDEFEFGG rhyme scheme, with no metrical or rhyming errors.
  • Part-of-speech constraints effectively eliminate ungrammatical phrases such as 'human beings procreation' or 'greater be', which appeared in prior systems.
  • The inclusion of in-line punctuation significantly improves syntactic clarity and poetic fluency compared to systems that omit such features.
  • The system outperformed prior state-of-the-art approaches in the 2018 PoetiX Literary Turing Test, winning first place despite being correctly identified as machine-generated by expert judges.
  • Human judges, trained in sonnet analysis, were able to distinguish all machine-generated poems from human ones, yet still awarded the system the top prize, indicating high perceived poetic quality.
  • The method’s use of hard constraints and curated training data resulted in higher line likelihoods and greater formal precision than systems relying on soft constraints or less relevant corpora.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.