I made a C++ program that essentially looks for patterns in text, and generates text based off what it finds. It finds common words that follow each word and then generates text picking common words that follow each previous word.
This was another program that took a lot of optimization. Loading large amounts of text and parsing large amounts of data required careful memory management and algorithms. I also allowed for some custom options like a force diversity mode, which means if one word only has one other word that usually comes after it, it will force choose another seed (random word). I enabled output of when it chooses this next seed, so whenever you see [NSF] (New Seed Forced) it means at that point it chose a new random seed to start off of. After lots of optimization I am very glad with what I finished with and had fun reading the interesting text it generates.
Below I show text generated from crawling wikipedia articles.
I have the full output available for download here.