gpt4 book ai didi

主题摘要和图像的 Freebase MQL 查询?

转载 作者:行者123 更新时间:2023-12-04 13:25:12 26 4
gpt4 key购买 nike

我正在尝试写一个 MQL query使用 Freebase 执行蜜蜂。我想检索主题摘要和主题图像。

我已经能够计算出以下查询,它将为我提供与 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"
}
]

最佳答案

图像和主题摘要分别存储在内容存储库中,可通过 another web service API 访问。 .

例如,比尔盖茨的图像可以这样访问:

http://www.freebase.com/api/trans/raw/guid/9202a8c04000641f8000000004fb4c01

同样,可以通过在查询中将/common/topic/image 替换为/common/topic/article 来找到主题摘要的 GUID。结果可以像这样再次访问:

http://www.freebase.com/api/trans/raw/guid/9202a8c04000641f8000000008bfed35

您可以阅读有关内容存​​储的更多信息 here .

关于主题摘要和图像的 Freebase MQL 查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/676204/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com