Py3 compatibility tweak

This commit is contained in:
Matthew Honnibal 2015-07-23 09:45:15 +02:00
parent 8d7e044e2c
commit d4407d8e2f
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ def setup_vocab(src_dir, dst_dir):
probs[word] = min_prob
lexicon = []
for word, prob in reversed(sorted(probs.items(), key=lambda item: item[1])):
for word, prob in reversed(sorted(list(probs.items()), key=lambda item: item[1])):
entry = get_lex_props(word)
if word in clusters or float(prob) >= -17:
entry['prob'] = float(prob)