Some students from MIT recently generated a paper using context free grammar which lead to some controversy, however the idea of machines generating a document based on some rules is pretty old. One interesting idea is http://www.eblong.com/zarf/markov/ where a makov chain is learnt based on the text from a big collection and the text is generated probabilistically. Some more details (and some more fun) can be found here: http://www.cs.princeton.edu/courses/archive/spr05/cos126/assignments/markov.html
It would be interesting to train the Markov chains over sentences too (this requires that each sentence be given a state based on the set of words in the sentence) also we can try out filtering a sentence based on a grammar and look at the result. The first part can be implemented in I guess half an hour. It will probably take a bit more thinking to get the second and third part working. Guess I can steal the implementation of the cfg from somewhere.