mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-01 03:33:12 +03:00
Another tweak to GloVe path hackery.
This commit is contained in:
parent
2c6228565e
commit
13a0b31279
|
@ -37,7 +37,9 @@ class English(Language):
|
||||||
def _fix_deprecated_glove_vectors_loading(overrides):
|
def _fix_deprecated_glove_vectors_loading(overrides):
|
||||||
if 'data_dir' in overrides and 'path' not in overrides:
|
if 'data_dir' in overrides and 'path' not in overrides:
|
||||||
raise ValueError("The argument 'data_dir' has been renamed to 'path'")
|
raise ValueError("The argument 'data_dir' has been renamed to 'path'")
|
||||||
if overrides.get('path') is None:
|
if overrides.get('path') is False:
|
||||||
|
return overrides
|
||||||
|
if overrides.get('path') in (None, True):
|
||||||
data_path = get_data_path()
|
data_path = get_data_path()
|
||||||
else:
|
else:
|
||||||
path = overrides['path']
|
path = overrides['path']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user