Skip to main content
Open on GitHub

MediaWikiDump

MediaWiki XML Dumps contain the content of a wiki (wiki pages with all their revisions), without the site-related data. A XML dump does not create a full backup of the wiki database, the dump does not contain user accounts, images, edit logs, etc.

安装与设置

我们需要安装几个 Python 包。

mediawiki-utilities 在未合并的分支中支持 XML 模式 0.11。

pip install -qU git+https://github.com/mediawiki-utilities/python-mwtypes@updates_schema_0.11

mediawiki-utilities mwxml 存在一个错误,修复的PR正在等待中。

pip install -qU git+https://github.com/gdedrouas/python-mwxml@xml_format_0.11
pip install -qU mwparserfromhell

文档加载器

查看一个 使用示例

from langchain_community.document_loaders import MWDumpLoader
API 参考:MWDumpLoader