Question: Markov chains are a (almost standard) way to generate [random gibberish](http://uswaretech.com/blog/2009/06/pseudo-random-text-markov-chains-python/) which looks intelligent to untrained eye. How would you go about identifying markov generated text from human written text.

It would be awesome if the resources you point to are Python friendly.

Answer: 
One simple approach would be to have a large group of humans read input text for you and see if the text makes sense. I'm only half-joking, this is a tricky problem. 

I believe this to be a hard problem, because Markov-chain generated text is going to have a lot of the same properties of real human text in terms of word frequency and simple relationships between the ordering of words. 

The differences between real text and text generated by a Markov chain are in higher-level rules of grammar and in semantic meaning, which are hard to encode programmatically. The other problem is that Markov chains are good enough at generating text that they sometimes come up with grammatically and semantically correct statements. 

As an example, here's an [aphorism from the kantmachine](http://www.beetleinabox.com/cgi-bin/kant.pl):

> 
> Today, he would feel convinced that
>  the human will is free; to-morrow,
>  considering the indissoluble chain of
>  nature, he would look on freedom as a
>  mere illusion and declare nature to be
>  all-in-all.
> 
> 
> 

While this string was written by a computer program, it's hard to say that a human would never say this. 

I think that unless you can give us more specific details about the computer and human-generated text that expose more obvious differences it will be difficult to solve this using computer programming.
Crowdsourcing. Use Mechanical Turk and get a number of humans to vote on this. There are even some libraries to help you pull this off. For example:

* [TurKit - Iterative Tasks on Mechanical Turk](http://groups.csail.mit.edu/uid/turkit/)

Here's a blog post from O'Reilly Radar on tips for using Mechanical Turk to get your work done:

* [Mechanical Turk Best Practices](http://radar.oreilly.com/2009/06/mechanical-turk-best-practices.html)