TRAIN_DATA = [
("XYZxyzg hat die beste Camera für Selfies", {"entities": [(0, 7, "BRAND"), (23, 28, "CAMERA")]}),
]
在训练这一点后,我一直在这条线上收到一个错误:
serWarning: [W030] Some entities could not be aligned in the text "XYZxyzg hat die beste Camera für Selfie" with entities "[(0, 7, 'BRAND'), (23, 28, 'CAMERA')]". Use `spacy.gold.biluo_tags_from_offsets(nlp.make_doc(text), entities)` to check the alignment. Misaligned entities ('-') will be ignored during training.
gold = GoldParse(doc, **gold)
我的索引有什么问题?我应该排除空格吗?我也试过了,但它似乎不起作用。如警告所示,我如何使用它spacy.gold.biluo_tags_from_offsets(nlp.make_doc(text), entities)
来检查索引?