iterator to build unigram tables