From 807572683851262a8234ddef46eec9fa7bebda6c Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 31 Oct 2017 19:21:17 +0100 Subject: [PATCH] Restore vector usage in models --- spacy/_ml.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/_ml.py b/spacy/_ml.py index fa8e83d48..6bfacb20a 100644 --- a/spacy/_ml.py +++ b/spacy/_ml.py @@ -208,11 +208,11 @@ class PrecomputableAffine(Model): def link_vectors_to_models(vocab): vectors = vocab.vectors ops = Model.ops - #for word in vocab: - # if word.orth in vectors.key2row: - # word.rank = vectors.key2row[word.orth] - # else: - # word.rank = 0 + for word in vocab: + if word.orth in vectors.key2row: + word.rank = vectors.key2row[word.orth] + else: + word.rank = 0 data = ops.asarray(vectors.data) # Set an entry here, so that vectors are accessed by StaticVectors # (unideal, I know)