Pyambic Pentameter: generating rhyming and metered poems
summary
Claims an automated pipeline that generates rhyming, metered lines by combining a Markov chain generator with the pronunciation lookup in NLTK CMUdict, slicing pronunciations at the last stressed syllable to group rhymes and enforcing backtracking against a target stress pattern. Code builds a backwards Markov model, picks K rhyming seeds, and backtracks to fit iambic pentameter. A Flask demo generates Beatles-style sonnets and a full fourteen-line Shakespearean sonnet is produced, though output quality depends on source corpus size and word coverage.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 0:33Poetry 101
- 3:18Markov Chain Generation
- 10:46Natural Language Toolkit
- 13:59Rhyme
- 16:51Meter
- 22:38Live demo
related talks
28mLyrics Generator + Results: AI Usecases for climate change
10mThis is the poem that doesn’t end!! or, the poetics of RNG!
38mMachine Learning for Poets: The eMiLy App
43mPoetry (almost) From Scratch - Teaching versification to a neural network
19mUrdu poems to Shakespearean English: Machine Translation
27mPythonic Metal
15mSpeling werds egspressively with rrkurrent nuril nedwirques!
31mPride & Prejudice & C#
