That Can Be My Next Tweet! (also, Markov Chains)

I found this site via Keriann Martin, and I've been spending far too much time on it. It's a Tweet jumbler called That can be my next tweet! Here were some results it made from my Twitter feed:

(My next business venture)
Individually-wrapped bananas. I could tape record everything they know how to be as 4.99. Done.

(No, really. I clever.)
I really clever. Dreamworks is endearing themselves to buy those are not actually really need to really?

(In which I am apparently stealing from Firefly)
I was afraid of fixing Hagai's emotional arc today like Wash and Inara's banter in which is that?

(Poor novel planning)
From Reading? My mom was present when I think of a puppy? I think it's not a good inciting event...

(I think I know who drank the rum)
Shoot, with the rum gone? S.C. Butler says you're NOT looking for the rewards are not fame.

(A special message for Keriann)
:-D It's okay, Keri. You can compose wonderful stuff like a water bender. I just watch DIEHARD.


Okay, well I think it's fun. If those were lame, or my geekery posts aren't your thing, you might want to step back. I'm about to explain how this thing works.

It's a simple statistical model using something called Markov chains. Basically, you give the model some set of input text (in this case, your Twitter feed), and it uses that to generate a statistically similar output. For example, say you give it a very small input of 3 tweets:


Why is the rum gone?
Firefly is the bomb. Why is it cancelled again?
I'm gone, watching Firefly and drinking rum.

To produce output, first the model will randomly select one of the starting words: Why, Firefly, or I'm. (Why) Then it looks at what words follow that one. In this case, both instances of the word are followed by 'is'. (Why is)

Here's where it gets interesting. After 'is' comes either 'the' (twice) or 'it' (once), so the model will choose 'the' 66.7% of the time and 'it' the other 33.3%. (Why is the) Then again, after 'the' comes either 'rum' (once) or 'bomb' (once). (Why is the bomb)

Finally, when it reaches an end word--gone, again, or rum--it starts a new sentence using one of the random starting words, or it just stops, having produced all the output it's going to produce. (Why is the bomb. Why is the rum. Firefly and drinking rum. I'm gone.)

So there's your useless fact for the day. The model can be made smarter a number of ways, for example by taking into account not just the current word, but also the word before it (e.g. 'is' might be followed by 'it' or 'the', but 'Firefly is' will always be followed by 'the'). Also, notice the tweet jumble ignores @ mentions, URLs, and hashtags.

What are Markov chains good for, other than silly-sounding word jumbles? It turns out they're great for modeling thermodynamics or economics, for prediction in speech recognition software, for auto-generation of music. Spammers use them to insert real-looking paragraphs in an attempt to get past spam filters, and Google's PageRank is defined by Markov chain probabilities.

But I just use them to waste time with insightful tweets about publishing and Jesus: "Okay, how you can just heard of Publishing? Thanks for Jesus or not? Yeah, I'm quite okay with one."

3 comments:

K. Marie Criddle said...

Ha! Love it. I've been wildly amused by this site, too. My favorite (thus far):

"Thank you guys done a trip down!! I've made me a pigsty! AGREED. Cold as crap and ice cream."

However, I did not know about Markov chains. Very very cool, indeed. It's cool as crap and ice cream.

Keriann Greaney Martin said...

LOL!! I love it too. I was first introducted to this site by @aghowardwrites. I had to put my hand over my mouth to stifle the giggles so my coworkers wouldn't think I was nuts! Here is one of my favs:

"Friday blog post: Where do you changed lanes. Plus I'm au natural now without cheese."
(Hmm, as opposed to be au natural WITH cheese? Not something I want to visualize.)

By the way, I'm glad I can compose wonderful stuff like a water bender by watching DIEHARD. That's a comforting thought :). I better rent that movie so I can get new ideas.

OK, a few more for the road:

"I took on sending 10 MILLION separate pieces of the Little Mermaid ride before I wish I for my blood!"

"Woo hoo!! *happy dance* *throws glitter in the video as much as a yippy robotic dog."

"Ha ha, maybe that ninja guy? He has a hippo. Only a tortilla. You like the hardest time at Mysterious?"

I better stop now before I collapse on the floor in fits of laughter. :)

MattyDub said...
This comment has been removed by the author.