spaCy/spacy/en/download.py

25 lines
563 B
Python
Raw Normal View History

2015-11-15 14:58:21 +00:00
import plac
2016-10-23 17:46:28 +00:00
import sputnik
from ..download import download
2016-10-23 17:46:28 +00:00
from .. import about
@plac.annotations(
force=("Force overwrite", "flag", "f", bool),
)
2016-10-18 22:52:16 +00:00
def main(data_size='all', force=False):
2016-10-23 17:46:28 +00:00
if force:
sputnik.purge(about.__title__, about.__version__)
2016-10-18 22:52:16 +00:00
if data_size in ('all', 'parser'):
print("Downloading parsing model")
2016-10-23 17:46:28 +00:00
download('en', False)
2016-10-18 22:52:16 +00:00
if data_size in ('all', 'glove'):
print("Downloading GloVe vectors")
2016-10-23 17:46:28 +00:00
download('en_glove_cc_300_1m_vectors', False)
2015-01-02 10:44:41 +00:00
if __name__ == '__main__':
2015-01-31 02:51:56 +00:00
plac.call(main)