From 97164b17637cb0e91bfefe4fbe4051ead2994feb Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 21 Feb 2018 14:46:54 +0100 Subject: [PATCH] Fix conllu script --- examples/training/conllu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/training/conllu.py b/examples/training/conllu.py index c1f1b31a1..2a25a5863 100644 --- a/examples/training/conllu.py +++ b/examples/training/conllu.py @@ -153,7 +153,7 @@ def parse_dev_data(nlp, text_loc, conllu_loc): return docs, scorer -def print_progress(itn, losses, scores): +def print_progress(itn, losses, scorer): scores = {} for col in ['dep_loss', 'tag_loss', 'uas', 'tags_acc', 'token_acc', 'ents_p', 'ents_r', 'ents_f', 'cpu_wps', 'gpu_wps']: @@ -228,7 +228,7 @@ def main(spacy_model, conllu_train_loc, text_train_loc, conllu_dev_loc, text_dev with nlp.use_params(optimizer.averages): dev_docs, scorer = parse_dev_data(nlp, text_dev_loc, conllu_dev_loc) - print_progress(i, losses, scorer.scores) + print_progress(i, losses, scorer) with open(output_loc, 'w') as file_: print_conllu(dev_docs, file_)