From a1fd765ab63259d5d0029eacab0ad4adaf632f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jonasson?= Date: Fri, 9 Feb 2018 07:37:28 +0100 Subject: [PATCH] dwr fix for crawl - no bytes check --- question_answering/preprocessing/dwr.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/question_answering/preprocessing/dwr.py b/question_answering/preprocessing/dwr.py index 0d3a861..e07633e 100644 --- a/question_answering/preprocessing/dwr.py +++ b/question_answering/preprocessing/dwr.py @@ -25,8 +25,10 @@ if not os.path.exists(prefix): os.makedirs(prefix) - - glove_zip = maybe_download(glove_base_url, glove_filename, prefix, 862182613) + if args.glove_source == 'wiki': + glove_zip = maybe_download(glove_base_url, glove_filename, prefix, 862182613) + else: + glove_zip = maybe_download(glove_base_url, glove_filename, prefix) glove_zip_ref = zipfile.ZipFile(os.path.join(prefix, glove_filename), 'r') glove_zip_ref.extractall(prefix)