From 6712d0b5db98f7289b02b65db6b4bd7367857993 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 18 Jun 2020 10:09:56 +0200 Subject: [PATCH] textcat bugfix --- spacy/pipeline/pipes.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/pipeline/pipes.pyx b/spacy/pipeline/pipes.pyx index 564d97767..48530ee12 100644 --- a/spacy/pipeline/pipes.pyx +++ b/spacy/pipeline/pipes.pyx @@ -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.