mirror of https://github.com/explosion/spaCy.git
* Upd download script
This commit is contained in:
parent
6259947d30
commit
a20fdbd8ee
|
@ -1,3 +1,4 @@
|
||||||
|
from __future__ import print_function
|
||||||
from os import path
|
from os import path
|
||||||
import os
|
import os
|
||||||
import tarfile
|
import tarfile
|
||||||
|
@ -44,6 +45,8 @@ def main(data_size='all'):
|
||||||
data_url = ALL_DATA_DIR_URL
|
data_url = ALL_DATA_DIR_URL
|
||||||
elif data_size == 'small':
|
elif data_size == 'small':
|
||||||
data_url = SM_DATA_DIR_URL
|
data_url = SM_DATA_DIR_URL
|
||||||
|
if path.exists(DEST_DIR):
|
||||||
|
print("Moving existing dir %s to /tmp" % DEST_DIR)
|
||||||
shutil.move(DEST_DIR, '/tmp')
|
shutil.move(DEST_DIR, '/tmp')
|
||||||
install_data(data_url, path.dirname(DEST_DIR))
|
install_data(data_url, path.dirname(DEST_DIR))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue