Generates random samples of text from a given corpus.