mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-12 13:14:18 +03:00
textcat bugfix
This commit is contained in:
parent
40b2b21eef
commit
6712d0b5db
|
@ -879,7 +879,7 @@ class TextCategorizer(Pipe):
|
|||
not_missing = numpy.ones((len(examples), len(self.labels)), dtype="f")
|
||||
for i, eg in enumerate(examples):
|
||||
for j, label in enumerate(self.labels):
|
||||
if label in eg.predicted.cats:
|
||||
if label in eg.reference.cats:
|
||||
truths[i, j] = eg.reference.cats[label]
|
||||
else:
|
||||
not_missing[i, j] = 0.
|
||||
|
|
Loading…
Reference in New Issue
Block a user