wikipedia / README.md
Jeronymous's picture
Update README
78d6201
---
language:
- en
- fr
- de
- es
- it
license:
- cc-by-sa-4.0
task_categories:
- text-generation
- fill-mask
task_ids:
- language-modeling
- masked-language-modeling
configs:
- config_name: default
data_files:
- split: train
path: "*/20240201/*parquet"
- config_name: "en"
data_files:
- split: train
path: "en/20240201/*parquet"
- config_name: "fr"
data_files:
- split: train
path: "fr/20240201/*parquet"
- config_name: "de"
data_files:
- split: train
path: "de/20240201/*parquet"
- config_name: "es"
data_files:
- split: train
path: "es/20240201/*parquet"
- config_name: "it"
data_files:
- split: train
path: "it/20240201/*parquet"
dataset_info:
- config_name: "en"
features:
- name: id
dtype: int32
- name: url
dtype: string
- name: title
dtype: string
- name: text
dtype: string
splits:
- name: train
num_bytes: 28019684686
num_examples: 6893170
download_size: 15544920302
dataset_size: 28019684686
- config_name: "fr"
features:
- name: id
dtype: int32
- name: url
dtype: string
- name: title
dtype: string
- name: text
dtype: string
splits:
- name: train
num_bytes: 10734253565
num_examples: 2647717
download_size: 5990349749
dataset_size: 10734253565
- config_name: "de"
features:
- name: id
dtype: int32
- name: url
dtype: string
- name: title
dtype: string
- name: text
dtype: string
splits:
- name: train
num_bytes: 11947016839
num_examples: 2877387
download_size: 6811415105
dataset_size: 11947016839
- config_name: "es"
features:
- name: id
dtype: int32
- name: url
dtype: string
- name: title
dtype: string
- name: text
dtype: string
splits:
- name: train
num_bytes: 7636098849
num_examples: 1947242
download_size: 4346936003
dataset_size: 7636098849
- config_name: "it"
features:
- name: id
dtype: int32
- name: url
dtype: string
- name: title
dtype: string
- name: text
dtype: string
splits:
- name: train
num_bytes: 6544616305
num_examples: 1870387
download_size: 3742980452
dataset_size: 6544616305
---
# Plain text of Wikipedia
* [Dataset Description](#dataset-description)
* [Size](#size)
* [Example use (python)](#example-use-python)
* [Data fields](#data-fields)
* [Notes on data formatting](#notes-on-data-formatting)
* [License](#license)
* [Aknowledgements](#aknowledgements)
* [Citation](#citation)
## Dataset Description
This dataset is a plain text version of pages from `wikipedia.org` spaces for several languages
([English](https://en.wikipedia.org/wiki),
[German](https://de.wikipedia.org/wiki),
[French](https://fr.wikipedia.org/wiki),
[Spanish](https://es.wikipedia.org/wiki),
[Italian](https://it.wikipedia.org/wiki)).
The text is without HTML tags nor wiki templates.
It just includes markdown syntax for headers, lists and tables.
See [Notes on data formatting](#notes-on-data-formatting) for more details.
It was created by [LINAGORA](https://labs.linagora.com/) and [OpenLLM France](https://openllmfrance.org/)
from the [Wikimedia dumps](https://dumps.wikimedia.org/other/enterprise_html/runs),
using code in [https://github.com/OpenLLM-France/wikiplaintext](https://github.com/OpenLLM-France/wikiplaintext).
### Size
The amount of data for the latest dump (20240201) are for the several languages:
| | **English (en)** | **German (de)** | **French (fr)** | **Spanish (es)** | **Italian (it)** |
| :---------------|--------: |--------: |--------: |--------: |--------: |
| **# documents** | 6 893 170 | 2 877 387 | 2 647 717 | 1 947 242 | 1 870 387 |
| **# paragraphs** | 59 010 400 | 23 686 448 | 24 943 988 | 16 354 822 | 15 774 432 |
| **# lines** | 241 540 701 | 90 393 406 | 97 295 694 | 56 476 769 | 61 007 593 |
| **# words** | 4 772 115 884 | 1 730 527 517 | 1 758 293 925 | 1 263 717 667 | 1 078 659 862 |
| **# characters** | 27 172 681 137 | 11 468 147 020 | 10 141 322 856 | 7 310 434 534 | 6 315 423 707 |
| **size in memory** | 26 721.7 MB | 11 393.6 MB | 10 237.0 MB | 7 282.4 MB | 6 241.4 MB |
| **size on disk** | 14 824.8 MB | 6 495.9 MB | 5 712.8 MB | 4 145.6 MB | 3 569.6 MB |
### Example use (python)
Load the full dataset:
```python
import datasets
ds = datasets.load_dataset("OpenLLM-France/wikipedia",
streaming=True,
split="train"
)
```
Load the dataset for a given language (French in this example):
```python
ds = datasets.load_dataset("OpenLLM-France/wikipedia", "fr",
streaming=True,
split="train"
)
```
### Data fields
The data fields are the same among all configurations:
- `id` (`int`): ID of the article.
- `url` (`str`): URL of the article.
- `title` (`str`): Title of the article.
- `text` (`str`): Text content of the article.
For example:
```
{'id': 847027,
'url': 'https://fr.wikipedia.org/wiki/D%C3%A9partement_de_Rinconada',
'title': 'Département de Rinconada',
'text': "# Département de Rinconada\n\nLe département de Rinconada est une des 16 subdivisions de la province de Jujuy, en Argentine. Son chef-lieu est la ville de Rinconada.\nLe département a une superficie de 6 407 km². Sa population extrêmement clairsemée s'élevait à 2 298 habitants en 2001, soit une densité de 0,3 hab./km².\n\n# Département de Rinconada\n## Localités\n\nOutre le chef-lieu d'arrondissement, Rinconada, il faut citer :\n* Mina Pirquitas, localité la plus élevée d'Argentine (4 271 mètres d'altitude).\nC'est sur le territoire de ce département qu'est situé le site Ramsar des Lagunas de Vilama."
}
```
### Notes on data formatting
#### Special characters
Superscripts and subscripts are kept as unicode characters when possible. e.g. `XIIIᵉ siècle`, `3 000 m²`, `P₂O₇⁴⁻`.
Unbreakable spaces are kept as unicode characters
(in python, use `text.replace("\u00A0", " ")` to replace them with normal spaces).
#### Markdown syntax
Tables are kept as markdown tables.
For instance:
<div style="border: 2px solid black; padding: 10px;"><code>
| Français | Espéranto | IPA |<br/>
| Salut, bonjour | Saluton | [sa.ˈlu.ton] |<br/>
| Oui | Jes | [ˈjes] |<br/>
| Non | Ne | [ˈne] |<br/>
| Bonsoir | Bonan vesperon | [ˈbo.nan ves.ˈpe.ron] |<br/>
| Bonne nuit | Bonan nokton | [ˈbo.nan ˈnok.ton] |
</code></div>
Lists are kept as markdown lists.
For instance:
<div style="border: 2px solid black; padding: 10px;"><code>
* 1 000 personnes ont l'espéranto comme langue maternelle ;<br/>
* 10 000 personnes parlent l'espéranto avec un niveau proche d'une langue maternelle ;<br/>
* 100 000 personnes parlent couramment l'espéranto ;
</code></div>
Headers are kept as markdown headers, and all the levels of headers are kept before each paragraph.
The first header always corresponds to the page title.
For instance:
<div style="border: 2px solid black; padding: 10px;"><code>
# Espéranto<br />
<br />
L'espéranto est une langue construite internationale utilisée comme langue véhiculaire par des personnes […]<br />
Fondée sur une grammaire régulière sans exception, l'espéranto est une langue globalement agglutinante où[…]<br />
C’est en 1887 que Louis-Lazare Zamenhof, sous le pseudonyme Doktoro Esperanto (Docteur « Espérant ») qui […]<br />
L’Association universelle d’espéranto, fondée en 1908, est en relation officielle avec l’Organisation des[…]<br />
<br />
# Espéranto<br />
## Définition<br />
### Nom<br />
<br />
Le pseudonyme « Doktoro Esperanto » (Docteur « Espérant »), utilisé par Zamenhof pour présenter son proje[…]<br />
<br />
# Espéranto<br />
## Définition<br />
### Nom<br />
#### Utilisation du mot espéranto en tant que métaphore<br />
<br />
Le nom espéranto fonctionne comme un nom propre quand il désigne la langue même, mais est parfois utilisé[…]<br />
Dans le domaine de l'informatique, Java fut qualifié d'« espéranto des langages de programmation », en pa[…]
</code></div>
## License
This dataset is distributed under the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
## Aknowledgements
This dataset was created by [Jérôme Louradour](https://huggingface.co/Jeronymous) on behalf of
[LINAGORA](https://labs.linagora.com/) and
[OpenLLM France](https://openllmfrance.org/).
Many thanks to the [Wikimedia Foundation](https://wikimediafoundation.org/)
for providing the data and useful advices,
in particular Isaac Johnson, Albert Villanova and Rémy Gerbet.
## Citation
```
@online{wikipedia_dump,
author = "OpenLLM-France, LINAGORA Labs",
title = "Plain text Wikipedia",
url = "https://huggingface.co/datasets/OpenLLM-France/wikipedia"
}
```