Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vocab2txt.py « scripts - github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fb054fa23ad763abb77ffaf74d0068db2bb8747e (plain)
1
2
3
4
5
6
7
8
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]