If you’re reading this post, chances are you use Twitter as a place to chat about, link to, search, debate and debunk the big and little things going on in tech.
I use Twitter for work. But because work is something I seem to do quite a lot, my use of Twitter has ranged over time to include a lot of other content.
One of my favorite discoveries in the last year has been Pentametron, a bot — represented by Shakespeare’s face framed by the classic Twitter egg — that seeks out public tweets written in iambic pentameter, which it then retweets in rhyming couplets.
The purpose: “To find inadvertent poetry in the endless torrents of language that slosh around the internet,” according to the site where Pentametron’s tweets later reside in groups of 14.
The couplets are typically like this:
The end result is a little like when you are in a crowded room and overhear a sudden voice saying something above the din.
Ranjit Bhatnagar, the conceptual artist behind Pentametron, tells me the project was borne out of work he had already been doing with collaborative poetry. The earliest of these “network experiments,” as he calls them, was 20 years ago, when he asked different people to each contribute a line to a sonnet — in a hat-tip to the surrealist’s exquisite corpse games. A version of that was eventually used for a project for the Brooklyn Museum — this time with tweets, but still with manual manipulation by Bhatnagar. “The results were silly and interesting,” he said.
For the next evolution, which became Pentametron, Bhatnagar tapped his interest in programming. “I’ve been a nerd since I was a kid,” says New York-based Bhatnagar, who was raised in San Francisco but in a family that had nothing to do with tech and Silicon Valley. Earlier in his life, he used to work for a computer gaming company.
“Last year I was looking at the Twitter API and I could see that you could sign up for a feed for 1 percent out of every 100 tweets,” he recalls of his discovery of Twitter’s so-called “Spritzer” data API. “It’s a way for developers to test out Twitter software, but you could sign up to use it for free, so I did.”
After that, he wrote a program to search for tweets that were written in iambic pentameter (10 beats to the line in a heartbeat rhythm), by referencing every word in each tweet received against the CMU Pronouncing Dictionary, an online resource produced by Carnegie Mellon’s School of Computer Science that identifies the stresses in words.
Word began to spread about what he was doing, and eventually Twitter heard about it, too.
“I was visiting the Bay Area and they invited me over, and they arranged for me to get a bigger feed of tweets” — the 20 percent “gardenhose” feed, which ususally requires payment but is given to the Pentametron project, which generates no revenue, for free. “They’re nice folks,” he adds.
That meant that Pentametron got “about 5 or 10 times more tweets than before.” And that had a second effect: “I had so much more coming through that I could be more selective.”
At that point he refined Pentametron to search for tweets that fit the meter and feet but also rhymed with each other, and when two were found, it would retweet them in a couplet. “To get a rhyme you throw away 100 lines that are in pentameter that don’t rhyme,” he notes. “With the wider feed access I could do that and still keep Pentametron going.” It’s been running like that for at least eight or nine months now, he says.
I’ve often looked at Pentametron and thought there may be even more coding involved to get lines that actually made sense together. Example: “I hope tomorrow is a better day.” And then: “Away away away away away.”
Bhatnagar says the serendipity is “only a coincidence” and not something he has programmed himself. In fact, he’s created a blacklist to make sure that things don’t become too repetitive. Blacklisted items include lines that are quotes from movies, popular songs or popular phrases — e.g. “The angels sang a whiskey lullaby,” or “Each day’s a gift and not a given right.” And there are some pending items that are about to get blacklisted because of how often they appear. Among them: “I pay attention to the little shit,” “Who stole the cookie from the cookie jar,” and “meow meow meow meow meow.”
Pentametron is an interesting kind of barometer for the growth of Twitter. Using its gardenhose feed for the last nine months, Bhatnagar says that Twitter has grown double in the last year and Pentametron is getting a lot more material. “We’re posting twice as fast now as nine months ago,” he says, working out to some 30-40 times per day on average.
Some people find that too much, so he has been working with more ways of trying to whittle down the numbers and “increase the quality while decreasing the output.”
That included the addition of a rule where Pentametron wouldn’t repeat a rhyme for at least three couplets. He’s made little experiements too, such as, on Christmas, omitting certain letters, like the letter “e.” That slowed things right down, he said.
But in general he doesn’t like to meddle too much: “I’m reluctant to give it guidance because it pretty much reflects what is said on Twitter.”
What’s next? Bhatnagar, who isn’t signed to an art dealer, is working on different art projects around sound sculptures — one in Paris and another in Basel later this year — and he has had “vague” ideas about a book based on Pentametron.
He’d like the book to be an extension of how Pentametron itself has worked: “The way Pentametron is artificially constructed, I thought it would be fun to mail it to one of the PDF mail-in places, where the process is as automated as possible.” But he also thinks that putting the couplets into a book format, and figuring out the best way of presenting it, and working through the legalities of doing this could end up being “more work than there was to create Pentametron in the first place.”
He is also teaching Pentametron to recognise full quatrains soon, too, where the rhyming scheme is A-B-A-B. Perhaps after that he would try the full Shakespearean sonnet format.
Some have derided the literary merits of Twitter.
Whether or not you agree with de Botton (I definitely don’t), Pentametron serves as a reminder that there are still a lot of ways that Twitter might get used beyond simply as a rolling feed of short news clips with ads thrown in and lots of links – some of which you can consume on Twitter itself, and some of which you cannot.