Sunday, July 22, 2012

Tweetoem - Discovering Art in Tweets

Title is slightly mis-leading, but I cannot think of a better way to put it. Let me tell you the story behind building of "Tweetoem" (Tweets + Poem). 

Just in case you stumbled on this post first, Tweetoem is live on

Tweetoem is highly inspired from 140verses ( One of my friends shared this link (he is one of the developer of 140verses) on his facebook timeline. It was love at first sight for me, when my reverse-engineering brain cells got activated. I looked into the tweet generating poems, I loved the idea, I loved the execution of work. It has been quite some time until I did any hacks (none after I started working, life of intern seems a bliss now). So to put my spirits high and to brush up on my PHP skills I wondered if I can put something like that in < 6 hours of work? And "Tweetoem" was the result of that work. 

Algorithm (working behind the scenes)
  1. Get the tweets from Twitter
  2. Strip user_mentions, hashtags, and links of the tweets
  3. Get the last word and reverse it
  4. Calculate the Metaphone value of that word
  5. Store the Tweet + Metaphone value 
I am not sure if this is exactly what is being used (from my observation, it seems to be something more sophisticated), but this seems to do the trick for me. I got a bootstrap template, wrote a couple of controller methods (limonade kicks ass here), and that's it. What you see is the outcome of that work in ~6 hours of hacking. 

Known Issues
  1. System is relatively new, so you might not get poems at many chances
  2. Sometimes the lines might be repeated in the poem
  3. Occasionally search breaks for no reason, little refresh or a new keyword should do the trick
  4. No Share features like in 140verses (intentionally not implemented)

Disclaimer - Tweetom idea was inspired from 140verses and the original developers are to be highly appreciated for the innovative thinking + work. Tweetoem was just a self ego satisfying bad hack to replicate the same in less than a day. It is by no means tries to compete with 140verses / their scope. 


Nivas said...

I love it!
One apparent setback I noticed is that in 140verses, the (last) rhyming word of two different sentences are not the same, but in yours, in most cases, it is.

Ashwanth Kumar said...

The reason behind is lack of data in the datastore. More the people search for new content, better it becomes.

Post a Comment