BramVanroy commited on
Commit
457e83c
·
verified ·
1 Parent(s): 455e49f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -2
README.md CHANGED
@@ -85,7 +85,7 @@ configs:
85
 
86
  > **Raw CommonCrawl crawls, annotated with potential Creative Commons license information**
87
 
88
- **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.
89
 
90
  ## Usage
91
 
@@ -174,7 +174,7 @@ The following languages are included.
174
  - Spanish: spa
175
 
176
 
177
- ## Recommendations
178
 
179
  - 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.
180
  - Similarly, the data has **not been deduplicated**.
@@ -184,6 +184,27 @@ The following languages are included.
184
  - 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.
185
  - 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.
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  ## Citation
188
 
189
  ```bibtex
 
85
 
86
  > **Raw CommonCrawl crawls, annotated with potential Creative Commons license information**
87
 
88
+ **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. **See Recommendations and Caveats below!**
89
 
90
  ## Usage
91
 
 
174
  - Spanish: spa
175
 
176
 
177
+ ## Recommendations and Caveats
178
 
179
  - 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.
180
  - Similarly, the data has **not been deduplicated**.
 
184
  - 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.
185
  - 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.
186
 
187
+
188
+ Recommendation:
189
+
190
+ ```python
191
+ from datasets import load_dataset
192
+
193
+
194
+ ds = load_dataset("BramVanroy/CommonCrawl-CreativeCommons", "CC-MAIN-2019-30", split="train")
195
+ ds = ds.filter(
196
+ lambda x: (
197
+ (not x["license_disagreement"]) and # Only use pages with a consistent license
198
+ (x["found_in_fw2"] or x["language"] == "eng") and # Only use pages that are in FineWeb-2 (non-English) or English
199
+ "nc" not in x["license_abbr"] and # Exclude non-commercial licenses
200
+ x["license_abbr"] != "cc-unknown" and # Exclude unknown licenses
201
+ "wiki" not in x["url"] # Exclude Wiki-like pages (best to get those from a more reliable parser)
202
+ ),
203
+ num_proc=96
204
+ )
205
+ ```
206
+
207
+
208
  ## Citation
209
 
210
  ```bibtex