From 903f196b3f4df311a0910f3d4e2291ebb7cb598b Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 11 Mar 2015 02:24:22 -0400 Subject: [PATCH] * Fix verbose printing for scorer --- spacy/scorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/scorer.py b/spacy/scorer.py index 586976bad..686584cbb 100644 --- a/spacy/scorer.py +++ b/spacy/scorer.py @@ -47,7 +47,7 @@ class Scorer(object): self.tags_corr += token.tag_ == gold.tags[i] gold_ents = set((start, end, label) for (start, end, label) in gold.ents) guess_ents = set(tokens.ents) - if verbose: + if verbose and gold_ents: for start, end, label in guess_ents: mark = 'T' if (start, end, label) in gold_ents else 'F' ent_str = ' '.join(tokens[i].orth_ for i in range(start, end))