title string | url string | wiki_id int64 | text string | annotations list | language string |
|---|---|---|---|---|---|
Anarchism | http://en.wikipedia.org/wiki/Anarchism | 12 | Anarchism.
Anarchism is a political philosophy that advocates self-governed societies based on voluntary institutions. These are often described as stateless societies, although several authors have defined them more specifically as institutions based on non-hierarchical free associations. Anarchism considers the state... | [
{
"surface_form": "political philosophy",
"uri": "Political_philosophy",
"offset": 26
},
{
"surface_form": "self-governed",
"uri": "Self-governance",
"offset": 62
},
{
"surface_form": "stateless societies",
"uri": "Stateless_society",
"offset": 148
},
{
"surface_f... | en |
Autism | http://en.wikipedia.org/wiki/Autism | 25 | Autism.
Autism is a neurodevelopmental disorder characterized by impaired social interaction, verbal and non-verbal communication, and restricted and repetitive behavior. Parents usually notice signs in the first two years of their child's life. These signs often develop gradually, though some children with autism reac... | [
{
"surface_form": "neurodevelopmental disorder",
"uri": "Neurodevelopmental_disorder",
"offset": 20
},
{
"surface_form": "social interaction",
"uri": "Interpersonal_relationship",
"offset": 74
},
{
"surface_form": "verbal",
"uri": "Language_acquisition",
"offset": 94
},... | en |
Albedo | http://en.wikipedia.org/wiki/Albedo | 39 | "Albedo.\nAlbedo () or reflection coefficient, derived from Latin \"albedo\" \"whiteness\" (or refle(...TRUNCATED) | [{"surface_form":"Latin","uri":"Latin","offset":58},{"surface_form":"diffuse reflectivity","uri":"Di(...TRUNCATED) | en |
A | http://en.wikipedia.org/wiki/A | 290 | "A.\nA (named, plural \"As\", \"A's\", \"a\"s, \"a's\" or \"aes\") is the first letter and the first(...TRUNCATED) | [{"surface_form":"letter","uri":"Letter_(alphabet)","offset":68},{"surface_form":"vowel","uri":"Vowe(...TRUNCATED) | en |
Alabama | http://en.wikipedia.org/wiki/Alabama | 303 | "Alabama.\nAlabama () is a state located in the southeastern region of the United States. It is bord(...TRUNCATED) | [{"surface_form":"state","uri":"U.S._state","offset":25},{"surface_form":"southeastern region","uri"(...TRUNCATED) | en |
Achilles | http://en.wikipedia.org/wiki/Achilles | 305 | "Achilles.\nIn Greek mythology, Achilles (;, \"Akhilleus\",) was a Greek hero of the Trojan War and (...TRUNCATED) | [{"surface_form":"Greek mythology","uri":"Greek_mythology","offset":13},{"surface_form":"Greek","uri(...TRUNCATED) | en |
Abraham_Lincoln | http://en.wikipedia.org/wiki/Abraham_Lincoln | 307 | "Abraham Lincoln.\nAbraham Lincoln (; February 12, 1809 – April 15, 1865) was the 16th President o(...TRUNCATED) | [{"surface_form":"16th President of the United States","uri":"List_of_Presidents_of_the_United_State(...TRUNCATED) | en |
Aristotle | http://en.wikipedia.org/wiki/Aristotle | 308 | "Aristotle.\nAristotle (;, \"Aristotélēs\"; 384–322 BC) was a Greek philosopher and scientist b(...TRUNCATED) | [{"surface_form":"Greek","uri":"Greeks","offset":58},{"surface_form":"philosopher","uri":"Philosophe(...TRUNCATED) | en |
An_American_in_Paris | http://en.wikipedia.org/wiki/An_American_in_Paris | 309 | "An American in Paris.\n\"An American in Paris\" is a jazz-influenced symphonic poem by the American(...TRUNCATED) | [{"surface_form":"jazz","uri":"Jazz","offset":50},{"surface_form":"symphonic poem","uri":"Symphonic_(...TRUNCATED) | en |
Academy_Award_for_Best_Production_Design | http://en.wikipedia.org/wiki/Academy_Award_for_Best_Production_Design | 316 | "Academy Award for Best Production Design.\nThe Academy Awards are the oldest awards ceremony for ac(...TRUNCATED) | [{"surface_form":"Academy Award","uri":"Academy_Award","offset":46},{"surface_form":"Academy","uri":(...TRUNCATED) | en |
Annotated Wikipedia 2016
English Wikipedia (~2016 snapshot) processed into JSON, with inline hyperlinks preserved as gold-aligned entity-link annotations. Each article carries its full plain text plus a list of (surface_form, target_uri, character_offset) tuples — one per wikilink in the source.
This release just re-shards the original ~5 GB stored zip (extracted/AA/wiki00 … extracted/NN/wiki47, 35,148 JSONL chunk files) into parquet with a unified pyarrow schema. No filtering, no text normalisation, no entity-set restriction. Offsets are byte-faithful character offsets into text — verified to round-trip exactly.
Mirror of the raw zip: alvations/stash · wikipedia-json/.
Usage
from datasets import load_dataset
ds = load_dataset("alvations/annotated-wiki-2016", split="train", streaming=True)
ex = next(iter(ds))
print(ex["title"], "—", len(ex["annotations"]), "links")
# Anarchism — 639 links
# offsets line up with text spans
for a in ex["annotations"][:3]:
s = ex["text"][a["offset"]:a["offset"] + len(a["surface_form"])]
assert s == a["surface_form"]
print(a["surface_form"], "->", a["uri"])
Streaming is recommended — the full train split is multi-GB and 1M+ rows.
Schema
| Column | Type | Description |
|---|---|---|
title |
string | Article title, URL-decoded from the wiki URL path. |
url |
string | Original Wikipedia URL, e.g. http://en.wikipedia.org/wiki/Anarchism. |
wiki_id |
int64 | Wikipedia page ID (the source dump stored it as a 1-element list — flattened here). |
text |
string | Full article plain text (no markup, no infoboxes). |
annotations |
list<struct<surface_form: string, uri: string, offset: int32>> | One entry per outgoing wikilink in the article. |
language |
string | Always "en" in this release. |
Annotation semantics
Each annotation marks one outgoing hyperlink in the source wikitext:
surface_form— the literal text span as it appears in the article (the link's anchor text).uri— the linked target page, in Wikipedia URL form with underscores, e.g.Political_philosophy. Use as-is for joining against page-id tables; no namespace prefix.offset— zero-based character offset intotextwheresurface_formbegins.text[offset : offset + len(surface_form)] == surface_formis guaranteed.
Anchors are not deduplicated, redirected, or filtered — multiple links to the same target appear separately, and dangling/redirect targets are kept verbatim.
Sharding
Parquet shards are grouped by the source zip's two-letter subdirectory (extracted/<XX>/):
data/AA.parquet
data/AB.parquet
...
data/NN.parquet (352 shards total)
Each shard is ~25 MB compressed (snappy), holding roughly 1,800–4,500 articles depending on average article length in that bucket.
Source
Re-packaged from the upstream zip wikipedia-json.zip (5.0 GB stored / 18 GB uncompressed), which was itself the output of processing an English Wikipedia dump with a wikiextractor-style pipeline that retained wikilinks as offset annotations. The dataset is named 2016 after the apparent dump year of the upstream archive.
License
Wikipedia text is distributed under CC BY-SA 3.0 (with parts also under the GFDL). Attribution: contributors to the English Wikipedia. Reuse must preserve attribution and ShareAlike.
Provenance of this release
- Source:
wikipedia-json.zip— mirrored atalvations/stash · wikipedia-json/wikipedia-json.zip. - Conversion: streamed via
zipfile.ZipFile.open()without on-disk extraction; one parquet shard per source subdir; nested annotations stored aslist<struct>for native pyarrow / Polars / DuckDB consumption. - No row filtering, deduplication, redirect resolution, or text cleanup applied.
- Downloads last month
- 460