ModelGenerator function

Generates n-gram models from a text file