mirror of https://github.com/explosion/spaCy.git
Py3 compatibility tweak
This commit is contained in:
parent
8d7e044e2c
commit
d4407d8e2f
|
@ -124,7 +124,7 @@ def setup_vocab(src_dir, dst_dir):
|
||||||
probs[word] = min_prob
|
probs[word] = min_prob
|
||||||
|
|
||||||
lexicon = []
|
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)
|
entry = get_lex_props(word)
|
||||||
if word in clusters or float(prob) >= -17:
|
if word in clusters or float(prob) >= -17:
|
||||||
entry['prob'] = float(prob)
|
entry['prob'] = float(prob)
|
||||||
|
|
Loading…
Reference in New Issue