我使用这个从零开始训练一个NER模型,使用我自己的训练样本。
当我在新文本上使用这个模型时,我想得到每个实体的预测概率。# test the saved model print("Loading from", output\_dir) nlp2 = spacy.load(output\_dir)ent in doc.ents]) print("Tokens", [(t.text, t.ent\_type\_, t.ent\_iob)
我想训练一个新的模型来识别动物和物种的名字。我创建了一个模拟训练集来测试它。然而,我总是得到一个ValueError: [E973] Unexpected type for NER data使用spacy.blank('en')Installing spacy-lookups-data而不是重复检查培训集的格式和类型是否正确
所有这些都会导致相同的错误。#s