我成功地训练斯帕西识别一些自定义命名实体。在
假设这个模型成功地识别了公司(ORG)和水果(FRUIT)。在
我想得到一个词是每个实体的概率。比如:
doc = nlp("Apple to ship highest number of new iPhones this fall")
print(getProbabilities(doc))
// [
// (0,0, 'Apple', [ ['ORG', 0.99], ['FRUIT', 0.01] ])
// ]
doc = nlp("Apple picking machine provides potential future of agriculture")
print(getProbabilities(doc))
// [
// (0,0, 'Apple', [ ['FRUIT', 0.99], ['ORG', 0.01] ])
// ]
使用所描述的技术here我可以得到特定命名实体的分数,但只能得到最有可能的实体,而不是其他实体。在
目前没有回答
相关问题 更多 >
编程相关推荐