Monday, January 20, 2014

A Whimsical Algorithm: Times Haiku

The New York Times has been compiling a blog of automatically-generated haikus in the online series Times Haiku.

"Whimsy is not a quality we usually associate with computer programs," writes Jacob Harris in "About Times Haiku." In describing the selection process of a haiku within a Times story, Harris writes:

"[Our algorithm] periodically checks the New York Times home page for newly published articles. Then it scans each sentence looking for potential haikus by using an electronic dictionary containing syllable counts. We started with a basic rhyming lexicon, but over time we've added syllable counts for words like “Rihanna” or “terroir” to keep pace with the broad vocabulary of The Times.
"Not every haiku our computer finds is a good one. The algorithm discards some potential poems if they are awkwardly constructed and it does not scan articles covering sensitive topics. Furthermore, the machine has no aesthetic sense. It can't distinguish between an elegant verse and a plodding one. But, when it does stumble across something beautiful or funny or just a gem of a haiku, human journalists select it and post it on this blog."

One of these gems is this haiku from Friday:

When he leaves, you're glad 
to be slipping back into
your own boring life. 

It's part of a quote referring to Chris Christie in the opinion piece, "Who Moved My Cones?" published in The New York Times on Wednesday.