Only try to load vectors if they exist.

This commit is contained in:
Matthew Honnibal 2016-11-23 13:50:24 +01:00
parent 618ac36093
commit 60eb2343ce

View File

@ -57,6 +57,7 @@ class BaseDefaults(object):
return False
else:
vec_path = nlp.path / 'vocab' / 'vec.bin'
if vec_path.exists():
return lambda vocab: vocab.load_vectors_from_bin_loc(vec_path)
@classmethod