From bf06d9d537030799228d8fdc4b20a30a74c4e512 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 16 Sep 2019 15:16:41 +0200 Subject: [PATCH] Allow passing vectors_name to Vocab --- spacy/vocab.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 869c92921..9c9f85d05 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -33,7 +33,8 @@ cdef class Vocab: DOCS: https://spacy.io/api/vocab """ def __init__(self, lex_attr_getters=None, tag_map=None, lemmatizer=None, - strings=tuple(), lookups=None, oov_prob=-20., **deprecated_kwargs): + strings=tuple(), lookups=None, oov_prob=-20., vectors_name=None, + **deprecated_kwargs): """Create the vocabulary. lex_attr_getters (dict): A dictionary mapping attribute IDs to @@ -62,7 +63,7 @@ cdef class Vocab: _ = self[string] self.lex_attr_getters = lex_attr_getters self.morphology = Morphology(self.strings, tag_map, lemmatizer) - self.vectors = Vectors() + self.vectors = Vectors(name=vectors_name) self.lookups = lookups @property