Back in the Fall of 2011, four hackers attended the PennApps hackathon and created SlamWhale. This epic fusion of poetry, Twitter, and hacking resulted in one of the community's most beloved projects. Since then, we've rewritten the original PHP version in NodeJS and updated it to use the latest Twitter API.

What it do

SlamWhale takes a line of text and finds tweets that rhyme with it to construct a poem. The results can be profound, hilarious, or downright confusing.

But how?

  1. Send the last word of the line you typed to the RhymeBrain API.
  2. Search for tweets that end with any of the words that come back from Rhymebrain.
  3. Assemble the first few tweets that come back into a poem.

By now, it's well-known that usage of the Twitter API is severely limited. It's impossible to use the Twitter API to retrieve tweets that end with certain words, and it would be unfeasible to keep querying Twitter's search API until we got a match. SlamWhale takes this into account by keeping a large cache of tweets on hand. When it comes time to find some tweets, SlamWhale searches through that cache for rhyming tweets.

The original version of SlamWhale won the award for most creative app in the PennApps Fall 2011 hackathon.

Share this project: