| --- |
| |
| license: cc-by-sa-3.0 |
| language: |
| - en |
| - de |
| - fr |
| - es |
| - it |
| - ja |
| - ru |
| - zh |
| size_categories: |
| - 100K-1M |
| --- |
| |
|
|
| # Arch Wiki - JSONL Dataset |
|
|
| This dataset provides the complete Arch Linux Wiki in a clean, machine‑readable JSON Lines format (.jsonl). |
| It is derived from the official arch-wiki-docs package, which contains static HTML exports of all language versions. |
|
|
| Each line is one wiki page, with extracted plain text, headings, language code, and a relative URL path – ready for RAG (Retrieval-Augmented Generation), embedding, full‑text search, or offline browsing. |
|
|
| ## Dataset Structure |
|
|
| One JSON object per line. Example: |
|
|
| { |
| "lang": "en", |
| "title": "Arch Linux", |
| "url_path": "en/Arch_Linux.html", |
| "content": "Arch Linux is an independently developed, x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software...", |
| "headings": ["Arch Linux", "History", "Installation", "Package management"] |
| } |
|
|
| | Field | Type | Description | |
| |------------|--------------|-------------| |
| | lang | string | Two‑letter language code (e.g., en, fr, de). Chinese variants are zh-hans/zh-hant. | |
| | title | string | Page title as displayed in the wiki (without “ - ArchWiki” suffix). | |
| | url_path | string | Path relative to the root of the offline dump (e.g., en/Arch_Linux.html). | |
| | content | string | Clean plain‑text version of the article. All HTML tags, edit links, tables of contents, and navigation elements have been removed. | |
| | headings | list[string] | All h1, h2, h3 headings found on the page, in order of appearance. | |
|
|
| ## Statistics |
|
|
| - Total pages: 5,713 (may vary slightly with updates) |
| - Languages: All languages served by the official Arch Wiki (determined by the arch-wiki-docs package) |
| - Average content length: ~2,500 characters per page |
| - File size (compressed): ~50‑80 MB (.7z or .gz) |
| - File size (uncompressed JSONL): ~200‑300 MB |
|
|
| ## Usage |
|
|
| Load with Hugging Face datasets: |
|
|
| from datasets import load_dataset |
| |
| dataset = load_dataset("your-username/arch-wiki-jsonl", split="train") |
|
|
| # Examine a page |
| print(dataset[0]["title"]) |
| print(dataset[0]["content"][:500]) |
|
|
| Load from raw JSONL (pure Python): |
|
|
| import json |
|
|
| pages = [] |
| with open("arch_wiki.jsonl", "r", encoding="utf-8") as f: |
| for line in f: |
| pages.append(json.loads(line)) |
| |
| # Filter by language |
| en_pages = [p for p in pages if p["lang"] == "en"] |
|
|
| Build a simple RAG pipeline (example with LangChain): |
|
|
| from langchain.document_loaders import JSONLoader |
| from langchain.text_splitter import RecursiveCharacterTextSplitter |
|
|
| loader = JSONLoader( |
| file_path="arch_wiki.jsonl", |
| jq_schema=".content", |
| text_content=False |
| ) |
| documents = loader.load() |
| text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=50) |
| chunks = text_splitter.split_documents(documents) |
| # → now embed and index |
| |
| ## Licenses and Attribution |
|
|
| The content of the Arch Wiki is licensed under the GNU Free Documentation License 1.3 and Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0). |
|
|
| This dataset is a derivative work. Full attribution to the Arch Linux community and all wiki contributors is required. When using this dataset, please include: |
|
|
| > Based on the Arch Linux Wiki (https://wiki.archlinux.org/), available under CC BY‑SA 3.0 and GFDL. |
|
|
| The conversion script is provided under the Apache 2.0 License. |
|
|
| ## Generation Process |
|
|
| * Download from the arch-wiki-docs package (`sudo pacman -S arch-wiki-docs`) |
| * Upload to my cloud storage (I downloaded it in a VM, I use Debian on my system) |
| * Download it and run this python script to convert it to .JSON: https://github.com/dapper-11/docs-to-json |
| * Upload to huggingface.co |
|
|
| ## Changelog |
|
|
| - 2026-05-27: Initial release based on arch-wiki-docs version as of May 27 2026. |
|
|
| ## Notes |
|
|
| - This dataset is static. For the very latest wiki content, regenerate from an updated arch-wiki-docs package or pull from the live wiki. |
| - If you need the original HTML (e.g., for full styling), install arch-wiki-docs directly on an Arch Linux system. |
| - The headings field is useful for document structure‑aware chunking (e.g., split by heading boundaries). |
|
|