mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Only try to load vectors if they exist.
This commit is contained in:
parent
618ac36093
commit
60eb2343ce
|
@ -57,7 +57,8 @@ class BaseDefaults(object):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
vec_path = nlp.path / 'vocab' / 'vec.bin'
|
vec_path = nlp.path / 'vocab' / 'vec.bin'
|
||||||
return lambda vocab: vocab.load_vectors_from_bin_loc(vec_path)
|
if vec_path.exists():
|
||||||
|
return lambda vocab: vocab.load_vectors_from_bin_loc(vec_path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create_tokenizer(cls, nlp=None):
|
def create_tokenizer(cls, nlp=None):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user