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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
task_ids:
|
| 6 |
+
- language-modeling
|
| 7 |
+
pretty_name: ©️ Common Crawl Creative Commons
|
| 8 |
+
language:
|
| 9 |
+
- afr
|
| 10 |
+
- deu
|
| 11 |
+
- eng
|
| 12 |
+
- fra
|
| 13 |
+
- fry
|
| 14 |
+
- ita
|
| 15 |
+
- nld
|
| 16 |
+
- spa
|
| 17 |
+
configs:
|
| 18 |
+
- config_name: CC-MAIN-2024-51
|
| 19 |
+
data_files: data/CC-MAIN-2024-51/**/*.parquet
|
| 20 |
+
- config_name: CC-MAIN-2024-51-af
|
| 21 |
+
data_files:
|
| 22 |
+
- split: train
|
| 23 |
+
path: data/CC-MAIN-2024-51/af/train-*
|
| 24 |
+
- config_name: CC-MAIN-2024-51-de
|
| 25 |
+
data_files: data/CC-MAIN-2024-51/de/*.parquet
|
| 26 |
+
- config_name: CC-MAIN-2024-51-en
|
| 27 |
+
data_files: data/CC-MAIN-2024-51/en/*.parquet
|
| 28 |
+
- config_name: CC-MAIN-2024-51-es
|
| 29 |
+
data_files: data/CC-MAIN-2024-51/es/*.parquet
|
| 30 |
+
- config_name: CC-MAIN-2024-51-fr
|
| 31 |
+
data_files: data/CC-MAIN-2024-51/fr/*.parquet
|
| 32 |
+
- config_name: CC-MAIN-2024-51-fy
|
| 33 |
+
data_files: data/CC-MAIN-2024-51/fy/*.parquet
|
| 34 |
+
- config_name: CC-MAIN-2024-51-it
|
| 35 |
+
data_files: data/CC-MAIN-2024-51/it/*.parquet
|
| 36 |
+
- config_name: CC-MAIN-2024-51-nl
|
| 37 |
+
data_files: data/CC-MAIN-2024-51/nl/*.parquet
|
| 38 |
+
- config_name: af
|
| 39 |
+
data_files: data/**/af/*.parquet
|
| 40 |
+
- config_name: de
|
| 41 |
+
data_files: data/**/de/*.parquet
|
| 42 |
+
- config_name: default
|
| 43 |
+
data_files: data/**/*.parquet
|
| 44 |
+
- config_name: en
|
| 45 |
+
data_files: data/**/en/*.parquet
|
| 46 |
+
- config_name: es
|
| 47 |
+
data_files: data/**/es/*.parquet
|
| 48 |
+
- config_name: fr
|
| 49 |
+
data_files: data/**/fr/*.parquet
|
| 50 |
+
- config_name: fy
|
| 51 |
+
data_files: data/**/fy/*.parquet
|
| 52 |
+
- config_name: it
|
| 53 |
+
data_files: data/**/it/*.parquet
|
| 54 |
+
- config_name: nl
|
| 55 |
+
data_files: data/**/nl/*.parquet
|
| 56 |
+
dataset_info:
|
| 57 |
+
config_name: CC-MAIN-2024-51-af
|
| 58 |
+
features:
|
| 59 |
+
- name: text
|
| 60 |
+
dtype: string
|
| 61 |
+
- name: id
|
| 62 |
+
dtype: string
|
| 63 |
+
- name: dump
|
| 64 |
+
dtype: string
|
| 65 |
+
- name: url
|
| 66 |
+
dtype: string
|
| 67 |
+
- name: date
|
| 68 |
+
dtype: string
|
| 69 |
+
- name: file_path
|
| 70 |
+
dtype: string
|
| 71 |
+
- name: license_abbr
|
| 72 |
+
dtype: string
|
| 73 |
+
- name: license_version
|
| 74 |
+
dtype: string
|
| 75 |
+
- name: license_location
|
| 76 |
+
dtype: string
|
| 77 |
+
- name: license_in_head
|
| 78 |
+
dtype: bool
|
| 79 |
+
- name: license_in_footer
|
| 80 |
+
dtype: bool
|
| 81 |
+
- name: potential_licenses
|
| 82 |
+
struct:
|
| 83 |
+
- name: abbr
|
| 84 |
+
sequence: string
|
| 85 |
+
- name: in_footer
|
| 86 |
+
sequence: bool
|
| 87 |
+
- name: in_head
|
| 88 |
+
sequence: bool
|
| 89 |
+
- name: location
|
| 90 |
+
sequence: string
|
| 91 |
+
- name: version
|
| 92 |
+
sequence: string
|
| 93 |
+
- name: license_parse_error
|
| 94 |
+
dtype: bool
|
| 95 |
+
- name: license_disagreement
|
| 96 |
+
dtype: bool
|
| 97 |
+
- name: language
|
| 98 |
+
dtype: string
|
| 99 |
+
- name: language_score
|
| 100 |
+
dtype: float64
|
| 101 |
+
- name: in_fw2
|
| 102 |
+
dtype: bool
|
| 103 |
+
splits:
|
| 104 |
+
- name: train
|
| 105 |
+
num_bytes: 75356511
|
| 106 |
+
num_examples: 17733
|
| 107 |
+
download_size: 41860751
|
| 108 |
+
dataset_size: 75356511
|
| 109 |
+
---
|
| 110 |
+
|
| 111 |
+
> **Raw CommonCrawl crawls, annotated with potential Creative Commons license information**
|
| 112 |
+
|
| 113 |
+
**The licensing information is extracted from the web pages based on whether they link to Creative Commons licenses but false positives may occur!** While further filtering based on the location type of the license should improve the precision (e.g. by removing hyperlink (a_tag) references), false positives may still occur.
|
| 114 |
+
|
| 115 |
+
## Usage
|
| 116 |
+
|
| 117 |
+
```python
|
| 118 |
+
from datasets import load_dataset
|
| 119 |
+
|
| 120 |
+
# Everything
|
| 121 |
+
ds = load_dataset("BramVanroy/CommonCrawl-CreativeCommons")
|
| 122 |
+
|
| 123 |
+
# Single dump, all languages
|
| 124 |
+
ds = load_dataset("BramVanroy/CommonCrawl-CreativeCommons", "CC-MAIN-2024-51")
|
| 125 |
+
|
| 126 |
+
# Single language, all dumps
|
| 127 |
+
ds = load_dataset("BramVanroy/CommonCrawl-CreativeCommons", "nl")
|
| 128 |
+
|
| 129 |
+
# Single language, single dump
|
| 130 |
+
ds = load_dataset("BramVanroy/CommonCrawl-CreativeCommons", "CC-MAIN-2024-51-nl")
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
## Fields
|
| 134 |
+
|
| 135 |
+
In some cases, multiple licenses are found on a single page. All licenses are collected in `potential_licenses`. From these, the "best guess" is selected
|
| 136 |
+
based on three criteria:
|
| 137 |
+
|
| 138 |
+
1. location_preference_order: meta_tag, json-ld, link_tag, a_tag
|
| 139 |
+
2. head_preference_order: True, False
|
| 140 |
+
3. footer_preference_order: True, False
|
| 141 |
+
|
| 142 |
+
Based on these criteria, the "best guessed" license is picked as the one in the `license_*` columns. Potential disagreement between multiple licenses is given in `license_disagreement`.
|
| 143 |
+
|
| 144 |
+
- text: the extracted text (unmodified)
|
| 145 |
+
- id: WARC-Record-ID
|
| 146 |
+
- dump: Common Crawl crawl
|
| 147 |
+
- url: original url for document
|
| 148 |
+
- date: crawl date
|
| 149 |
+
- file_path: file path on the S3 bucket
|
| 150 |
+
- license_abbr: the license type. Possible values: "cc-unknown" (recommended to filter this one out), "by", "by-sa", "by-nd", "by-nc", "by-nc-sa", "by-nc-nd", "zero", "certification", "mark". If multiple licenses were found (`potential_licenses`)
|
| 151 |
+
- license_version: the license version, e.g. "4.0"
|
| 152 |
+
- license_location: the location where the license was found. Possible values: "meta_tag", "json-ld", "link_tag", "a_tag"
|
| 153 |
+
- license_in_head: whether the license was found inside a `head` HTML element
|
| 154 |
+
- license_in_footer: whether the license was found inside a `footer` HTML element, or an HTML element that had `footer` in the ID or class name
|
| 155 |
+
- potential_licenses:
|
| 156 |
+
- abbr: list of all found license abbreviations
|
| 157 |
+
- version: list of all found license versions
|
| 158 |
+
- location: list of all found license locations
|
| 159 |
+
- in_head: list of whether licenses were found in the head
|
| 160 |
+
- in_footer: list of whether licenses were found in a footer
|
| 161 |
+
- license_parse_error: whether there was a problem when trying to extract the license, e.g. an unparseable HTML document
|
| 162 |
+
- license_disagreement: whether the `potential_licenses["abbr"]` disagree, i.e., different types of licenses were found. License *versions* are not included in the comparison!
|
| 163 |
+
- language: the language, as detected by fastText `ft176`
|
| 164 |
+
- language_score: the language identification confidence score
|
| 165 |
+
- found_in_fw2: whether this sample was found in FineWeb-2. Crawls that are more recent than FW2 (everything after 2024-18) is marked as None
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
## Progress
|
| 169 |
+
|
| 170 |
+
The attempt is to at least process all five RedPyjama crawls + `CC-MAIN-2024-51`.
|
| 171 |
+
|
| 172 |
+
Done:
|
| 173 |
+
|
| 174 |
+
- CC-MAIN-2024-51
|
| 175 |
+
|
| 176 |
+
Running:
|
| 177 |
+
|
| 178 |
+
- CC-MAIN-2019-30
|
| 179 |
+
|
| 180 |
+
To do:
|
| 181 |
+
|
| 182 |
+
- CC-MAIN-2019-30
|
| 183 |
+
- CC-MAIN-2020-05
|
| 184 |
+
- CC-MAIN-2021-04
|
| 185 |
+
- CC-MAIN-2022-05
|
| 186 |
+
- CC-MAIN-2023-06
|
| 187 |
+
- CC-MAIN-2024-51
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
## Languages
|
| 191 |
+
|
| 192 |
+
The following languages are included.
|
| 193 |
+
|
| 194 |
+
- afr_Latn
|
| 195 |
+
- deu_Latn
|
| 196 |
+
- eng_Latn
|
| 197 |
+
- fra_Latn
|
| 198 |
+
- fry_Latn
|
| 199 |
+
- ita_Latn
|
| 200 |
+
- nld_Latn
|
| 201 |
+
- spa_Latn
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
## Recommendations
|
| 205 |
+
|
| 206 |
+
- Raw CommonCrawl data is processed in an attempt to extract licensing information. No quality filtering is done!! It is **highly** recommended to filter this data further on quality, fluency, toxicity, etc.
|
| 207 |
+
- Similarly, the data has **not been deduplicated**.
|
| 208 |
+
- The licenses include all possible Creative Commons licenses, including non-commercial ones. Take care about what kind of data you wish to use, and filter out non-commercial licenses when needed.
|
| 209 |
+
- The column `license_disagreement` indicates whether multiple licenses were found that have not the same abbreviation, e.g. `cc-by` and `cc-by-nc`. It is recommended to filter these out.
|
| 210 |
+
- The column `license_parse_error` indicates whether an error occurred when parsing the license. You probably want to filter out documents where this was the case, though this should be extremely rare.
|
| 211 |
+
- Unsurpisingly, the data contains a lot of Wikipedia/Wikimedia content. Depending on what you need, you may wish to filter those out. For Wikipedia specifically, you may opt to use the more thoroughly parsed (but potentially more outdated) [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) set.
|
| 212 |
+
- In exceptional cases, a link to creativecommons.org is found but the exact license could not be found. These are under `license_abbr="cc-unknown"` which you may wish to filter out.
|
| 213 |
+
|
| 214 |
+
## Acknowledgments
|
| 215 |
+
|
| 216 |
+
- [TNO](https://www.tno.nl/nl/), who funded the work hours to accomplish this collection. They intend to use parts of this material for the [GPT-NL project](https://gpt-nl.nl/).
|
| 217 |
+
- [Flemish Supercomputer Center](https://www.vscentrum.be/) for part of the compute under grant 2024-107
|
| 218 |
+
- Guilherme Penedo ([@guipenedo](https://huggingface.co/guipenedo)) and the rest of the [FineWeb](https://huggingface.co/datasets/HuggingFaceFW/fineweb) and [datatrove](https://github.com/huggingface/datatrove) team for the help and insights
|
| 219 |
+
- ML6 and specifically Robin Van Craenenbroek for their [Fondant Creative Commons](https://github.com/ml6team/fondant-usecase-filter-creative-commons/tree/add-fondant-usecase-cc-image-extraction) filter for image datasets. While my approach is different, their code did serve as inspiration.
|