是否从导出的Wikipedia文章中检索中介语言链接? [英] Retrieving the Interlanguage links from an exported Wikipedia article?
问题描述
我以前通过用一些正则表达式解析导出内容来从导出的Wikipedia文章中检索语言间链接.
I used to retrieve the interlanguage links from an exported Wikipedia article by parsing the export with some regular expressions.
在 WikiData项目的第1阶段中,这些链接已移至单独的页面在Wikidata上.
In phase 1 of the WikiData project these links have been moved to a separate page on Wikidata.
例如,文章矿石山在导出中不再具有语言链接.语言链接现在位于 Q4198 .
For example the article Ore Mountains has no language links anymore in the export. The language links are now on Q4198.
如何导出语言链接?
推荐答案
我从使用导出到API的方式进行了更改.您可以使用属性"langlinks"检索维基百科之间的语言链接,如下所示:
I changed from using the export to the API. You can retrieve the interwikilanguage links with the property "langlinks", like this:
http://en. wikipedia.org/w/api.php?action=query&titles=Ore%20Mountains&prop=langlinks
这篇关于是否从导出的Wikipedia文章中检索中介语言链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!