marian/scripts/vocab2txt.py
Marcin Junczys-Dowmunt 945e7c8a43 first commit
2016-04-14 13:44:55 +02:00

9 lines
175 B
Python

import sys
import cPickle
import operator
d = cPickle.load(open(sys.argv[1], 'r'))
sorted_d = sorted(d.items(), key=operator.itemgetter(1))
for p in sorted_d:
print p[0]