首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >远程监督:如何将命名实体连接到freebase (KB)关系

远程监督:如何将命名实体连接到freebase (KB)关系
EN

Stack Overflow用户
提问于 2015-04-13 15:27:34
回答 1查看 498关注 0票数 2

我正在创建一个远程监控语料库。到目前为止,我已经组装了数据,并通过NER系统传递了它,因此您可以看到下面的示例。

原始数据:

代码语言:javascript
复制
<p>
Myles Brand, the president of the National Collegiate Athletic Association, said in a telephone interview that he had not been approached about whether the N.C.A.A. might oversee a panel for the major bowl games similar to the one that chooses teams for the men's and women's basketball tournaments.
</p>

使用斯坦福NER进行处理:

代码语言:javascript
复制
<p>
<PERSON>Myles Brand</PERSON>, the president of the <ORGANIZATION>National Collegiate Athletic Association</ORGANIZATION>, said in a telephone interview that he had not been approached about whether the <ORGANIZATION>N.C.A.A.</ORGANIZATION> might oversee a panel for the major bowl games similar to the one that chooses teams for the men's and women's basketball tournaments.
</p>

下面是一个包含person Myles Brand和organization National Collegiate Athletic Association的句子。

在Freebase中,您可以看到,这两个实体共享President的关系纽带:

Freebase关系:

有人会认为下面的代码会起作用,based on this question,但实际上它没有,尽管如你从上面的图片中看到的,Freebase似乎在他们的语料库中保持了这两个实体之间的关系。这是不是我做错了什么?

我一直在here中使用它。

代码语言:javascript
复制
[{ 
 "type" : "/type/link", 
 "source" : { "id" : "/en/myles_brand" }, 
 "master_property" : null, 
 "target" : { "id" : "/en/national_collegiate_athletic_association" }, 
 "target_value" : null 
}]

此外,我有成千上万的实体对,我想我可以使用Freebase java API编写一些简短的Java程序来依次计算出所有这些实体对的关系,有谁有这样的程序示例可以让我看一看?

但我真正想知道的是,一旦我有了关系,什么是将这些关系与远程监控语料库相结合的最好方法,当它们最终组合在一起时,我很困惑。

EN

回答 1

Stack Overflow用户

发布于 2015-06-11 00:56:53

你在Freebase方面遇到了一些问题。首先,Myles Brand和NCAA之间的关系不是直接的关系,而是通过代表他的就业的节点进行调解。此节点具有指向雇主、员工、职务、开始日期和结束日期的链接。其次,反射查询比标准MQL查询具有更强的方向性,在这种情况下,Myles Brand是目标,而不是源。

此查询将显示指向/business/employment_tenure节点的链接:

代码语言:javascript
复制
[{
  "type": "/type/link",
  "source": {
    "id": null
  },
  "master_property": null,
  "target": {
    "id": "/en/myles_brand"
  }
}]

但它需要进行扩展,以处理您正在尝试查找的多跳关系(并提取标题)。

您可以直接测试关系,而不是使用反射,如果您有足够少的一组您感兴趣的关系。

例如,您可以使用以下命令测试雇佣关系(并获取标题,如果有):

代码语言:javascript
复制
[{  
 "/business/employment_tenure/person" : { "id" : "/en/myles_brand" }, 
 "/business/employment_tenure/company" : { "id" : "/en/national_collegiate_athletic_association" }, 
 "/business/employment_tenture/title": null
}]
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29599945

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档