simplewiki / README.md
jph00's picture
Update simplewiki to 20260801
1cffe6d verified
|
Raw
History Blame
4.41 kB
metadata
license: cc-by-sa-4.0
language:
  - en
configs:
  - config_name: articles
    default: true
    data_files: data/articles/*.parquet
  - config_name: chunks
    data_files: data/chunks/*.parquet

Simple English Wikipedia as clean md

This dataset is a cleaned, structurally faithful approximation of the Simple English Wikipedia article corpus in Answer.AI's canonical md dialect. It was produced from the Wikimedia dump dated 20260801 by Answer.AI's parse-wiki pipeline.

It is designed for language-model training and for agent/RAG systems. The articles configuration provides complete documents for continued pretraining, corpus analysis, rechunking, and task-specific dataset creation. The chunks configuration provides section-aware retrieval units without duplicating article text: every chunk is a UTF-8 byte range into an article plus a small Markdown heading prefix. This keeps the corpus compact while preserving useful article and section breadcrumbs.

Contents

  • articles — 268,985 cleaned articles with dense article_id, Wikimedia page and revision IDs, title, revision timestamp, complete md, and conversion warnings.
  • chunks — 304,133 chunk indexes targeting about 700 words, with article_id, per-article chunk_id, UTF-8 start_byte/byte_len, prefix_md, start_kind, and word_count.

The article row number equals article_id, and chunk rows are ordered by article_id then chunk_id. UTF-8 byte offsets—not Python character offsets—are used so ranges are stable across languages and tools.

from datasets import load_dataset

articles = load_dataset("answerdotai/simplewiki", "articles", split="train")
chunks = load_dataset("answerdotai/simplewiki", "chunks", split="train")

def materialize(article, chunk):
    body = article["md"].encode()
    start = chunk["start_byte"]
    return chunk["prefix_md"] + body[start:start + chunk["byte_len"]].decode()

chunk = chunks[100]
text = materialize(articles[chunk["article_id"]], chunk)

materialize.py contains the same dependency-free reconstruction helper. Retrieval systems can store chunk rows in their vector index, fetch the corresponding article by dense row ID, and reconstruct only selected chunks. Training pipelines can stream complete article rows or materialize chunk rows on demand.

Processing

Redirects, disambiguation pages, and very short pages are excluded. References, footnotes, navigation boxes, sidebars, maintenance notices, citations, and other non-article material are removed. Links, lists, tables, math, and common templates are converted to md; other templates are retained in a readable form where possible.

Chunks target about 700 words and prefer section boundaries. Each chunk stores byte offsets into its article plus the headings needed to identify its section.

manifest.json records the dump date, settings, checksums, and row counts.

Uses and limitations

Useful applications include language-model pretraining or adaptation, embedding and retrieval corpora, grounded agent knowledge stores, search, summarization, and experiments with alternative chunking strategies. page_id, revision_id, and timestamp support provenance, exact revision links, auditing, and future incremental updates.

This is intentionally a fast, useful approximation rather than a browser-perfect rendering. MediaWiki templates requiring server-side expansion may be simplified, removed, or retained as raw syntax. Images and Wikipedia-only presentation/navigation are generally omitted. Consumers requiring exact current facts should follow the stored revision provenance and compare against Wikimedia.

License and attribution

Wikipedia text is provided by its contributors under the Creative Commons Attribution-ShareAlike 4.0 License and may also be available under the GFDL. This transformed dataset is distributed under CC BY-SA 4.0. Attribute Simple English Wikipedia contributors, link to the relevant article or revision, and indicate that the text was transformed by Answer.AI's parse-wiki pipeline. For a row, an exact revision URL is:

url = f"https://simple.wikipedia.org/w/index.php?oldid={article['revision_id']}"

See Wikimedia's reuse guidance for full terms.