From c670b4a6592a99302fb352244c459168b0964855 Mon Sep 17 00:00:00 2001 From: osmanbaskaya Date: Mon, 26 Jan 2015 11:20:40 -0800 Subject: [PATCH] fix: it creates file named 'data' but it should be directory --- spacy/en/download.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spacy/en/download.py b/spacy/en/download.py index 9997c90b6..69b75da5b 100644 --- a/spacy/en/download.py +++ b/spacy/en/download.py @@ -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') + +if os.path.exists(DEST_DIR): + shutil.rmtree(DEST_DIR) + +os.mkdir(DEST_DIR) + def download_file(url, out): wget.download(url, out=out) @@ -28,6 +34,7 @@ def install_dep_vectors(url, dest_dir): def main(): + print DEST_DIR, PARSER_URL, DEP_VECTORS_URL install_parser_model(PARSER_URL, DEST_DIR) install_dep_vectors(DEP_VECTORS_URL, path.join(DEST_DIR, 'vocab'))