我试图弄清楚如何查询某个人或公司名称的freebase(或他们的数据转储)并获取该项目的所有其他“键”或“名称”的列表。我想使用结果来防止我的内容组织中出现重复的标签。
如何查询 freebase以获取给定项目的所有名称?
例如, IBM 上的此页面列出了术语“IBM”的以下名称(或“键”)。
- 国际_业务_机器
- IBM
- IBM_计算机
- IBM_Japan_Ltd
- IBM_机器
- IBM_Software_Group
- ETC...
我试图弄清楚如何查询某个人或公司名称的freebase(或他们的数据转储)并获取该项目的所有其他“键”或“名称”的列表。我想使用结果来防止我的内容组织中出现重复的标签。
如何查询 freebase以获取给定项目的所有名称?
例如, IBM 上的此页面列出了术语“IBM”的以下名称(或“键”)。
这将为您提供所有密钥:
{
"id": "/en/ibm",
"key" : []
}
如果您只想要英文维基百科中的那些,您可以使用:
{
"id": "/en/ibm",
"key" : [
"namespace" : "/wikipedia/en",
"value" : null
]
}
You can try them out in the query editor at http://www.freebase.com/queryeditor and click "mqlread" (top right) to get it transformed into a raw API call that you can use in your code.