File size: 10,066 Bytes
78d6201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
04165fe
 
 
78d6201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
04165fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78d6201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
---
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 |
| **# words**         |   4 708 073 654 |   1 708 517 153 |   1 725 733 130 |   1 244 800 602 |  1 059 728 705  |
| **# characters**    |   26 615 759 588 |   11 251 992 282 |   9 878 620 695 |  7 161 185 380 |   6 160 546 937 |
| **size on disk**    |   15G |   6.4G |   5.6G |   4.1G |  3.5G |


### 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.
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 />
## Définition<br />
### Nom<br />
<br />
Le pseudonyme « Doktoro Esperanto » (Docteur « Espérant »), utilisé par Zamenhof pour présenter son proje[…]<br />
<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>

##### Alternative markdown syntax

A version "`repeated_headers`" of the dataset is available, where headers are repeated before each section.
This dataset can be obtained with:
```python
import datasets

ds = datasets.load_dataset("OpenLLM-France/wikipedia",
    revision="repeated_headers",
    streaming=True,
    split="train"
)
```

The first header always corresponds to the page title, the second header to the section title, the third header to the subsection title, etc.
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"
}
```