Enwiki Person Pages for Persona Extraction
This dataset contains English Wikipedia pages for entities tagged as real people or fictional characters through Wikidata. It is intended as a source corpus for persona dimension extraction, persona field assignment, retrieval, and demo systems that need page content for people and characters.
Use the cleaned text layer by default if your goal is to get a person's page content. The raw wikitext layer is included for traceability and for users who want to run their own parser.
Scope
- Source project:
enwiki - Dump date:
20260601 - Candidate pages:
2161995 - Candidate real-person pages:
2132388 - Candidate fictional-character pages:
29744 - Candidate pages tagged as both:
137 - Kept raw pages:
2125897 - Kept raw real-person pages:
2105239 - Kept raw fictional-character pages:
20793 - Kept raw pages tagged as both:
135
Files
Core metadata and filters:
manifest.json: raw extraction inputs, counts, and per-shard statistics.person_candidates.jsonl.gz: page-to-Wikidata candidate labels.person_attributes.jsonl.gz: Wikidata-derived fields useful for filtering.wikidata_labels.jsonl.gz: English display labels for QIDs used in filters.
Raw page content:
person_pages_raw/part-*.jsonl.gz: raw English Wikipedia records with fullwikitext.
Clean page content:
person_text_derivatives/manifest.json: clean-text derivation settings and counts.person_text_derivatives/qa_report.json: QA report for markup residue and length checks.person_text_derivatives/person_pages_clean/part-*.jsonl.gz: one cleaned page per row.person_text_derivatives/person_page_sections/part-*.jsonl.gz: one cleaned section per row.person_text_derivatives/person_page_chunks/part-*.jsonl.gz: retrieval-size chunks derived from cleaned sections.
Which Layer Should I Use?
Use person_text_derivatives/person_pages_clean when you want the full cleaned
page content for each person or character.
Use person_text_derivatives/person_page_sections when you want to extract a
specific type of information from section-level context, such as biography,
career, education, works, reception, or appearances.
Use person_text_derivatives/person_page_chunks when you want to build a search
index or retrieval pipeline. Chunks are about 2000 characters with 200-character
overlap.
Use person_pages_raw only if you need raw wikitext, media references, or a
different parsing strategy.
Clean Text Layer
The clean-text layer was derived from person_pages_raw with
mwparserfromhell plus post-processing for malformed wiki markup.
- Clean pages:
2125897 - Sections:
7406458 - Chunks:
7852032 - Plain text characters:
6102567572 - Chunk size:
2000 - Chunk overlap:
200 - Minimum section length:
80 - Minimum chunk length:
120
The QA report checks for residual wiki templates, wiki links, ref tags, HTML
comments, tables, category links, and file/image links. In the uploaded
derivative layer, all checked residual-markup counts are 0 for clean pages,
sections, and chunks.
Some pages are naturally short Wikipedia stubs. In the QA report, 144505
clean pages are below 200 characters, 7868 pages have no kept section, and
38031 pages have no kept chunk. These are usually low-information source
pages, not parser failures. For higher-quality persona extraction, consider
filtering to plain_text_chars >= 500 or plain_text_chars >= 1000.
Row Formats
Rows in person_text_derivatives/person_pages_clean/part-*.jsonl.gz include:
page_idqidtitleentity_typetagssource_projectsource_dumpsource_urlrevision_idrevision_timestampplain_textplain_text_charssection_countchunk_countmedia_refs
Rows in person_text_derivatives/person_page_sections/part-*.jsonl.gz include
the same page metadata plus:
section_idsection_indexheadingleveltextchar_count
Rows in person_text_derivatives/person_page_chunks/part-*.jsonl.gz include
the same page metadata plus:
chunk_idsection_idsection_indexsection_headingchunk_indextextchar_count
Rows in person_pages_raw/part-*.jsonl.gz include raw page records with:
page_idqidtitleentity_typetagssource_projectsource_dumpsource_urlrevision_idrevision_timestampwikitext
Sitelinks
A Wikidata sitelink connects a Wikidata item, such as Q937, to a page on a
specific Wikimedia site, such as English Wikipedia.
This dataset is an enwiki release. For each kept row, the fields qid,
title, source_project, and source_url identify the English Wikipedia
sitelink used for that item:
qid: the Wikidata item ID.source_project: alwaysenwikiin this release.title: the English Wikipedia page title for that item.source_url: the corresponding English Wikipedia page URL.
This release does not include the full multilingual Wikidata sitelink table. To add multilingual titles later, join these QIDs against Wikidata sitelinks or the Wikidata API.
Filter Attributes
person_attributes.jsonl.gz contains Wikidata-derived filter fields. Item-valued
fields are stored as QIDs; date fields also include derived year fields.
- Attribute rows:
2161994 gender:2155968country_of_citizenship:1714326date_of_birth:1918227date_of_death:915983occupation:2005422field_of_work:128231place_of_birth:1459438place_of_death:534933educated_at:700148employer:204288position_held:341539award_received:305714notable_work:43463languages_spoken:973304present_in_work:18257from_fictional_universe:9439creator:8211author:13
Use wikidata_labels.jsonl.gz to turn many filter QIDs into English display
labels. This label file is derived from enwiki titles and is not a full
multilingual Wikidata label dump.
Download and Iterate
Download only the clean page layer:
from huggingface_hub import snapshot_download
root = snapshot_download(
repo_id="zodi1121/Wiki_persona",
repo_type="dataset",
allow_patterns=[
"person_text_derivatives/manifest.json",
"person_text_derivatives/qa_report.json",
"person_text_derivatives/person_pages_clean/*.jsonl.gz",
],
)
print(root)
Iterate over cleaned pages:
import glob
import gzip
import json
from pathlib import Path
root = Path("/path/to/downloaded/Wiki_persona")
paths = sorted(
glob.glob(str(root / "person_text_derivatives/person_pages_clean/part-*.jsonl.gz"))
)
for path in paths:
with gzip.open(path, "rt", encoding="utf-8") as source:
for line in source:
row = json.loads(line)
if row["plain_text_chars"] < 500:
continue
print(row["qid"], row["title"], row["source_url"])
print(row["plain_text"][:1000])
raise SystemExit
Download filters and cleaned chunks for retrieval:
from huggingface_hub import snapshot_download
root = snapshot_download(
repo_id="zodi1121/Wiki_persona",
repo_type="dataset",
allow_patterns=[
"person_attributes.jsonl.gz",
"wikidata_labels.jsonl.gz",
"person_text_derivatives/person_page_chunks/*.jsonl.gz",
],
)
Persona Extraction Pattern
A typical persona-assignment pipeline can use:
person_attributes.jsonl.gzto filter people or fictional characters by metadata such as occupation, gender, citizenship, birth/death years, field of work, or fictional universe.person_text_derivatives/person_pages_cleanfor full-page persona field assignment.person_text_derivatives/person_page_chunksfor retrieval-augmented extraction when pages are long.
Example LLM input:
{
"qid": "Q937",
"title": "Albert Einstein",
"source_url": "https://en.wikipedia.org/wiki/Albert_Einstein",
"persona_keys": ["occupation", "education", "expertise", "values", "communication_style"],
"evidence_text": "cleaned Wikipedia page text or selected chunks"
}
Example derived output:
{
"qid": "Q937",
"title": "Albert Einstein",
"assigned_persona": {
"occupation": "...",
"education": "...",
"expertise": ["..."],
"values": ["..."],
"communication_style": "..."
},
"evidence": [
{
"source_url": "https://en.wikipedia.org/wiki/Albert_Einstein",
"section_heading": "Career",
"text": "..."
}
]
}
Attribution and License
Content is derived from English Wikipedia and Wikidata dumps. Wikipedia text is available under Creative Commons Attribution-ShareAlike terms; downstream users must preserve attribution and license requirements when redistributing derived text.
- Downloads last month
- 4