I want to generate documents based on a grammar to build a custom training database. What are the tools and techniques to generate random texts based on a given grammar.
More specifically, I would like to build a collection of texts with random 'sentences' and each one is a possible derivation (chosen randomly) from the grammar. I would like also to draw randomly the terminal symbols (the final words). I have looked into (python) nltk and have achieved some document generation, but the derivations chosen are not selected randomly.