No need for codecs in Python 3.
Fix class expansion probabilities according to the unigram counts of the words.