mirror of https://github.com/explosion/spaCy.git
Fix spacy/vocab.pyx
This commit is contained in:
parent
d310dc73ef
commit
453683aaf0
|
@ -73,7 +73,11 @@ cdef class Vocab:
|
||||||
self.load_lexemes(path / 'vocab' / 'lexemes.bin')
|
self.load_lexemes(path / 'vocab' / 'lexemes.bin')
|
||||||
|
|
||||||
if vectors is True:
|
if vectors is True:
|
||||||
vectors = lambda self_: self_.load_vectors_from_bin_loc(path / 'vocab' / 'vec.bin')
|
vec_path = path / 'vocab' / 'vec.bin'
|
||||||
|
if vec_path.exists():
|
||||||
|
vectors = lambda self_: self_.load_vectors_from_bin_loc(vec_path)
|
||||||
|
else:
|
||||||
|
vectors = lambda self_: 0
|
||||||
if vectors:
|
if vectors:
|
||||||
self.vectors_length = vectors(self)
|
self.vectors_length = vectors(self)
|
||||||
return self
|
return self
|
||||||
|
|
Loading…
Reference in New Issue