关于 freebase 库(如何使用 bol(电影)标题作为 id?)
我正在使用 freebase 库来打印文章。一切正常。但我想问你一件事。以下示例工作正常。假设我有这样的标题 bol(电影)
。现在我想像这样使用这个标题 "id": "/en/bol_(film)",
。但这不起作用。在维基百科 API 中,我们可以将此标题用作 bol20%28%film29%
。有人可以帮助我吗?非常感谢
query = [{
"id": "/en/barak_obama",
"/common/topic/article": [{
"id": None
}],
"/common/topic/image": [{
"id": None
}]
}]
编辑:我已经在 freebase 网站上阅读了这篇文章。但这不起作用。 例如,完全限定名称中的 $0028 表示左括号,$0029 表示右括号。 (有关完全限定名称中合法字符的完整列表,请参阅第 2.5.9 节。
I'm using freebase library to print the article. All is working fine. But I want to ask something from you. Following example working fine. Suppose I have title like this bol (film)
. Now I want to use this title like this "id": "/en/bol_(film)",
. But This is not working. In wikipedia API, We can use this title as bol20%28%film29%
. Can any one help me? thanks so much
query = [{
"id": "/en/barak_obama",
"/common/topic/article": [{
"id": None
}],
"/common/topic/image": [{
"id": None
}]
}]
EDIT : I have read this for freebase site. But This is not working.For example, $0028 in a fully-qualified name represents a left parenthesis and $0029 represents a right parenthesis. (See Section 2.5.9 for the full list of legal characters in fully-qualified names.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不保证给定标题“Foo”会有一个 id /en/foo。为了找到适合您主题的正确 ID,您必须使用搜索服务获取候选 ID 列表,或者使用 MQL 进行精确短语匹配。
搜索
https://www.googleapis.com/freebase/v1-sandbox/search ?query=bol
或
http://tinyurl.com/3w9yvyz
There is no guarantee that there will be an id /en/foo for a given title "Foo". In order to find the correct id for your topic you have to either use the search service to get a list of candidate ids, or use MQL for exact phrase matches.
Search
https://www.googleapis.com/freebase/v1-sandbox/search?query=bol
or
http://tinyurl.com/3w9yvyz