Datasets:

Languages:
Italian
Multilinguality:
monolingual
Language Creators:
found
Annotations Creators:
no-annotation
Source Datasets:
extended
ArXiv:
Tags:
License:
gsarti commited on
Commit
87d98b5
1 Parent(s): 523fcd6

Created dataset card

Browse files
Files changed (1) hide show
  1. README.md +185 -0
README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: mC4-it
3
+ annotations_creators:
4
+ - no-annotation
5
+ language_creators:
6
+ - found
7
+ languages:
8
+ - it
9
+ licenses:
10
+ - odc-by-1.0
11
+ multilinguality:
12
+ - monolingual
13
+ size_categories:
14
+ tiny:
15
+ - 1M<n<10M
16
+ small:
17
+ - 10M<n<100M
18
+ medium:
19
+ - 10M<n<100M
20
+ large:
21
+ - 10M<n<100M
22
+ full:
23
+ -100M<n<1B
24
+ source_datasets:
25
+ - extended
26
+ task_categories:
27
+ - sequence-modeling
28
+ task_ids:
29
+ - language-modeling
30
+ paperswithcode_id: mc4
31
+ ---
32
+
33
+ # Dataset Card for Clean Italian mC4 🇮🇹
34
+
35
+ ## Table of Contents
36
+
37
+ - [Dataset Card for Clean](#dataset-card-for-mc4)
38
+ - [Table of Contents](#table-of-contents)
39
+ - [Dataset Description](#dataset-description)
40
+ - [Dataset Summary](#dataset-summary)
41
+ - [Preprocessing](#preprocessing)
42
+ - [Languages](#languages)
43
+ - [Dataset Structure](#dataset-structure)
44
+ - [Data Instances](#data-instances)
45
+ - [Data Fields](#data-fields)
46
+ - [Data Splits](#data-splits)
47
+ - [Dataset Creation](#dataset-creation)
48
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
49
+ - [Social Impact of Dataset](#social-impact-of-dataset)
50
+ - [Discussion of Biases](#discussion-of-biases)
51
+ - [Other Known Limitations](#other-known-limitations)
52
+ - [Additional Information](#additional-information)
53
+ - [Dataset Curators](#dataset-curators)
54
+ - [Licensing Information](#licensing-information)
55
+ - [Citation Information](#citation-information)
56
+ - [Contributions](#contributions)
57
+
58
+ ## Dataset Description
59
+
60
+ - **Original Homepage:** [HF Hub](https://huggingface.co/datasets/allenai/c4)
61
+ - **Paper:** [ArXiv](https://arxiv.org/abs/1910.10683)
62
+
63
+ ### Dataset Summary
64
+
65
+ A thoroughly cleaned version of the Italian split of the multilingual colossal, cleaned version of Common Crawl's web crawl corpus (mC4). Based on the [Common Crawl dataset](https://commoncrawl.org). The original version was prepared by [AllenAI](https://allenai.org/), hosted at the address [https://huggingface.co/datasets/allenai/c4](https://huggingface.co/datasets/allenai/c4), with subsequent preprocessing performed by [Gabriele Sarti](https://gsarti.com) following a standard procedure for all dataset shards.
66
+
67
+ ### Preprocessing
68
+
69
+ The preprocessing of the dataset follows the procedure used by Yeb Havinga for training the model [`t5-base-dutch`](https://huggingface.co/flax-community/t5-base-dutch) on a portion of the cleaned Dutch split of mC4. The original code, that was adapted for Italian in this case, is available on [GitLab](https://gitlab.com/yhavinga/c4nlpreproc). In summary, the preprocessing procedure includes:
70
+
71
+ - Removing documents containing words from a selection of the [Italian and English List of Dirty Naught Obscene and Otherwise Bad Words](https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words).
72
+
73
+ - Removing sentences containing:
74
+
75
+ - Less than 3 words.
76
+
77
+ - A word longer than 1000 characters.
78
+
79
+ - An end symbol not matching end-of-sentence punctuation.
80
+
81
+ - Strings associated to javascript code (e.g. `{`), lorem ipsum, policy information in Italian or English.
82
+
83
+ - Removing documents (after sentence filtering):
84
+
85
+ - Containing less than 5 sentences.
86
+
87
+ - Containing less than 500 or more than 50'000 characters.
88
+
89
+ - Not identified as prevalently Italian by the `LangDetect` package.
90
+
91
+ Using parallel processing with 96 CPU cores on a TPUv3 via Google Cloud to perform the complete clean of all the original Italian shards of mC4 (1024 of ~220Mb train, 8 of ~24Mb validation) required roughly 10 hours due to the demanding steps of sentence tokenization and language detection. The total size of compressed `.json.gz` files is roughly halved after the procedure.
92
+
93
+ ## Dataset Structure
94
+
95
+ ### Data Instances
96
+
97
+ An example from the dataset:
98
+
99
+ ```
100
+ {
101
+ 'timestamp': '2020-02-22T22:24:31Z',
102
+ 'url': 'https://altreconomia.it/una-rotonda-sul-pane/',
103
+ 'text': 'Per raggiungere il campo attraversiamo la striscia d’asfalto che porta verso la provinciale numero 13. Mettiamo a rischio la nostra incolumità in un territorio di auto e camion. Sullo sfondo, i profili della Grigna e del Resegone. Più vicini, quelli del solito ipermercato di provincia, e delle villette a schiera che avanzano tra le coltivazioni. È lo sprawling, l’avanzata del cemento.\nDa questo lato dalla strada, invece, è ancora regno contadino. Almeno per ora. Torniamo a Caponago (Mb), Brianza pura, dove ha avuto i natali il progetto “Spiga e madia”. Ne parlammo su Ae nel gennaio 2009: in un territorio “spaesato”, il Comitato “verso il Distretto di economia solidale della Brianza” (Desbri) e la “Retina” dei gruppi di acquisto locali danno vita a un progetto di produzione di frumento, molitura, panificazione e distribuzione in un raggio di 20 chilometri. Si comincia da zero, nel 2007, senza alcun di finanziamento, quando una famiglia del [...]. Il giochino vale almeno 3 miliardi di euro all’anno. La misura, introdotta in via straordinaria con la finanziaria 2005, è stata prorogata anche con l’ultimo decreto “milleproroghe”.'
104
+ }
105
+ ```
106
+
107
+ ### Data Fields
108
+
109
+ The data contains the following fields:
110
+
111
+ - `url`: url of the source as a string
112
+ - `text`: text content as a string
113
+ - `timestamp`: timestamp of extraction as a string
114
+
115
+ ### Data Splits
116
+
117
+ To build mC4, the original authors used [CLD3](https://github.com/google/cld3) to identify over 100 languages. For Italian, the whole corpus of scraped text was divided in `1032` jsonl files, `1024` for training following the naming style `c4-it.tfrecord-0XXXX-of-01024.json.gz` and 8 for validation following the naming style `c4-it-validation.tfrecord-0000X-of-00008.json.gz`. The full set of preprocessed files takes roughly 215GB of disk space to download with Git LFS.
118
+
119
+ For ease of use under different storage capacities, the following incremental splits are available (sizes are estimates):
120
+
121
+ |split |train size |validation size|
122
+ |:-----|-----------------------------:|--------------:|
123
+ |tiny | 10M docs, 4B words (22 GB) | 12k docs |
124
+ |small | 20M docs, 8B words (44 GB) | 24k docs |
125
+ |medium| 50M docs, 20B words (105 GB) | 48k docs |
126
+ |large | 75M docs, 30B words (158 GB) | 72k docs |
127
+ |full | 103M docs, 41B words (215 GB)| 96k docs |
128
+
129
+ You can load any subset like this:
130
+
131
+ ```python
132
+ from datasets import load_dataset
133
+
134
+ mc4_it_tiny = load_dataset("gsarti/clean-mc4-it", "tiny")
135
+ ```
136
+
137
+ Since splits are quite large, you may want to traverse them using the streaming mode available starting from 🤗 Datasets v1.9.0:
138
+
139
+ ```python
140
+ from datasets import load_dataset
141
+
142
+ mc4_it_full_stream = load_dataset("gsarti/clean-mc4-it", "full", split='train', streaming=True)
143
+ print(next(iter(mc4_it_full_stream))) # Prints the example presented above
144
+ ```
145
+
146
+ ## Dataset Creation
147
+
148
+ Refer to the original paper for more considerations regarding the choice of sources and the scraping process for creating `mC4`.
149
+
150
+ ## Considerations for Using the Data
151
+
152
+ ### Social Impact of Dataset
153
+
154
+ With more than 200GB of cleaned Italian text and more than 41B estimated words, this is by far the largest available corpus for the Italian language. The second largest dataset available is [OSCAR](https://oscar-corpus.com/), which is only 69GB in size for its deduplicated variant. Using this corpus for training language models with adequate computational resources will allow researchers to reach parity with the performances observed for the English language. This can in turn have important repercussions for the development of commercial language technology applications for the Italian language.
155
+
156
+ ### Discussion of Biases
157
+
158
+ Despit the cleaning procedure aimed at removing vulgarity and profanity, it must be considered that model trained on this scraped corpus will inevitably reflect biases present in blog articles and comments on the Internet. This makes the corpus especially interesting in the context of studying data biases and how to limit their impacts.
159
+
160
+ ## Additional Information
161
+
162
+ ### Dataset Curators
163
+
164
+ Authors at AllenAI are the original curators for the `mc4` corpus. For inquiries or requests regarding the Italian cleaned portion contained in this repository, please contact me at [gabriele.sarti996@gmail.com](mailto:gabriele.sarti996@gmail.com)
165
+
166
+ ### Licensing Information
167
+
168
+ AllenAI are releasing this dataset under the terms of ODC-BY. By using this, you are also bound by the Common Crawl terms of use in respect of the content contained in the dataset.
169
+
170
+ ### Citation Information
171
+
172
+ ```
173
+ @article{2019t5,
174
+ author = {Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu},
175
+ title = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
176
+ journal = {arXiv e-prints},
177
+ year = {2019},
178
+ archivePrefix = {arXiv},
179
+ eprint = {1910.10683},
180
+ }
181
+ ```
182
+
183
+ ### Contributions
184
+
185
+ Thanks to [@dirkgr](https://github.com/dirkgr) and [@lhoestq](https://github.com/lhoestq) for adding this dataset.