原始数据:
<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>
使用Stanford NER处理:
<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>
现在,这是一个包含人Myles Brand
和组织National Collegiate Athletic Association
的句子。
在Freebase中,我们让这两个实体共享President
的关系键,如您所见:
Freebase关系:
有人会认为下面的代码可以解决问题based on this question,但事实上它并没有,尽管从上面的图片可以看出,Freebase似乎在他们的代码中保持了这两个实体之间的关系语料库。这是我做错了吗?
我一直在here玩弄它。
[{
"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程序来依次找出所有这些的关系,是否有人有一个像这样的程序的例子我可以看看?
我想知道的真实情况是,一旦我有了关系,用距离监督语料库来区分这些关系的最佳方法是什么,我对它最终看起来如何看起来感到困惑。一直都很健康。
答案 0 :(得分:0)
你在Freebase方面遇到了一些问题。首先,Myles Brand和NCAA之间的关系不是直接关系,而是由代表其就业的节点调解。此节点具有指向雇主,员工,其职位,开始日期和结束日期的链接。其次,反射查询比标准MQL查询具有更强的方向性,在这种情况下,Myles Brand是目标,而不是源。
此查询将显示指向/business/employment_tenure
节点的链接:
[{
"type": "/type/link",
"source": {
"id": null
},
"master_property": null,
"target": {
"id": "/en/myles_brand"
}
}]
但需要扩展以处理您尝试查找的多跳关系(并提取标题)。
如果您拥有足够小的一组您感兴趣的关系,那么您可以直接测试关系,而不是使用反射进行此操作。
例如,您可以使用以下方法测试雇佣关系(并获取标题,如果有的话):
[{
"/business/employment_tenure/person" : { "id" : "/en/myles_brand" },
"/business/employment_tenure/company" : { "id" : "/en/national_collegiate_athletic_association" },
"/business/employment_tenture/title": null
}]