mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Fix verbose printing for scorer
This commit is contained in:
parent
e181c051d5
commit
903f196b3f
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user