def unigram(self):
        wcfile = self.wordcount_path()
        lines = [x.strip().split(",") for x in open(wcfile,'r')]
        unigram_dist = [0.0 for _ in xrange(self.vocabSize)]
        for l in lines:
            wID = int(l[1])
            wC = int(l[2])
            unigram_dist[wID] += wC
        tot = sum(unigram_dist)
        return [x / tot for x in unigram_dist]
        #return unigram_dist
dataset/ETHPy150Open daeilkim/refinery/refinery/refinery/data/models.py/Folder.unigram/original