2017-04-15 14:05:15 +03:00
|
|
|
# coding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2016-09-24 16:42:01 +03:00
|
|
|
from . import about
|
2017-05-08 00:25:29 +03:00
|
|
|
from .util import prints
|
2017-05-08 16:40:16 +03:00
|
|
|
from .cli import download
|
2017-03-15 19:37:55 +03:00
|
|
|
|
|
|
|
|
2017-05-08 16:35:30 +03:00
|
|
|
PRON_LEMMA = "-PRON-"
|
2017-05-08 00:29:22 +03:00
|
|
|
|
2017-03-17 20:47:05 +03:00
|
|
|
|
2017-05-08 16:32:10 +03:00
|
|
|
def depr_model_download(lang):
|
2017-04-15 12:59:21 +03:00
|
|
|
"""
|
|
|
|
Replace download modules within en and de with deprecation warning and
|
2017-05-08 16:32:10 +03:00
|
|
|
download default language model (using shortcut).
|
2017-04-15 12:59:21 +03:00
|
|
|
"""
|
2017-05-08 16:32:10 +03:00
|
|
|
prints("The spacy.%s.download command is now deprecated. Please use "
|
|
|
|
"python -m spacy download [model name or shortcut] instead. For "
|
|
|
|
"more info, see the docs: %s." % (lang, about.__docs__),
|
|
|
|
"Downloading default '%s' model now..." % lang,
|
|
|
|
title="Warning: deprecated command")
|
|
|
|
download(lang)
|