File size: 23,666 Bytes
d67734b b453fca d67734b b453fca d67734b b453fca d67734b ad8185d d67734b ad8185d d67734b b453fca d67734b b453fca d67734b b453fca d67734b b453fca d67734b b453fca d67734b b453fca d67734b b3fb07a aeb7a2e d67734b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
---
license:
- cc-by-sa-4.0
- gfdl
size_categories:
- 1M<n<10M
task_ids:
- language-modeling
- masked-language-modeling
language:
- en
- fr
tags:
- wikimedia
- wikipedia
---
# Dataset Card for Wikimedia Structured Wikipedia
## Dataset Description
### Dataset Summary
Early beta release of pre-parsed English and French Wikipedia articles including infoboxes. Inviting feedback.
This dataset contains all articles of the [English](https://en.wikipedia.org/) and [French](https://fr.wikipedia.org/) language editions of Wikipedia, pre-parsed and outputted as structured JSON files with a consistent schema (JSONL compressed as zip). Each JSON line holds the content of one full Wikipedia article stripped of extra markdown and non-prose sections (references, etc.).
### Invitation for Feedback
The dataset is built as part of the Structured Contents initiative and based on the Wikimedia Enterprise html [snapshots](https://enterprise.wikimedia.com/docs/snapshot/). It is an early beta release to improve transparency in the development process and request feedback. This first version includes pre-parsed Wikipedia abstracts, short descriptions, main images links, infoboxes and article sections, excluding non-prose sections (e.g. references). More elements (such as lists and tables) may be added over time. For updates follow the project’s [blog](https://enterprise.wikimedia.com/blog/) and our [Mediawiki Quarterly software updates](https://www.mediawiki.org/wiki/Wikimedia_Enterprise#Updates) on MediaWiki.
As this is an early beta release, we highly value your feedback to help us refine and improve this dataset. Please share your thoughts, suggestions, and any issues you encounter either [on the discussion page](https://meta.wikimedia.org/wiki/Talk:Wikimedia_Enterprise) of Wikimedia Enterprise’s homepage on Meta wiki, or on the discussion page for this dataset here on HuggingFace.
The contents of this dataset of Wikipedia articles is collectively written and curated by a global volunteer community. All original textual content is licensed under the [GNU Free Documentation License](https://www.gnu.org/licenses/fdl-1.3.html) (GFDL) and the [Creative Commons Attribution-Share-Alike 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/). Some text may be available only under the Creative Commons license; see the Wikimedia [Terms of Use](https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use) for details. Text written by some authors may be released under additional licenses or into the public domain.
### Supported Tasks and Leaderboards
The dataset in its structured form is generally helpful for a wide variety of tasks, including all phases of model development, from pre-training to alignment, fine-tuning, updating/RAG as well as testing/benchmarking.
We would love to hear more about your use cases.
### Languages
English <br/>
BCP 47 Language Code: EN
French/Français <br/>
BCP 47 Language Code: FR
There is only one language edition for English, and one for French. They encompass national and cultural variations of spelling, vocabulary, grammar etc. Within a Wikipedia language edition, no national variety is officially preferred over others. The rule of thumb is that the conventions of a particular variety of language should be followed consistently within a given article.
The relevant Manual of Style policy documents are available [for English Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style#National_varieties_of_English), and [for French Wikipedia](https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Conventions_de_style#Variantes_g%C3%A9ographiques).
As part of this Beta Wikimedia Enterprise Structured Contents project, the team is working to including more language editions: [https://enterprise.wikimedia.com/docs/snapshot/#available-structured-contents-snapshots-beta](https://enterprise.wikimedia.com/docs/snapshot/#available-structured-contents-snapshots-beta)
Dataset Structure
### Data Instances
An example of each line of JSON looks as follows (abbreviated data):
```
{
"name":"JosephineBaker",
"identifier":255083,
"url":"https://en.wikipedia.org/wiki/Josephine_Baker",
"date_created":"...",
"date_modified":"...",
"is_part_of":{"..."},
"in_language":{"..."},
"main_entity":{"identifier":"Q151972",...},
"additional_entities":[...],
"version":{...},
"description":"American-bornFrenchdancer...",
"abstract":"FredaJosephineBaker,naturalizedas...",
"image":{"content_url":"https://upload.wikimedia.org/wikipedia/...",...},
"infobox":[{"name":"Infoboxperson",
"type":"infobox",
"has_parts":[
{"name":"JosephineBaker",
"type":"section",
"has_parts":[
{"name":"Born",
"type":"field",
"value":"FredaJosephineMcDonaldJune3,1906
St.Louis,Missouri,US",
"links":[{"url": "https://en.wikipedia.org/wiki/St._Louis",
"text":"St.Louis"},...}],
"sections"[{"name": "Abstract",
"type": "section",
"has_parts": [
{"type": "paragraph",
"value": "Freda Josephine Baker (née McDonald; June 3, 1906 - April 12, 1975), naturalized as Joséphine Baker...",
"links": [{"url": "https://en.wikipedia.org/wiki/Siren_...",
"text": "Siren of the Tropics"...}],
"license":[...],
}
```
Timestamp
Dataset extracted 16 September 2024
### Size
English: enwiki_namespace_0.zip
Size of compressed dataset files: 17.91 GB
Size of uncompressed dataset: 79.57 GB
French: frwiki_namespace_0.zip
Size of compressed dataset files: 6.95 GB
Size of the uncompressed dataset: 34.01 GB
JSONL files compressed in zip, once uncompressed they are chunked by max 2.15GB.
For more guidelines on how to process the snapshots, see [SDKs](https://enterprise.wikimedia.com/docs/#sdk).
### Data Fields
The data fields are the same among all, noteworthy included fields:
* [name](https://enterprise.wikimedia.com/docs/data-dictionary/#name) - title of the article.
* [identifier](https://enterprise.wikimedia.com/docs/data-dictionary/#identifier) - ID of the article.
* [url](https://enterprise.wikimedia.com/docs/data-dictionary/#url) - URL of the article.
* [version](https://enterprise.wikimedia.com/docs/data-dictionary/#version): metadata related to the latest specific revision of the article
* [version.editor](https://enterprise.wikimedia.com/docs/data-dictionary/#version_editor) - editor-specific signals that can help contextualize the revision
* [version.scores](https://enterprise.wikimedia.com/docs/data-dictionary/#version_scores) - returns assessments by ML models on the likelihood of a revision being reverted.
* [main entity](https://enterprise.wikimedia.com/docs/data-dictionary/#main_entity) - Wikidata QID the article is related to.
* [abstract](https://enterprise.wikimedia.com/docs/data-dictionary/#abstract) - lead section, summarizing what the article is about.
* [description](https://enterprise.wikimedia.com/docs/data-dictionary/#description) - one-sentence description of the article for quick reference.
* [image](https://enterprise.wikimedia.com/docs/data-dictionary/#image) - main image representing the article's subject.
* [infobox](https://enterprise.wikimedia.com/docs/data-dictionary/#infobox) - parsed information from the side panel (infobox)l on the Wikipedia article.
* [sections](https://enterprise.wikimedia.com/docs/data-dictionary/#article_sections) - parsed sections of the article, including links.
Note: excludes other media/images, lists, tables and references or similar non-prose sections.
Full data dictionary is available here: [https://enterprise.wikimedia.com/docs/data-dictionary/](https://enterprise.wikimedia.com/docs/data-dictionary/)
### Data Splits
[N/A]
## Dataset Creation
### Curation Rationale
This dataset has been created as part of the larger [Structured Contents initiative at Wikimedia Enterprise](https://meta.wikimedia.org/wiki/Wikimedia_Enterprise/FAQ#What_is_Structured_Contents) with the aim of making Wikimedia data more machine readable. These efforts are both focused on pre-parsing Wikipedia snippets as well as connecting the different projects closer together.
Even if Wikipedia is very structured to the human eye, it is a non-trivial task to extract the knowledge lying within in a machine readable manner. Projects, languages, domains all have their own specific community experts and way of structuring data, bolstered by various templates and best practices. A specific example we’ve addressed in this release is article infoboxes. Infoboxes are panels that commonly appear in the top right corner of a Wikipedia article and summarize key facts and statistics of the article’s subject. The editorial community works hard to keep infoboxes populated with the article’s most pertinent and current metadata, and we’d like to lower the barrier of entry significantly so that this data is also accessible at scale without the need for bespoke parsing systems.
We also include the link to the [Wikidata Q](https://www.wikidata.org/wiki/Wikidata:Identifiers) Identifier (corresponding Wikidata entity), and the link to (main and infobox) images to facilitate easier access to additional information on the specific topics.
You will also find [Credibility Signals fields](https://enterprise.wikimedia.com/blog/understanding-credibility-signals-in-wikimedia-enterprise-api/) included. These can help you decide when, how, and why to use what is in the dataset. These fields mirror the over 20 years of editorial policies created and kept by the Wikipedia editing communities, taking publicly available information and structuring it. Like with article structures, because this information is not centralized (neither on a single project nor across them), it is hard to access. Credibility signals shine a light on that blind spot. You will find most of these signals under the ‘version’ object, but other objects like ‘protection’ and ‘watchers_count’ offer similar insight.
This is an early beta release of pre-parsed Wikipedia articles in bulk, as a means to improve transparency in the development process and gather insights of current use cases to follow where the AI community needs us most; as well as feedback points, to develop this further through collaboration. There will be limitations (see ‘known limitations’ section below), but in line with [our values](https://wikimediafoundation.org/about/values/#a3-we-welcome-everyone-who-shares-our-vision-and-values), we believe it is better to share early, often, and respond to feedback.
You can also test out more languages on an article by article basis through our [beta Structured Contents On-demand endpoint](https://enterprise.wikimedia.com/docs/on-demand/#article-structured-contents-beta) with a [free account](https://enterprise.wikimedia.com/blog/enhanced-free-api/).
Attribution is core to the sustainability of the Wikimedia projects. It is what drives new editors and donors to Wikipedia. With consistent attribution, this cycle of content creation and reuse ensures encyclopedic content of high-quality, reliability, and verifiability will continue being written on Wikipedia and ultimately remain available for reuse via datasets such as these.
As such, we require all users of this dataset to conform to our expectations for proper attribution. Detailed attribution requirements for use of this dataset are outlined below.
Beyond attribution, there are many ways of contributing to and supporting the Wikimedia movement. and various other ways of supporting and participating in the Wikimedia movement below. To discuss your specific circumstances please contact Nicholas Perry from the Wikimedia Foundation technical partnerships team at [nperry@wikimedia.org](mailto:nperry@wikimedia.org). You can also contact us on either the [discussion page](https://meta.wikimedia.org/wiki/Talk:Wikimedia_Enterprise) of Wikimedia Enterprise’s homepage on Meta wiki, or on the discussion page for this dataset here on HuggingFace.
### Source Data
### Initial Data Collection and Normalization
The dataset is built from the Wikimedia Enterprise HTML “snapshots”: [https://enterprise.wikimedia.com/docs/snapshot/](https://enterprise.wikimedia.com/docs/snapshot/) and focusses on the Wikipedia article namespace ([namespace 0 (main))](https://en.wikipedia.org/wiki/Wikipedia:What_is_an_article%3F#Namespace).
### Who are the source language producers?
Wikipedia is a human generated corpus of free knowledge, written, edited, and curated by a [global community of editors](https://meta.wikimedia.org/wiki/Community_Insights/Community_Insights_2023_Report) since 2001.
It is the largest and most accessed educational resource in history, accessed over 20 billion times by half a billion people each month. Wikipedia represents almost 25 years of work by its community; the creation, curation, and maintenance of millions of articles on distinct topics.
This dataset includes the complete article contents of two Wikipedia language editions: English [https://en.wikipedia.org/](https://en.wikipedia.org/) and French [https://fr.wikipedia.org/](https://fr.wikipedia.org/), written by the respective communities.
### Annotations
### Annotation process
[N/A]
The dataset doesn't contain any additional annotations
### Who are the annotators?
[N/A]
### Personal and Sensitive Information
The Wikipedia community and the Wikimedia Foundation - which operates Wikipedia - establish robust policy and guidelines around personal and sensitive information; both to avoid personal/sensitive information within articles as well as strict privacy policies around information of their contributors.
The Wikimedia Foundation’s privacy policy is available at: [https://foundation.wikimedia.org/wiki/Policy:Privacy_policy](https://foundation.wikimedia.org/wiki/Policy:Privacy_policy)
Transparency reports covering the Wikimedia Foundation’s responses to requests received to alter or remove content from the projects, and to provide nonpublic information about users, are found here: [https://wikimediafoundation.org/about/transparency/](https://wikimediafoundation.org/about/transparency/)
Among many editorial policies regarding personal and sensitive information, particular care is paid by the community to biographies of living people. Details for each language community’s responses and norms can be found here: [https://www.wikidata.org/wiki/Q4663389#sitelinks-wikipedia](https://www.wikidata.org/wiki/Q4663389#sitelinks-wikipedia)
## Considerations for Using the Data
### Social Impact of Dataset
Wikipedia’s articles are read over 20 billion times by half a billion people each month. It does not belong to, or come from a single culture or language. It is an example of mass international cooperation, across languages and continents. Wikipedia is the only website among the world’s most visited that is not operated by a commercial organization.
Wikimedia projects have been used (and upsampled) as a core source of qualitative data in AI/ML/LLM . The Wikimedia Foundation has published an article on [the value of Wikipedia in age of generative AI](https://wikimediafoundation.org/news/2023/07/12/wikipedias-value-in-the-age-of-generative-ai).
There is also a Community Article about [why Wikimedia data matters for ML](https://huggingface.co/blog/frimelle/wikipedias-treasure-trove-ml-data#why-wikimedia-data-for-ml) on the HuggingFace blog. This highlights that it is: rich, diverse content; multimodal; and both community-curated and openly licensed.
### Discussion of Biases
While consciously trying to present an editorially neutral point of view, Wikipedia’s content reflects [the biases of the society it comes from](https://wikimediafoundation.org/our-work/open-the-knowledge/otk-change-the-stats/). This includes various “gaps” (notably in both the [proportion of biographies of, and editors who identify as, women](https://wikimediafoundation.org/our-work/open-the-knowledge/wikipedia-needs-more-women/). Other significant gaps include in linguistic and technical accessibility of the websites, and censorship. Because the content is written by its readers, ensuring the widest possible access to the content is crucial to reducing the biases of the content itself. There is continuous work to redress these biases through various social and technical efforts – both centrally and at the grassroots around the world.
### Other Known Limitations
This is an early beta version, the following limitations may apply:
* A small percentage of duplicated, deleted or missed articles may be part of the snapshot. Duplicates can be filtered out by looking at the highest "version.identifier", being the most up-to-date revision of the article
* Revision discrepancies may happen due to limitations with long articles
* On occasion empty sections or values may be returned. This is either because the section contains references or similar; or is made out of structured elements like lists and tables; or the section was left empty by editors.
* Images: only main and infobox image links are supported at the moment, we encourage you to take additional information and licensing by following the image link, while we are evaluating adding this data directly.
Please let us know if there are any other limitations that aren't covered above.
## Additional Information
### Dataset Curators
This dataset was created by the [Wikimedia Enterprise](https://enterprise.wikimedia.com/about/) team of the [Wikimedia Foundation](https://wikimediafoundation.org/) as part of the Structured Contents initiative.
### Attribution Information
Wikimedia Enterprise provides this dataset under the assumption that downstream users will adhere to the relevant free culture licenses when the data is reused. In situations where attribution is required, reusers should identify the Wikimedia project from which the content was retrieved as the source of the content. Any attribution should adhere to Wikimedia’s trademark policy (available at [https://foundation.wikimedia.org/wiki/Trademark_policy](https://foundation.wikimedia.org/wiki/Trademark_policy)) and visual identity guidelines (available at [https://foundation.wikimedia.org/wiki/Visual_identity_guidelines](https://foundation.wikimedia.org/wiki/Visual_identity_guidelines)) when identifying Wikimedia as the source of content.
### How To Attribute Wikipedia
We ask that all content re-users attribute Wikipedia in a way that supports our model. In the spirit of reciprocity the framework allows you to leverage our brand to signal trust, reliability and recency whilst also communicating that our dataset is written entirely by human contributors who have volunteered their time in the spirit of knowledge for all.
For example, for Generative AI, what to include in all attribution cases:
<img src="https://huggingface.co/datasets/wikimedia/structured-wikipedia/resolve/main/images/attrib_table.png" style="width: 1000px; height:483px;" />
Attribution UI Example: Outputs using Wikipedia non-specifically
![](https://huggingface.co/datasets/wikimedia/structured-wikipedia/resolve/main/images/attr1.png)
Attribution UI Example: Outputs using Wikipedia in-line
![](https://huggingface.co/datasets/wikimedia/structured-wikipedia/resolve/main/images/attr2.png)
Tools & Resources for Attribution
[W Favicons](https://commons.wikimedia.org/wiki/Category:Wikimedia_Attribution_Guide_Favicons): The Wikipedia ‘W’ icon is a distinctive graphic element derived from the W of Wikipedia, set in the font Hoefler combined with various framing devices.
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Wikipedia_%22W%22_Square_Black.svg/240px-Wikipedia_%22W%22_Square_Black.svg.png" style="display: inline-block; width: 50px; height:50px;" /><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wikipedia_%22W%22_Rounded_Black.svg/240px-Wikipedia_%22W%22_Rounded_Black.svg.png" style="width: 50px; height:50px;display: inline-block;" /><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/67/Wikipedia_%22W%22_Square_Tech.svg/240px-Wikipedia_%22W%22_Square_Tech.svg.png" style="width: 50px; height:50px;display: inline-block;" /><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Wikipedia_%22W%22_Rounded_Tech.svg/240px-Wikipedia_%22W%22_Rounded_Tech.svg.png" style="width: 50px; height:50px;display: inline-block;" /><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Wikipedia_%22W%22_Square_White.svg/240px-Wikipedia_%22W%22_Square_White.svg.png" style="width: 50px; height:50px;display: inline-block;" /><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Wikipedia_%22W%22_Rounded_White.svg/240px-Wikipedia_%22W%22_Rounded_White.svg.png" style="width: 50px; height:50px;display: inline-block;" />
[W Wordmarks](https://foundation.wikimedia.org/wiki/Legal:Visual_identity_guidelines): The distinctive wordmark, with larger case W and A characters. The wordmark alone is the most identifiable and clearly understood version of all of the official marks representing Wikipedia.
![](https://huggingface.co/datasets/wikimedia/structured-wikipedia/resolve/main/images/wikipedia1.png)![](https://huggingface.co/datasets/wikimedia/structured-wikipedia/resolve/main/images/wikipedia2.png)
Wikimedia Product Icons: You can find all currently available icons in the [Assets library](https://www.figma.com/file/1lT9LKOK6wiHLnpraMjP3E/%E2%9D%96-Assets-(Icons%2C-Logos%2C-Illustrations)?node-id=3295-13631&t=XsJ03mZaUOTNMw9j-0) in Figma. We provide a listing of all icons with their ids for implementation in the [Codex demo](https://doc.wikimedia.org/codex/latest/icons/all-icons.html). Additionally you also find all icons as single [SVGO production optimized](https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG) SVGs for usage outside of MediaWiki.
<img src="https://huggingface.co/datasets/wikimedia/structured-wikipedia/resolve/main/images/svgs.png" style="width: 400px; height:79px"/>
More logo assets and guidance can be found on the [Wikipedia](https://foundation.wikimedia.org/wiki/Legal:Visual_identity_guidelines) and [Wikimedia](https://meta.wikimedia.org/wiki/Brand) Brand portals.
Wikipedia favicons can be found on [Wikimedia Commons](https://commons.wikimedia.org/wiki/Category:Wikimedia_Attribution_Guide_Favicons).
To schedule a 30-minute brand attribution walkthrough or to request a customized solution, please email us at [brandattribution@wikimedia.org](mailto:brandattribution@wikimedia.org)
### Licensing Information
All original textual content is licensed under the [GNU Free Documentation License](https://www.gnu.org/licenses/fdl-1.3.html) (GFDL) and the [Creative Commons Attribution-Share-Alike 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/). Some text may be available only under the Creative Commons license; see the Wikimedia [Terms of Use](https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use) for details. Text written by some authors may be released under additional licenses or into the public domain.
Derived dataset prepared by[ Wikimedia Enterprise](https://enterprise.wikimedia.com/). Wikipedia and Wikimedia Enterprise are registered trademarks of the[ Wikimedia Foundation, Inc.](https://www.wikimediafoundation.org/), a non-profit organization.
For more information, see [dumps licensing information](https://dumps.wikimedia.org/legal.html) and [Wikimedia Enterprise Terms](https://enterprise.wikimedia.com/terms/).
### Citation Information
@ONLINE{structured-wikipedia,
author = {Wikimedia Enterprise, Wikimedia Foundation},
title = {Structured Wikipedia},
month = {sep},
year= {2024}} |