mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-04 13:13:10 +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")
|
not_missing = numpy.ones((len(examples), len(self.labels)), dtype="f")
|
||||||
for i, eg in enumerate(examples):
|
for i, eg in enumerate(examples):
|
||||||
for j, label in enumerate(self.labels):
|
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]
|
truths[i, j] = eg.reference.cats[label]
|
||||||
else:
|
else:
|
||||||
not_missing[i, j] = 0.
|
not_missing[i, j] = 0.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user