mirror of https://github.com/explosion/spaCy.git
Don't set tensor in textcat
This commit is contained in:
parent
7d46793dd7
commit
8fea512ac8
|
@ -810,8 +810,6 @@ class TextCategorizer(Pipe):
|
||||||
|
|
||||||
def set_annotations(self, docs, scores, tensors=None):
|
def set_annotations(self, docs, scores, tensors=None):
|
||||||
for i, doc in enumerate(docs):
|
for i, doc in enumerate(docs):
|
||||||
if tensors is not None:
|
|
||||||
doc.extend_tensor(tensors[i])
|
|
||||||
for j, label in enumerate(self.labels):
|
for j, label in enumerate(self.labels):
|
||||||
doc.cats[label] = float(scores[i, j])
|
doc.cats[label] = float(scores[i, j])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue