mirror of https://github.com/explosion/spaCy.git
add default_model to about
This commit is contained in:
parent
788f734513
commit
780cb847c9
1
setup.py
1
setup.py
|
@ -158,6 +158,7 @@ version = '%(version)s'
|
|||
full_version = '%(full_version)s'
|
||||
git_revision = '%(git_revision)s'
|
||||
release = %(isrelease)s
|
||||
default_model = 'en_default==1.0.4'
|
||||
if not release:
|
||||
version = full_version
|
||||
"""
|
||||
|
|
|
@ -39,16 +39,15 @@ def link(package, path):
|
|||
force=("Force overwrite", "flag", "f", bool),
|
||||
)
|
||||
def main(data_size='all', force=False):
|
||||
package_name = 'en_default==1.0.4'
|
||||
path = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
if force:
|
||||
sputnik.purge('spacy', about.short_version)
|
||||
|
||||
package = sputnik.install('spacy', about.short_version, package_name)
|
||||
package = sputnik.install('spacy', about.short_version, about.default_model)
|
||||
|
||||
try:
|
||||
sputnik.package('spacy', about.short_version, package_name)
|
||||
sputnik.package('spacy', about.short_version, about.default_model)
|
||||
except PackageNotFoundException, CompatiblePackageNotFoundException:
|
||||
print("Model failed to install. Please run 'python -m "
|
||||
"spacy.en.download --force'.", file=sys.stderr)
|
||||
|
|
|
@ -196,7 +196,7 @@ class Language(object):
|
|||
via = data_dir
|
||||
|
||||
if via is None:
|
||||
package = util.get_package_by_name('en_default==1.0.4')
|
||||
package = util.get_package_by_name(about.default_model)
|
||||
else:
|
||||
package = util.get_package(via)
|
||||
|
||||
|
|
Loading…
Reference in New Issue