Roses are red, Violets are blue, Computers writing poetry is something we probably shouldn’t do.
Sometimes over at Kaleida, while elbow deep in data with Python chugging along with various Natural Language Parsing (NLP) experiments, you need a little break, and so I figured it’d be nice if the computer sent me short poems it found as it searched through the news.
I was initially tempted by cheesy Christmas card poems, but then figured I should aim for Valentine’s day. It’d give me a few months worth of results to search through, and what could be nicer than a timely news based love poem from a computer?
Or, well, maybe not!
Undeterred I decided to press on, the first step in the whole process was finding sentences in the news where the last word rhymed with blue, for which we needed a list of blue rhymes.
I started with 228 one, two, three and four syllable words from http://www.rhymer.com/RhymingDictionary/blue.html.
Now, in comedy there are certain words that just inherently funny, and when coming up with a comedy name for sketches sticking with surnames that are nouns is generally a good bet…
- David Chin, Dennis Plow, Rosemary Rediscovery Fiddle, Paloma Dent, Seymour Cliff, Edward Tent, Jessica Brick, Terry Horses and Nathan Cake.
Some words are just better than others when it comes to the “arts”. When first running the now rhyming with blue code over the last couple of months news stories, one thingy stuck out almost straight away, poems ending in one syllable words were both very common and got dull very quickly. It seemed that the more syllables we ended on & the more unusual the word the more satisfying was the poem.
A quick demonstration; even doubling up a single syllable word makes it instantly better.
One Syllable Two Syllables
(not very funny) (funnier)
Although extending to three syllables doesn’t further extend the amusement of the word, as we can see
One Syllable Two Syllables Three Syllables
(not very funny) (funnier) (likely to be sung by Sting)
Do DoDo DoDoDo
Da DaDa DaDaDa
The next step after that was to again look at the most commonly found words and lop the top ones off. Here’s the frequency of words for the last couple of weeks that had over 20 matches, because it’s fair to say I very quickly got bored of poems ending with “issue”.
Most common poem ending words.
Getting rid of those had the outcome of generating only 4–5 “suitable” poems per day, which seemed about the right number. Although sometimes it was still pushing the acceptability envelope somewhat…
…it was enough to keep me happy.
Curiously the top supplier of Roses are red, Violets are blue poems was the Daily Mail, here’s the stats generated for news stories discovered over the last few months…
Top 10 publications by poems generated.
Daily Mail: 762
The Guardian: 678
The Washington Post: 411
New York Times: 447
Fox News: 340
The Independent: 169
The Telegraph: 118
I think this is down to the Daily Mail’s statistically significant propensity for using words that end on ‘o’; tattoo, hairdo, taboo, yahoo and switcheroo!
If you enjoyed (or at least tolerated) this article you may enjoy these other ones.
- The Many Related Concepts of a “Donald Trump”
- A Jolly Jaunt Through the Sentiment of News
- The discouraging lack of correlation between time and engagement when publishing news stories
- Sentiment just before and after the election results, surprising absolutely no-one
And you can find me over on twitter as revdancatt.