From e50ac1a47f7f0dcf8a6d8181a0c04bee7526d385 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 14 Jun 2015 17:45:50 +0200 Subject: [PATCH] * Add verbose printing to scorer --- spacy/scorer.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spacy/scorer.py b/spacy/scorer.py index 4c210656b..8310cbd49 100644 --- a/spacy/scorer.py +++ b/spacy/scorer.py @@ -113,3 +113,12 @@ class Scorer(object): set(item[:2] for item in cand_deps), set(item[:2] for item in gold_deps), ) + if verbose: + gold_words = [item[1] for item in gold.orig_annot] + for w_id, h_id, dep in (cand_deps - gold_deps): + print 'F', gold_words[w_id], dep, gold_words[h_id] + for w_id, h_id, dep in (gold_deps - cand_deps): + print 'M', gold_words[w_id], dep, gold_words[h_id] + + +