Using markov chains is fun until it all goes wrong. My Twitter bot sadly seems to have become infatuated with Justin Bieber <i>sigh</i><p><a href="http://twitter.com/markov_chains" rel="nofollow">http://twitter.com/markov_chains</a>
Running @FoxNews into it:<p><pre><code> #UN Security Council, General Assembly evacuated due to hold joint military exercises
</code></pre>
<i>"New Tax Bill: DADT"</i> was another good'un.
Reminds me of Mark V Shaney.<p>"I spent an interesting evening recently with a grain of salt."
<a href="http://en.wikipedia.org/wiki/Mark_V_Shaney" rel="nofollow">http://en.wikipedia.org/wiki/Mark_V_Shaney</a>
This is a lot like an app I wrote a few years ago for a programming contest. It uses the same technique to generate random invention descriptions using patent application abstracts: <a href="http://eurekaapp.com/" rel="nofollow">http://eurekaapp.com/</a> (Yes, I realize how unreasonably slow it is)
It seems that it needs to sample more tweets. I've done 5 tweets, and 2 of them were exact tweets that I sent (they were only a few words long, and I guess they had words that I rarely tweet, so it had few or no other ways to go once it started repeating the tweet)<p>Edit: Then again since there are only a few words in a tweet, you'd have to go a really long way back to really ensure that won't happen. Possibly farther back than Twitter will let you.
This reminds me of an old Perl script I made with Markov chains for a very similar sort of random nonsense text generation.<p>I think I fed it some text from a few usenet kooks/conspiracy theorists and something like Alice in Wonderland and got quite a few laughs a long time ago, though it was made to allow you to combine arbitrary texts into a single chain.
@jennyholzer:<p><i>OFTEN AS OFTEN AS OFTEN AS OFTEN AS POSSIBLE</i><p>Very apt, but what n-gram length is being used? n=1 is my guess, since "as often as" is a common English construct. Obvious feature request: tweakable lengths.<p>edit: I'd make the fix myself and send a pull request but I don't know haskell and am too lazy to figure it out.
I'll leave this here, since it's loosely on-topic (of Markov chains:) <a href="http://www.joshmillard.com/garkov/" rel="nofollow">http://www.joshmillard.com/garkov/</a> — Garfield strips with MC-generated text instead of the original. I've had countless hours of fun with them.
Unfortunately, if you do as I did and tweet what it generated, you can't use it again, as it would be eating its own output; and generating nonsense from nonsense is not so entertaining.
> And a new every day, I'll bring The first bill, since that was a beer Me too!. I don't, but some PHP servers aren't set up 64 pixels.<p>Pretty accurate stuff.