Fix path-override bug in spacy.load

This commit is contained in:
Matthew Honnibal 2016-12-18 22:15:29 +01:00
parent 9a7b406b30
commit c065359459
1 changed files with 2 additions and 1 deletions

View File

@ -46,4 +46,5 @@ def load(name, **overrides):
overrides['add_vectors'] = lambda vocab: vocab.load_vectors_from_bin_loc(vec_path) overrides['add_vectors'] = lambda vocab: vocab.load_vectors_from_bin_loc(vec_path)
path = util.match_best_version(target_name, target_version, data_path) path = util.match_best_version(target_name, target_version, data_path)
cls = get_lang_class(target_name) cls = get_lang_class(target_name)
return cls(path=path, **overrides) overrides['path'] = path
return cls(**overrides)