LeMoussel commited on
Commit
c364819
·
verified ·
1 Parent(s): de9eea2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +209 -209
README.md CHANGED
@@ -1,209 +1,209 @@
1
- ---
2
- language:
3
- - fr
4
- license: cc-by-sa-4.0
5
- size_categories: 100K<n<1M
6
- task_categories:
7
- - text-generation
8
- task_ids:
9
- - language-modeling
10
- - masked-language-modeling
11
- configs:
12
- - config_name: default
13
- data_files:
14
- - split: train
15
- path: "data/*.parquet"
16
- dataset_info:
17
- - config_name: "default"
18
- features:
19
- - name: title
20
- dtype: string
21
- - name: authors
22
- dtype: string
23
- - name: identifier
24
- dtype: int64
25
- - name: date_created
26
- dtype: string
27
- - name: wiki_url
28
- dtype: string
29
- - name: text
30
- dtype: string
31
- - name: quality_signals
32
- dtype: string
33
- - name: version_id
34
- dtype: int64
35
- splits:
36
- - name: train
37
- num_bytes: 7974052431
38
- num_examples: 472517
39
- download_size: 4584532829
40
- dataset_size: 7974052431
41
- ---
42
-
43
- # Wikisource FR Dataset
44
-
45
- - [Wikisource FR Dataset](#wikisource-fr-dataset)
46
- - [Dataset Structure](#dataset-structure)
47
- - [Data Instances](#data-instances)
48
- - [Data Fields](#data-fields)
49
- - [Example Usage (Python)](#example-usage-python)
50
- - [Intended Use][def]
51
- - [Dataset Statistics](#dataset-statistics)
52
- - [Token Statistics](#token-statistics)
53
- - [Quality Signal: CCNet Perplexity](#quality-signal-ccnet-perplexity)
54
- - [License](#license)
55
- - [Aknowledgements](#aknowledgements)
56
- - [Citation](#citation)
57
-
58
- This dataset provides a cleaned plain-text version of French open texts from [fr.wikisource.org](https://fr.wikisource.org/). The content is distributed without HTML tags or MediaWiki templates, and only retains minimal Markdown syntax (headers, lists, tables) to facilitate downstream NLP and LLM usage.
59
-
60
- The dataset is built using the [Wikimedia Enterprise Snapshot APIs](https://enterprise.wikimedia.com/api/) which allow retrieving complete Wikimedia projects as a database dumps file.
61
-
62
- ## Dataset Structure
63
-
64
- ### Data Instances
65
-
66
- Each record corresponds to a single Wikisource document or work.
67
-
68
- Example:
69
-
70
- ```text
71
- {
72
- 'title': ' De la Chasse (Trad. Talbot)/06',
73
- 'authors': 'Xénophon',
74
- 'identifier': 1608939,
75
- 'date_created': ' 2013-11-03T08:40:48Z',
76
- 'wiki_url': ' https://fr.wikisource.org/wiki/De_la_Chasse_(Trad._Talbot)/06',
77
- 'text': '### CHAPITRE VI.\nDe l’armure des chiens, du temps propre à la quête, du garde-filet, ...',
78
- 'quality_signals': '{"ccnet_perplexity": 213.77, "num_tokens": 2455, "doc_length": 9363}',
79
- }
80
- ```
81
-
82
- ### Data Fields
83
-
84
- The data fields are consistent across all configurations:
85
-
86
- - `title` (`str`): Title of the text.
87
- - `authors` (`str`): Authors of the text.
88
- - `identifier` (`int64`): ID of the text.
89
- - `wiki_url` (`str`): URL of the text on Wikisource.
90
- - `date_created` (`str`): Date of creation of the text.
91
- - `text` (`str`): Content of the text.
92
- - `quality_signals` (`str`): Quality signals of the text.
93
-
94
- ## Example Usage (Python)
95
-
96
- Load the full dataset:
97
-
98
- ```python
99
- import datasets
100
-
101
- ds = datasets.load_dataset("LeMoussel/wikisource_fr", split="train")
102
- ```
103
-
104
- ## Intended Use
105
-
106
- Suitable for pretraining French LLMs. This dataset is intended for:
107
-
108
- - training and pretraining French language models (LLMs, MLMs),
109
-
110
- - evaluating language models on literary and historical French texts,
111
-
112
- - NLP research tasks such as text generation, summarization, or segmentation.
113
-
114
- It does not contain personal data and is exclusively composed of freely licensed texts from Wikisource.
115
-
116
- ## Dataset Statistics
117
-
118
- The following statistics are provided to facilitate LLM pretraining planning. Exact values may slightly vary depending on the tokenizer and preprocessing strategy.
119
-
120
- - Total size of the dataset (in memory): ~7.43 GB
121
- - Total size of the dataset (on disk): ~4.27 GB
122
-
123
- - Total number of documents: 472 517 texts
124
- - Total number of characters: 7 422 890 508
125
- - Average document length: ~15 709 characters
126
-
127
- ### Token Statistics
128
-
129
- Estimated using [sentencepiece](https://github.com/google/sentencepiece) tokenizers commonly employed for French LLMs:
130
-
131
- - Estimated total tokens: ~1.9B tokens
132
- - Average number of tokens per document: ~4 120 tokens
133
-
134
- ### Quality Signal: CCNet Perplexity
135
-
136
- `CCNet Perplexity` is a linguistic quality indicator used to measure how close a given text is to a high-quality reference corpus, typically Wikipedia.
137
- It is commonly employed in large-scale dataset filtering pipelines for language model training, in order to identify noisy, malformed, or out-of-domain content.
138
-
139
- In this dataset, the score is computed using the open-source implementation provided by OpenLLM-France: [CCNet Perplexity Library](https://github.com/OpenLLM-France/Lucie-dataset-filtering/tree/master/src/blmrdata/utils/ccnet)
140
-
141
- The value is exposed in the `quality_signals` field under the key `ccnet_perplexity`.
142
-
143
- #### Score Interpretation
144
-
145
- - **Low perplexity (~100–300)**
146
- Text is linguistically close to Wikipedia:
147
-
148
- - well-formed syntax
149
- - standard vocabulary
150
- - coherent structure
151
- - low noise level
152
-
153
- - **High perplexity (>1000)**
154
- Text significantly diverges from the reference corpus:
155
-
156
- - poorly formatted content
157
- - potential noise or spam
158
- - OCR artifacts
159
- - or highly specialized vocabulary uncommon in Wikipedia
160
-
161
- Lower perplexity indicates that the text is more likely under the Wikipedia-trained language model, and therefore closer to the reference domain.
162
-
163
- ⚠️ A high perplexity score does not necessarily imply low semantic value, but rather a **linguistic distance** from the Wikipedia domain.
164
-
165
- #### Observations for the Wikisource FR Dataset
166
-
167
- ![CCNet Perplexity Histogram](images/wikisource_fr_ccnet_perplexity_histogram.png)
168
-
169
- - **Median CCNet Perplexity: 298.84**
170
-
171
- This indicates that the majority of Wikisource documents exhibit a *linguistic quality comparable to Wikipedia*, which is consistent with the curated and editorial nature of the source.
172
-
173
- - **Extreme values (up to ~183 437)**
174
- These outliers most likely correspond to:
175
-
176
- - documents with highly specialized or archaic vocabulary,
177
- - residual formatting issues,
178
- - atypical content structures (tables, lists, annotations),
179
- - or extraction artifacts.
180
-
181
- This signal can be leveraged to:
182
-
183
- - filter documents based on quality thresholds,
184
- - weight samples during training,
185
- - or analyze quality distributions within the corpus.
186
-
187
- ## License
188
-
189
- The texts originate from Wikisource and are governed by the licenses defined by the Wikimedia Foundation:
190
-
191
- - [GNU Free Documentation License 1.3](https://www.gnu.org/licenses/fdl-1.3.html) (GFDL)
192
-
193
- - [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
194
-
195
- Some texts may be available only under the CC BY-SA license or may belong to the public domain. Please refer to Wikimedia [Terms of Use](https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use) for details.
196
-
197
- ## Aknowledgements
198
-
199
- Many thanks to the [Wikimedia Foundation](https://wikimediafoundation.org/) for providing open access to the data and maintaining a high-quality open knowledge ecosystem.
200
-
201
- ## Citation
202
-
203
- ```text
204
- @online{wikisource_fr_dump,
205
- author = "LeMoussel Labs",
206
- title = "French plain text of Wikisource",
207
- url = "https://huggingface.co/datasets/LeMoussel/wikisource_fr"
208
- }
209
- ```
 
1
+ ---
2
+ language:
3
+ - fr
4
+ license: cc-by-sa-4.0
5
+ size_categories: 100K<n<1M
6
+ task_categories:
7
+ - text-generation
8
+ task_ids:
9
+ - language-modeling
10
+ - masked-language-modeling
11
+ configs:
12
+ - config_name: default
13
+ data_files:
14
+ - split: train
15
+ path: "data/train/*.parquet"
16
+ dataset_info:
17
+ - config_name: "default"
18
+ features:
19
+ - name: title
20
+ dtype: string
21
+ - name: authors
22
+ dtype: string
23
+ - name: identifier
24
+ dtype: int64
25
+ - name: date_created
26
+ dtype: string
27
+ - name: wiki_url
28
+ dtype: string
29
+ - name: text
30
+ dtype: string
31
+ - name: quality_signals
32
+ dtype: string
33
+ - name: version_id
34
+ dtype: int64
35
+ splits:
36
+ - name: train
37
+ num_bytes: 7974052431
38
+ num_examples: 472517
39
+ download_size: 4584532829
40
+ dataset_size: 7974052431
41
+ ---
42
+
43
+ # Wikisource FR Dataset
44
+
45
+ - [Wikisource FR Dataset](#wikisource-fr-dataset)
46
+ - [Dataset Structure](#dataset-structure)
47
+ - [Data Instances](#data-instances)
48
+ - [Data Fields](#data-fields)
49
+ - [Example Usage (Python)](#example-usage-python)
50
+ - [Intended Use][def]
51
+ - [Dataset Statistics](#dataset-statistics)
52
+ - [Token Statistics](#token-statistics)
53
+ - [Quality Signal: CCNet Perplexity](#quality-signal-ccnet-perplexity)
54
+ - [License](#license)
55
+ - [Aknowledgements](#aknowledgements)
56
+ - [Citation](#citation)
57
+
58
+ This dataset provides a cleaned plain-text version of French open texts from [fr.wikisource.org](https://fr.wikisource.org/). The content is distributed without HTML tags or MediaWiki templates, and only retains minimal Markdown syntax (headers, lists, tables) to facilitate downstream NLP and LLM usage.
59
+
60
+ The dataset is built using the [Wikimedia Enterprise Snapshot APIs](https://enterprise.wikimedia.com/api/) which allow retrieving complete Wikimedia projects as a database dumps file.
61
+
62
+ ## Dataset Structure
63
+
64
+ ### Data Instances
65
+
66
+ Each record corresponds to a single Wikisource document or work.
67
+
68
+ Example:
69
+
70
+ ```text
71
+ {
72
+ 'title': ' De la Chasse (Trad. Talbot)/06',
73
+ 'authors': 'Xénophon',
74
+ 'identifier': 1608939,
75
+ 'date_created': ' 2013-11-03T08:40:48Z',
76
+ 'wiki_url': ' https://fr.wikisource.org/wiki/De_la_Chasse_(Trad._Talbot)/06',
77
+ 'text': '### CHAPITRE VI.\nDe l’armure des chiens, du temps propre à la quête, du garde-filet, ...',
78
+ 'quality_signals': '{"ccnet_perplexity": 213.77, "num_tokens": 2455, "doc_length": 9363}',
79
+ }
80
+ ```
81
+
82
+ ### Data Fields
83
+
84
+ The data fields are consistent across all configurations:
85
+
86
+ - `title` (`str`): Title of the text.
87
+ - `authors` (`str`): Authors of the text.
88
+ - `identifier` (`int64`): ID of the text.
89
+ - `wiki_url` (`str`): URL of the text on Wikisource.
90
+ - `date_created` (`str`): Date of creation of the text.
91
+ - `text` (`str`): Content of the text.
92
+ - `quality_signals` (`str`): Quality signals of the text.
93
+
94
+ ## Example Usage (Python)
95
+
96
+ Load the full dataset:
97
+
98
+ ```python
99
+ import datasets
100
+
101
+ ds = datasets.load_dataset("LeMoussel/wikisource_fr", split="train")
102
+ ```
103
+
104
+ ## Intended Use
105
+
106
+ Suitable for pretraining French LLMs. This dataset is intended for:
107
+
108
+ - training and pretraining French language models (LLMs, MLMs),
109
+
110
+ - evaluating language models on literary and historical French texts,
111
+
112
+ - NLP research tasks such as text generation, summarization, or segmentation.
113
+
114
+ It does not contain personal data and is exclusively composed of freely licensed texts from Wikisource.
115
+
116
+ ## Dataset Statistics
117
+
118
+ The following statistics are provided to facilitate LLM pretraining planning. Exact values may slightly vary depending on the tokenizer and preprocessing strategy.
119
+
120
+ - Total size of the dataset (in memory): ~7.43 GB
121
+ - Total size of the dataset (on disk): ~4.27 GB
122
+
123
+ - Total number of documents: 472 517 texts
124
+ - Total number of characters: 7 422 890 508
125
+ - Average document length: ~15 709 characters
126
+
127
+ ### Token Statistics
128
+
129
+ Estimated using [sentencepiece](https://github.com/google/sentencepiece) tokenizers commonly employed for French LLMs:
130
+
131
+ - Estimated total tokens: ~1.9B tokens
132
+ - Average number of tokens per document: ~4 120 tokens
133
+
134
+ ### Quality Signal: CCNet Perplexity
135
+
136
+ `CCNet Perplexity` is a linguistic quality indicator used to measure how close a given text is to a high-quality reference corpus, typically Wikipedia.
137
+ It is commonly employed in large-scale dataset filtering pipelines for language model training, in order to identify noisy, malformed, or out-of-domain content.
138
+
139
+ In this dataset, the score is computed using the open-source implementation provided by OpenLLM-France: [CCNet Perplexity Library](https://github.com/OpenLLM-France/Lucie-dataset-filtering/tree/master/src/blmrdata/utils/ccnet)
140
+
141
+ The value is exposed in the `quality_signals` field under the key `ccnet_perplexity`.
142
+
143
+ #### Score Interpretation
144
+
145
+ - **Low perplexity (~100–300)**
146
+ Text is linguistically close to Wikipedia:
147
+
148
+ - well-formed syntax
149
+ - standard vocabulary
150
+ - coherent structure
151
+ - low noise level
152
+
153
+ - **High perplexity (>1000)**
154
+ Text significantly diverges from the reference corpus:
155
+
156
+ - poorly formatted content
157
+ - potential noise or spam
158
+ - OCR artifacts
159
+ - or highly specialized vocabulary uncommon in Wikipedia
160
+
161
+ Lower perplexity indicates that the text is more likely under the Wikipedia-trained language model, and therefore closer to the reference domain.
162
+
163
+ ⚠️ A high perplexity score does not necessarily imply low semantic value, but rather a **linguistic distance** from the Wikipedia domain.
164
+
165
+ #### Observations for the Wikisource FR Dataset
166
+
167
+ ![CCNet Perplexity Histogram](images/wikisource_fr_ccnet_perplexity_histogram.png)
168
+
169
+ - **Median CCNet Perplexity: 298.84**
170
+
171
+ This indicates that the majority of Wikisource documents exhibit a *linguistic quality comparable to Wikipedia*, which is consistent with the curated and editorial nature of the source.
172
+
173
+ - **Extreme values (up to ~183 437)**
174
+ These outliers most likely correspond to:
175
+
176
+ - documents with highly specialized or archaic vocabulary,
177
+ - residual formatting issues,
178
+ - atypical content structures (tables, lists, annotations),
179
+ - or extraction artifacts.
180
+
181
+ This signal can be leveraged to:
182
+
183
+ - filter documents based on quality thresholds,
184
+ - weight samples during training,
185
+ - or analyze quality distributions within the corpus.
186
+
187
+ ## License
188
+
189
+ The texts originate from Wikisource and are governed by the licenses defined by the Wikimedia Foundation:
190
+
191
+ - [GNU Free Documentation License 1.3](https://www.gnu.org/licenses/fdl-1.3.html) (GFDL)
192
+
193
+ - [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
194
+
195
+ Some texts may be available only under the CC BY-SA license or may belong to the public domain. Please refer to Wikimedia [Terms of Use](https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use) for details.
196
+
197
+ ## Aknowledgements
198
+
199
+ Many thanks to the [Wikimedia Foundation](https://wikimediafoundation.org/) for providing open access to the data and maintaining a high-quality open knowledge ecosystem.
200
+
201
+ ## Citation
202
+
203
+ ```text
204
+ @online{wikisource_fr_dump,
205
+ author = "LeMoussel Labs",
206
+ title = "French plain text of Wikisource",
207
+ url = "https://huggingface.co/datasets/LeMoussel/wikisource_fr"
208
+ }
209
+ ```