Rennaming cls in module. cls is now a class

This commit is contained in:
Gregory Howard 2017-05-03 15:41:07 +02:00
parent 0e8c41ea4f
commit 929f2792a7
1 changed files with 3 additions and 2 deletions

View File

@ -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)