Another tweak to GloVe path hackery.

This commit is contained in:
Matthew Honnibal 2016-12-18 23:12:49 +01:00
parent 2c6228565e
commit 13a0b31279

View File

@ -37,7 +37,9 @@ class English(Language):
def _fix_deprecated_glove_vectors_loading(overrides):
if 'data_dir' in overrides and 'path' not in overrides:
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()
else:
path = overrides['path']