mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 04:32:32 +03:00
fix: it creates file named 'data' but it should be directory
This commit is contained in:
parent
d4c99f7dec
commit
c670b4a659
|
@ -11,6 +11,12 @@ DEP_VECTORS_URL = 'http://s3-us-west-1.amazonaws.com/media.spacynlp.com/vec.bin'
|
||||||
|
|
||||||
DEST_DIR = path.join(path.dirname(__file__), 'data')
|
DEST_DIR = path.join(path.dirname(__file__), 'data')
|
||||||
|
|
||||||
|
|
||||||
|
if os.path.exists(DEST_DIR):
|
||||||
|
shutil.rmtree(DEST_DIR)
|
||||||
|
|
||||||
|
os.mkdir(DEST_DIR)
|
||||||
|
|
||||||
def download_file(url, out):
|
def download_file(url, out):
|
||||||
wget.download(url, out=out)
|
wget.download(url, out=out)
|
||||||
|
|
||||||
|
@ -28,6 +34,7 @@ def install_dep_vectors(url, dest_dir):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
print DEST_DIR, PARSER_URL, DEP_VECTORS_URL
|
||||||
install_parser_model(PARSER_URL, DEST_DIR)
|
install_parser_model(PARSER_URL, DEST_DIR)
|
||||||
install_dep_vectors(DEP_VECTORS_URL, path.join(DEST_DIR, 'vocab'))
|
install_dep_vectors(DEP_VECTORS_URL, path.join(DEST_DIR, 'vocab'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user