Original Post
Hi, everyone. I'd like to play around with the statistical generation of sentences. I've heard of a couple (megahal, for example) of fairly old real-world examples, but I'd like some advice on how to proceed with my own implementation. I want to incrementally feed the algorithm sentences and see it incrementally improve in sophistication. Not a new problem, right? For the next couple of paragraphs I'll be thinking out loud, so bear with me :) I've seen some cute stuff on N-grams, but they don't scale (the Brown corpus in a 4-gram would be in the thousands of petabytes). So something based on sparse data structures is clearly necessary, but if the data set is growing incrementally, how do we decide whether to include a new word or related group of words if we haven't been storing all of them? This looks like a dead end to me. I'm familiar with the basics of formal grammars, and I expect plenty of people have already tried loading the grammar with topical words on the fly so as to make the generated sentences more focused and less arbitrary. Some of the cutting-edge stuff looks a bit intimidating and might be overkill for my little experiments. Do any of you have hands-on experience with this stuff? Am I being too ambitious? Is it worth the time and energy or should I take someone else's open library and start twiddling? If so, what libraries do you think get good results? Thanks for reading this far