textcat bugfix

This commit is contained in:
svlandeg 2020-06-18 10:09:56 +02:00
parent 40b2b21eef
commit 6712d0b5db

View File

@ -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.