开发者

Find all keys/names of a Freebase object?

I am trying to figure out how to query freebase (or their data dumps) for a certain person or company name and get back a list of all the other "keys" or "names" for that item. I want to use the results to prevent duplicate tags in my content organization.

How do I query freebase for all the names of a given item?

For example, this page on IBM lists the following names (or "ke开发者_开发知识库ys") for the term "IBM".

  • International_Business_Machines
  • IBM
  • IBM_computer
  • IBM_Japan_Ltd
  • IBM_Machines
  • IBM_Software_Group
  • etc...


This will get you all the keys:

{
  "id": "/en/ibm",
  "key" : []
}

If you just want the ones from English Wikipedia, you can use:

{
  "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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜