Prepare for n-gram model generation.