When you write, there's usually something you want to say. Answer the good old 5W+H at least.
Poetry is pretty exploratory though. When you start, you have barely a vague sense on what you're trying to achieve. You're conveying emotion rather than meaning. Form matters a lot as well.
A lot of creative writing looks like that.
For humans, this is very fun, for computers it's a huge problem though. Just the definition of an algorithm says it needs to reach The Goal in a finite amount of steps. Whoops, now what?
1. Word Salad generators
judy gotta want upon someone. wanna sadly will go about.
sammy gotta want the thief him but the every reason. real distance carry.
Most early attempts just strung together random words. Perhaps using a markov chain of some sort, but mostly the result doesn't make sense and looks like an alien tried to write a poem in a random human language.
This is not poetry.
All green in the leaves I smell dark pools in the trees Crash the moon has fled
A slightly better approach uses templates, that are then filled with random words. For example the above poem comes from Masterman's computerized haikus, where the computer filled in a template:
All  in the  I   in the  the  has 
A similar approach is to use a grammar:
IN THE MORNING + noun phrase with a noun as head + WILL + APPEAR / BE
/ BECOME / SEEM / TURN + adjective phrase
These generators do create text that looks like decent poetry, but with a suspicious amount of human intervention. Would you call a poet just filling in blanks, well, a poet? Probably not. But the texts do fulfill the _grammaticality _requirement, so it would seem we're on to something.
Fun fact: the only two computer systems to have published poetry (RACTER and PROSE) were of this type.
Scattered sandals a call back to myself, so hollow I would echo.
Crazy moon child Hide from your coffin To spite your doom.
You broke my soul the juice of eternity, the spirit of my lips.
This type of system is designed specifically with grammaticality and poeticness in mind. Two thirds of the way to proper poetry!
In An Evolutionary Approach to Poetry Generation Manurung lists four prominent examples of this kind of system:
Gervas’ WASP system, _which creates different types of classical Spanish poetry. Mainly aiming to fulfill the parameters of metre and rhyme. It uses verse patterns that are similar to previously mentioned templates, but are different in that they are more sophisticated since the algorithm gets to pick _every word instead of just a few
Ray Kurzweil’s Cybernetic Poet, or RKCP, this one is proprietary and so not much is known about how it works, (it produced the above poem, btw). The interesting aspect of RKCP is that it uses an existing poet's corpus as a basis for its own creations, which is something I'm striving for in my own thesis.
There is also ALAMO group's Rimbaudelaires, which is apparently a template-filling system that creates its own templates by cutting out nouns/phrases/etc. from sentences and then filling them back in with random words, that follow strict rules for poeticness.
Perhaps the coolest is **POEVOLVE. **It uses the reflection-engagement cycle to create an evolutionary approach where many different versions of the same poem are kept in a sort of tree and then pruned based on how promising they seem. Eventually the system would create proper poetry, however the only part implement so far is a poeticness generation system, so we cannot know for certain the proposed full implementation would even work. But it does look very familiar to how Manurung approaches the problem in the thesis.
This is still not poetry.
no solo en plata o viola truncada se vuelva mas tu y ello juntamente en tierra en humo en polvo en sombra en nada
Finally we reach a class of systems that actively try to create text that is meaningful, poetic and grammatical. Poetry, according to our definition.
Good examples of these sort of systems are ASPERA and COLIBRI, which use case-based reasoning to produce good looking Spanish poetry.
A case-based reasoner attempts to solve a new problem by consulting an explicit database of existing problems and their solutions (Luger and Stubblefield, 1998). This process is described by Aamodt and Plaza (1994) as a cycle of four processes, namely retrieve, reuse, re- vise, and retain.
Essentially the system takes some poem fragments as input, looks them up in a database to get some word patterns to create a sort of template. This is then filled in with random-ish words that fit some particular metre patterns etc.
Through a few revision steps the software eventually produces a verse and stores it back in the database, to be used later on.
So there you go, the whole field of automatic poetry generation laid out before your eyes. The minimal overlap between different systems clearly shows that this field is virtually nonexistent since not much consensus has been reached on how this should be done ... since the early 1970's.
Then again, the paper I'm reading is by now almost ten years old, so maybe there's a bunch more science out there than I can even begin to comprehend. Just two months ago I had no idea anyone had ever thought about doing automagic poetry "properly".
Continue reading about Comparing automatic poetry generators
Semantically similar articles hand-picked by GPT-4
- Science Wednesday: Towards a computational model of poetry generation
- Science Wednesday: Defining poetry
- Natural Language Generation system architectures
- Blogolicious envy
I write articles with real insight into the career and skills of a modern software engineer. "Raw and honest from the heart!" as one reader described them. Fueled by lessons learned over 20 years of building production code for side-projects, small businesses, and hyper growth startups. Both successful and not.
Subscribe below 👇
Join Swizec's Newsletter and get insightful emails 💌 on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.
"Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. 👌"
Senior Mindset Book
Get promoted, earn a bigger salary, work for top companiesLearn more
Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.
Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.
Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.
Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev
Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization
Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog
By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️