Fix get labels for textcat

This commit is contained in:
Matthw Honnibal 2019-10-07 16:50:15 +02:00
parent a6a2ff217f
commit c8857181f8

View File

@ -1032,8 +1032,7 @@ class TextCategorizer(Pipe):
return 1
def begin_training(self, get_gold_tuples=lambda: [], pipeline=None, sgd=None, **kwargs):
for raw_text, annots_brackets in get_gold_tuples():
cats = annots_brackets.pop()
for raw_text, (_, (cats, _2)) in get_gold_tuples():
for cat in cats:
self.add_label(cat)
if self.model is True: