【问题标题】:Displaying the description of entity from kb id in spacy entity linking在 spacy 实体链接中显示来自 kb id 的实体描述
【发布时间】:2019-12-16 19:28:42
【问题描述】:

我已经成功地训练了一个 spacy 实体链接模型(显然是由 限制数据)。

我的问题是如何显示描述 来自 kb 的实体作为输出?


import spacy
nlp = spacy.load(r"D:\el model\nlp")
doc = nlp("Amir Khan is a great boxer")
ents = [(e.text, e.label_, e.kb_id_) for e in doc.ents]
print(ents) 

【问题讨论】:

    标签: spacy named-entity-recognition entity-linking


    【解决方案1】:

    正如 Sofie Van Landeghem(Spacy Entity Linking 代表)所说。 由于性能原因,描述当前未存储在 KB 本身中。但是,从处理过程中的中间结果来看,您应该有一个文件 entity_descriptions.csv,它以简单的表格格式将 WikiData ID 映射到其描述。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-02-02
      • 2023-04-02
      • 1970-01-01
      • 2020-03-21
      • 1970-01-01
      • 2020-05-22
      • 2016-09-11
      • 2020-02-20
      相关资源
      最近更新 更多