【问题标题】:How to Map Freebase to Wikipedia in Python如何在 Python 中将 Freebase 映射到维基百科
【发布时间】:2022-01-01 02:48:22
【问题描述】:

由于 Freebase 已弃用,我在尝试将 Freebase 映射到 Wikipedia 时遇到了问题。我知道有一种方法是下载 Freebase Dump 并将 Freebase 替换到 Wikipedia,但由于数据量大,可能无法实现。那么还有其他方法可以将 Freebase 映射到 Wikipedia 吗?谢谢!

【问题讨论】:

    标签: python wikipedia freebase knowledge-graph


    【解决方案1】:

    您可以使用提供Freebase ID 属性的Wikidata。

    这样的 SPARQL 查询会在英语维基百科上查找相应的文章,其 Freebase ID 为“/m/0154j”。

    SELECT
      ?article
    WHERE 
    {
      ?article schema:about ?item;
          schema:isPartOf <https://en.wikipedia.org/> .
      ?item wdt:P646 "/m/0154j";
    }
    

    Try it

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多