有办法从维基百科 XML 文件中删除内部链接吗?

发布于 2024-07-15 13:14:36 字数 73 浏览 4 评论 0 原文

如果我已经下载了 Wikipedia XML 转储,是否有任何方法可以从 XML 文件中删除所有内部链接?

谢谢

If I have downloaded Wikipedia XML dumps, is there any way of removing all of the internal links from within an XML file?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

差↓一点笑了 2024-07-22 13:14:36

如果您要将它们导入本地 wiki,您可以做的一件事是导入您想要的所有文件,然后使用机器人(例如 pywikipediabot 很容易使用)来摆脱所有内部链接。

One thing you could do, if you are importing them into a local wiki, is to import all the files you want, then use a robot (eg. pywikipediabot is easy to use) to get rid of all the internal links.

空城之時有危險 2024-07-22 13:14:36

维基百科数据库转储和有关使用它们的信息位于此处:维基百科:数据库下载。 您应该这样做,而不是编写脚本来抓取维基百科。

Wikipedia database dumps and information about using them are located here: Wikipedia:Database download. You should do this instead of writing a script to scrape Wikipedia.

ぃ弥猫深巷。 2024-07-22 13:14:36

我会尝试使用 XSLT 将 XML 文件转换为另一个 XML 文件。

I would try to use XSLT to transform the XML file into another XML file.

满意归宿 2024-07-22 13:14:36

您可以在您最喜欢的文本编辑器中进行搜索和替换,将 [[ 和 ]] 替换为空。

You could do a search and replace in your favorite text editor, replacing [[ and ]] with nothing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文