Generating text using N-gram models that were trained on shakespeare.txt and warpeace.txt. n-gram models are widely used in statistical natural language processing. In speech recognition, phonemes and sequences of phonemes are modeled using a n-gram distribution.