From ad168ba88c8d18b3755f3c49ced4cb6c34248fc7 Mon Sep 17 00:00:00 2001 From: ines Date: Sun, 16 Apr 2017 22:15:51 +0200 Subject: [PATCH] Set model name to empty string if path override exists Required for parse_package_meta, which composes path of data_path and model_name (needs to be fixed in the future) --- spacy/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spacy/__init__.py b/spacy/__init__.py index 06e9374ea..22f406771 100644 --- a/spacy/__init__.py +++ b/spacy/__init__.py @@ -30,6 +30,7 @@ def load(name, **overrides): else: model_path = util.ensure_path(overrides['path']) data_path = model_path.parent + model_name = '' meta = util.parse_package_meta(data_path, model_name, require=False) lang = meta['lang'] if meta and 'lang' in meta else name cls = util.get_lang_class(lang)