Twitter Bots


December 05, 2014    bots, twitter, programming

Since I don’t have a lot of free time for larger projects these days, I find that small focused ideas are a good way to learn and stay sharp (or sharp-ish, anyway). One of my favorite things to work on is automated scripts that post things to Twitter.

Some of the most interesting bots that other people make are ones that seem like they’re written by humans. I don’t have a lot of experience in natural language processing so my bots generally don’t do this. If they do they usually run on a series of templates.

You can see a full list of my bots on Twitter, and I’ll list a few of my favorites below. The #botALLY hashtag and the @botALLY account are good ways to discover twitter bots made by others.

Favorites


@WalkingTourBot

This bot takes google walking directions as input and steps through them one at a time. Each time it tweets it posts google streetview images of the location as well as two maps (one zoomed, one further out). As of this writing it’s walking from New York City to Los Angeles.



@JaneAustenHaiku

This bot concatenates Jane Austen’s “Emma”, “Pride and Predjudice” and “Sense and Sensibility” together and then runs through that entire text looking for series of words that fall into the haiku patterns. The sentences don’t have to be sequential, in fact almost always they’re not. Nor are they full sentences usually.



@MusicReviewBot

This is one of my better “more natural looking” language bots. Inspired by the work done parsing Netflix genres, I thought it would be fun to scrape Pandora for the data they use to classify songs. I wrote a spider that would grab a random song, cache its features and then move on to another related song and repeat over and over. So I now have a corpus of features I can pick from at random to assemble a tweet from. The idea, then is to do a “review” on this fictional song which ends up being just whether the bot “likes” or “doesn’t like” the song. In order to give some context I whipped up a random band and song name generator. While that wasn’t the original focus of the project, I ended up really liking the results of that.


Tweets