cleanup api

This commit is contained in:
Henning Peters 2016-03-08 12:59:18 +01:00
parent aa4d964c14
commit eb7ae61b1c
2 changed files with 3 additions and 3 deletions

View File

@ -5,4 +5,4 @@ from .en import English
def load(name, vectors=None, via=None):
return English(
package=util.get_package_by_name(name, via=via),
vectors_package=util.get_package_by_name(vectors_name, via=via))
vectors_package=util.get_package_by_name(vectors, via=via))

View File

@ -25,9 +25,9 @@ def get_package_by_name(name=None, via=None):
return sputnik.package(about.__title__, about.__version__,
name or about.__default_model__, data_path=via)
except PackageNotFoundException as e:
raise RuntimeError("Model not installed. Please run 'python -m "
raise RuntimeError("Model %s not installed. Please run 'python -m "
"spacy.en.download' to install latest compatible "
"model.")
"model." % name)
except CompatiblePackageNotFoundException as e:
raise RuntimeError("Installed model is not compatible with spaCy "
"version. Please run 'python -m spacy.en.download "