diff --git a/spacy/__init__.py b/spacy/__init__.py index bcac2471c..9ff902728 100644 --- a/spacy/__init__.py +++ b/spacy/__init__.py @@ -29,7 +29,8 @@ def load(name, **overrides): 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 = importlib.import_module("."+lang, "spacy") + module = importlib.import_module("."+lang, "spacy") + cls = module.EXPORT overrides['meta'] = meta overrides['path'] = model_path - return cls.EXPORT(**overrides) + return cls(**overrides)