This is not really science... but your post brought up fond memories: One of the first things I did with Perl was to create statistics on letter, letter pairs, letter triplets etc. distribution in a given text, and then used this to create random texts that resembled the original text. The results were quite good, and rather funny, especially when using several source texts (e.g. mixing the KJV bible and Edgar Allan Poe).
After a few years, I learned that what I had implemented is a very common algorithm in a lot of different fields: Markov Chains :).