From 02c5c114d02d5ad21dcd94a7b603c43a1dc415d0 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 14 Aug 2018 13:19:15 +0200 Subject: [PATCH] Fix usage of deprecated freqs.txt in init-model --- spacy/cli/init_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/cli/init_model.py b/spacy/cli/init_model.py index eb6677aed..580b2df75 100644 --- a/spacy/cli/init_model.py +++ b/spacy/cli/init_model.py @@ -98,7 +98,7 @@ def open_file(loc): def read_attrs_from_deprecated(freqs_loc, clusters_loc): probs, oov_prob = read_freqs(freqs_loc) if freqs_loc is not None else ({}, -20) clusters = read_clusters(clusters_loc) if clusters_loc else {} - lex_attrs = {} + lex_attrs = [] sorted_probs = sorted(probs.items(), key=lambda item: item[1], reverse=True) for i, (word, prob) in tqdm(enumerate(sorted_probs)): attrs = {'orth': word, 'id': i, 'prob': prob}