I remember playing around with Markov chains back in the day, and thought that it would be fun to see what that looked like when fed all 15,000 of my Tweets.
Just downloaded my 15k tweet archive, stripped links, and ran a Markov chain engine over them. About 10 lines of code.— Buster (@buster) September 25, 2013
How do Markov chains work?
They are pretty neat. There are a couple different ways to do them, but the general idea is that they take some corpus of text and keep track of how often various words appear before and after each other. Using some amount of randomness they then construct sentences based on these percentages that have most likely never been put together before, but, in some strange alternate grammatical universe, might have been put together.
The result? Frankensentences that have a bit of the personality of the original text, but often in sort of ridiculous new configurations. Pretty funny (to me at least).
The death of loved ones can change the size of a cat named Stoli for 10.— buster ebooks (@buster_ebooks) September 24, 2013
Right, I wrote this thing: Gameful Design vs— buster ebooks (@buster_ebooks) September 24, 2013
On actual airplanes, not so much: You have a teleporter to fun— buster ebooks (@buster_ebooks) September 25, 2013
I deleted things and would love to share they can remind us of how many Americans have died from gun violence since Newtown— buster ebooks (@buster_ebooks) September 25, 2013
And of course many more.
A couple people asked for how this is done:
@buster is the source available?— Paul Betts (@paulcbetts) September 25, 2013
So I posted the (relatively disorganized but hopefully comprehensible) code here: