From 105305b4aa4ac35061983741008644a841ddbb28 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 25 Jul 2015 21:13:41 +0200 Subject: [PATCH] * Upd get_freqs script --- bin/get_freqs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/get_freqs.py b/bin/get_freqs.py index 9557a3b33..c9f858b22 100755 --- a/bin/get_freqs.py +++ b/bin/get_freqs.py @@ -40,6 +40,7 @@ def null_props(string): def count_freqs(input_loc, output_loc): + print output_loc nlp = spacy.en.English(Parser=None, Tagger=None, Entity=None, load_vectors=False) nlp.vocab.lexeme_props_getter = null_props @@ -94,8 +95,10 @@ def main(input_loc, freqs_dir, output_loc, n_jobs=2, skip_existing=False): if not path.exists(output_path) or not skip_existing: tasks.append((input_path, output_path)) - parallelize(count_freqs, tasks, n_jobs) + if tasks: + parallelize(count_freqs, tasks, n_jobs) + print "Merge" merge_counts(outputs, output_loc)