Getting Wikipedia IDs in MQL

随声附和 提交于 2019-12-06 15:31:44

If you only want one wpid value per mid you could do something like this:

[{
  "mid": null,
  "key": {
    "namespace": "/wikipedia/en_id",
    "value":     null,
    "limit":     1
  }
}]​

Try it out

Bare in mind that it is entirely possible that a Freebase topic would have more than one wmid. This happens whenever we need to merge duplicate topics that we've imported from Wikipedia, or if we import them before they get merged in Wikipedia.

If you're looking for links to Wikipedia pages you might also be interested in the /wikipedia/en_title namepace:

[{
  "mid": null,
  "key": {
    "namespace": "/wikipedia/en_title",
    "value":     null,
    "limit":     1
  }
}]​

Try it out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!