From 7852a68a7530b36c512a54163a1511afe102b625 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 28 Jul 2020 21:59:51 +0200 Subject: [PATCH] Fix load_vectors_into_model function --- spacy/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/util.py b/spacy/util.py index 4e3a8d203..7a26011f1 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -202,8 +202,8 @@ def load_vectors_into_model( # I guess we should add the strings from the vectors_nlp model? # E.g. if someone does a similarity query, they might expect the strings. for key in nlp.vocab.vectors.key2row: - if key in vectors_nlp.strings: - nlp.vocab.strings.add(vectors_nlp.strings[key]) + if key in vectors_nlp.vocab.strings: + nlp.vocab.strings.add(vectors_nlp.vocab.strings[key]) def load_model(