Mova0.5 pre-release⌕
☰
home / docs / papers / Machine translation / The Mechanical Bard: An Interpretable Machine Learning Approach to Shakespearean Sonnet Generation

The Mechanical Bard: An Interpretable Machine Learning Approach to Shakespearean Sonnet Generation

What it is about

The paper generates Shakespearean sonnets with a small pretrained model (GPT-2, fine-tuned on poems and sonnets) and enforces the sonnet form explicitly rather than hoping training teaches it. About 120 handcrafted part-of-speech templates, taken from real sonnet lines, fix the grammatical shape of each line. A pronunciation dictionary gives syllable counts and stress, so meter is a hard filter during a constrained beam search, and rhyme is checked at the line end. A theme word pulls in related vocabulary, and soft weights reward alliteration and internal rhyme and penalize repetition. Human evaluation, from expert readers and crowd workers, prefers the output to two earlier generators on most criteria, though human sonnets still win on theme. An ablation shows that the templates matter more than the fine-tuning: removing them costs more quality than removing the tuning.

Ideas

For Mova

The code is en/src/lin.rs for the templates and tools/translate (profile.rs) for the hard filter. The paper's central claim, that explicit structure does most of the work, fits Mova's design. The ablation is the measure to copy.

Topics: Machine translation

Cite

The paper itself, not this card. BibTeX from the library's record of the work. DOI 10.18653/v1/2023.acl-short.140

@inproceedings{agnew2023mechanical,
  title = {{The Mechanical Bard: An Interpretable Machine Learning Approach to Shakespearean Sonnet Generation}},
  author = {Agnew, Edwin and Qiu, Michelle and Zhu, Lily and Wiseman, Sam and Rudin, Cynthia},
  booktitle = {Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)},
  year = {2023},
  doi = {10.18653/v1/2023.acl-short.140},
  url = {https://doi.org/10.18653/v1/2023.acl-short.140}
}

References

13 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. John Benhardt, Peter Hase, Liuyi Zhu, and Cynthia Rudin. 2018. Shall I compare thee to a machine-written sonnet? An approach to algorithmic sonnet generation. find
  2. Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. 2017. Enriching word vectors with subword information. Transactions of the association for computational linguistics, 5:135–146. ↗
  3. Carnegie Mellon University CMU. 2019. The CMU pronouncing dictionary. http://www.speech.cs.cmu.edu/cgi-bin/cmudict, Internet. ↗
  4. Pablo Gervás. 2000. Wasp: Evaluation of different strategies for the automatic generation of spanish verse. In Proceedings of the AISB-00 Symposium on Creative & Cultural Aspects of AI, pages 93–100. find
  5. Marjan Ghazvininejad, Xing Shi, Yejin Choi, and Kevin Knight. 2016. Generating topical poetry. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1183–1191. find
  6. Jey Han Lau, Trevor Cohn, Timothy Baldwin, Julian Brooke, and Adam Hammond. 2018. Deep-speare: A joint neural model of poetic language, meter and rhyme. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1948–1958, Melbourne, Australia. Association for Computational Linguistics. find
  7. Ruli Manurung, Graeme Ritchie, and Henry Thompson. 2000. Towards a computational model of poetry generation. https://era.ed.ac.uk/handle/1842/3460. ↗
  8. George A Miller. 1998. WordNet: An electronic lexical database. MIT press. find
  9. Hugo Gonçalo Oliveira. 2012. Poetryme: a versatile platform for poetry generation. Computational Creativity, Concept Invention, and General Intelligence, 1:21. find
  10. Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. https://github.com/openai/gpt-2. ↗
  11. Tim Van de Cruys. 2020. Automatic poetry generation from prosaic text. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2471–2480, Online. Association for Computational Linguistics. find
  12. Tony Veale. 2013. Less rhyme, more reason: Knowledge-based poetry generation with feeling, insight and wit. In Proceedings of the Fourth International Conference on Computational Creativity, ICCC 2013, Sidney, Australia, June 12-14, 2013, pages 152–159. computationalcreativity.net. find
  13. Jianyou Wang, Xiaoxuan Zhang, Yuren Zhou, Christopher Suh, and Cynthia Rudin. 2021. There once was a really bad poet, it was automated but you didn’t know it. find

This page in Markdown → https://md.mova.elamur.ai/free/en/docs/papers/agnew-2023-mechanical-bard-interpretable-machine-learning/