【发布时间】:2009-03-24 05:01:16
【问题描述】:
我正在尝试编写一个MQL query 以使用Freebase API 执行。我想检索主题摘要和主题图像。
我已经能够计算出以下查询,它将为我获取与 Bill Gates 主题相关联的图像。
MQL:
[
{
"/common/topic/image" : [
{
"id" : null
}
],
"name" : "bill gates",
"type" : "/people/person"
}
]
结果:
[
{
"/common/topic/image" : [
{
"id" : "/guid/9202a8c04000641f8000000004fb4c01"
},
{
"id" : "/wikipedia/images/commons_id/4486276"
}
],
"name" : "Bill Gates",
"type" : "/people/person"
}
]
对于那些过去可能没有接触过 MQL 但有兴趣尝试它的人。查看Freebase MQL Query Editor。
billg profile page http://i.friendfeed.com/c31a22d9e439eb67b0feeb4ffd64c3b5ed9a8e16
更新
我最终使用的查询:
[
{
"/common/topic/image" : [
{
"id" : null
}
],
"article" : [
{
"content" : null
}
],
"name" : "bill gates",
"type" : "/common/topic"
}
]
这些结果可以结合 narphorium 的回答来检索实际数据:
[
{
"/common/topic/image" : [
{
"id" : "/guid/9202a8c04000641f8000000004fb4c01"
},
{
"id" : "/wikipedia/images/commons_id/4486276"
}
],
"article" : [
{
"content" : null
},
{
"content" : "/guid/9202a8c04000641f800000000903535d"
}
],
"name" : "Bill Gates",
"type" : "/common/topic"
}
]
【问题讨论】:
-
哇,它居然叫“Freebase?”
-
是的,很酷