【问题标题】:regarding freebase library (how to use bol (film) title as id?)关于freebase库(如何使用bol(电影)标题作为id?)
【发布时间】:2011-10-30 06:42:43
【问题描述】:

我正在使用 freebase 库来打印这篇文章。一切正常。但我想问你一件事。以下示例工作正常。假设我有这样的标题bol (film)。现在我想像"id": "/en/bol_(film)", 这样使用这个标题。但这不起作用。在 wikipedia API 中,我们可以使用这个标题为bol20%28%film29%。谁能帮我?非常感谢

  query = [{
          "id": "/en/barak_obama",
          "/common/topic/article": [{
            "id": None
          }],
          "/common/topic/image": [{
            "id": None
          }]
        }]

编辑:我已经为 freebase 站点阅读了此内容。但这不起作用。 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.

【问题讨论】:

    标签: python freebase


    【解决方案1】:

    不能保证给定标题“Foo”会有一个 id /en/foo。为了为您的主题找到正确的 id,您必须使用搜索服务来获取候选 id 列表,或者使用 MQL 进行精确的短语匹配。

    搜索 https://www.googleapis.com/freebase/v1-sandbox/search?query=bol

    http://tinyurl.com/3w9yvyz

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-01
      • 2015-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多