mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Fix vector loading re glove hack
This commit is contained in:
parent
618b50a064
commit
2c6228565e
|
@ -52,5 +52,6 @@ def _fix_deprecated_glove_vectors_loading(overrides):
|
||||||
vec_path = match_best_version('en_glove_cc_300_1m_vectors', None, data_path)
|
vec_path = match_best_version('en_glove_cc_300_1m_vectors', None, data_path)
|
||||||
if vec_path is not None:
|
if vec_path is not None:
|
||||||
vec_path = vec_path / 'vocab' / 'vec.bin'
|
vec_path = vec_path / 'vocab' / 'vec.bin'
|
||||||
overrides['add_vectors'] = lambda vocab: vocab.load_vectors_from_bin_loc(vec_path)
|
if vec_path is not None:
|
||||||
|
overrides['add_vectors'] = lambda vocab: vocab.load_vectors_from_bin_loc(vec_path)
|
||||||
return overrides
|
return overrides
|
||||||
|
|
Loading…
Reference in New Issue
Block a user