plain n-gram generation