Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -36,55 +36,97 @@ tags:
|
|
| 36 |
- corpus
|
| 37 |
- cleaned
|
| 38 |
- pretraining
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
---
|
| 41 |
|
| 42 |
-
# Scraped-Data
|
| 43 |
|
| 44 |
-
A
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
| 48 |
|
| 49 |
| File | Size | Contents |
|
| 50 |
|---|---|---|
|
| 51 |
-
| `corpus_batch1.clean.zip` | 4.80 GB | ~2.9M docs |
|
| 52 |
| `corpus_batch2.clean.zip` | 4.85 GB | ~2.5M docs |
|
| 53 |
| `corpus_batch3.clean.zip` | 4.91 GB | ~2.3M docs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
```json
|
| 60 |
-
{"src": "wiki", "url": "...", "title": "...", "chars": 1234, "text": "..."}
|
|
|
|
| 61 |
```
|
| 62 |
|
| 63 |
-
- `src` —
|
| 64 |
-
- `url` — canonical article URL
|
| 65 |
-
- `title` —
|
| 66 |
- `chars` — character count of `text`
|
| 67 |
- `text` — cleaned plain-text body
|
| 68 |
|
| 69 |
-
## Provenance
|
| 70 |
-
|
| 71 |
-
Sourced from the official `wikimedia/wikipedia` dump snapshot `20231101`
|
| 72 |
-
(parquet shards), which itself derives from Wikipedia dumps published by the
|
| 73 |
-
Wikimedia Foundation. Underlying articles are © their respective Wikipedia
|
| 74 |
-
contributors and are dual-licensed under CC-BY-SA; this compilation is
|
| 75 |
-
additionally distributed under ODATL-1.0 (below). Attribution for upstream
|
| 76 |
-
content must be preserved by downstream users in accordance with both
|
| 77 |
-
licenses.
|
| 78 |
-
|
| 79 |
## Cleaning pipeline
|
| 80 |
|
| 81 |
-
1. Segmented parallel HTTP
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
## License
|
| 90 |
|
|
|
|
| 36 |
- corpus
|
| 37 |
- cleaned
|
| 38 |
- pretraining
|
| 39 |
+
- internet-archive
|
| 40 |
+
- gutenberg
|
| 41 |
+
pretty_name: Scraped-Data — 1TB in Progress
|
| 42 |
---
|
| 43 |
|
| 44 |
+
# Scraped-Data — Building to 1 TB
|
| 45 |
|
| 46 |
+
A continuously-growing, cleaned text corpus scraped, parsed, cleaned,
|
| 47 |
+
**losslessly-zipped**, and auto-pushed from a CPU-only Google Colab pipeline.
|
| 48 |
|
| 49 |
+
**Current repo size: ~26 GB → target: 1 TB** (incremental batch uploads).
|
| 50 |
+
|
| 51 |
+
## Current files
|
| 52 |
|
| 53 |
| File | Size | Contents |
|
| 54 |
|---|---|---|
|
| 55 |
+
| `corpus_batch1.clean.zip` | 4.80 GB | ~2.9M Wikipedia docs (stored, from first scrape) |
|
| 56 |
| `corpus_batch2.clean.zip` | 4.85 GB | ~2.5M docs |
|
| 57 |
| `corpus_batch3.clean.zip` | 4.91 GB | ~2.3M docs |
|
| 58 |
+
| `corpus_batch1.v3.zip` | 4.37 GB | de-wiki shards, deflate-level-6 |
|
| 59 |
+
| `corpus_batch2.v3.zip` | 3.74 GB | fr + ru shards |
|
| 60 |
+
| `corpus_batch3.v3.zip` | 3.45 GB | es + ru shards |
|
| 61 |
+
| `manifest.jsonl` | — | durable dedup ledger (zip → bytes → source keys) |
|
| 62 |
+
|
| 63 |
+
Next batches are pushed live as they finish. Total so far: **26.1 GB** compressed,
|
| 64 |
+
~8.8M+ records (+ additional Gutenberg/IA batches incoming).
|
| 65 |
+
|
| 66 |
+
> **Live status:** batch 4 scraping (2.5 min in, ~3.1 GB raw, ~748k docs).
|
| 67 |
+
> The Colab scraper runs continuously: ~10.6 GiB raw per batch → losslessly zipped
|
| 68 |
+
> (ZIP_DEFLATED, level 6, allowZip64), uploaded immediately via `huggingface_hub`,
|
| 69 |
+
> with a manifest for cross-VM resume.
|
| 70 |
+
|
| 71 |
+
## Sources
|
| 72 |
|
| 73 |
+
- **Wikipedia** — official `wikimedia/wikipedia` `20231101` parquet shards (HF mirror
|
| 74 |
+
of Wikimedia dumps); mirror `mirror.accum.se` as fallback. Multi-language
|
| 75 |
+
priority queue: de, fr, ru, es, it, ja, zh, pt, ar, fa, tr, pl, nl, id, ko,
|
| 76 |
+
vi … (300+ configs; enwiki is only one shard of the total).
|
| 77 |
+
- **Internet Archive** — `collection:gutenberg` (public-domain plain-text books)
|
| 78 |
+
via `advancedsearch` + `metadata` + `archive.org/download` — polite
|
| 79 |
+
`IA_CONCURRENCY=20`, per-host pacing, robots-friendly.
|
| 80 |
|
| 81 |
+
Both pipelines emit the same JSONL record format and feed the same batch/zip
|
| 82 |
+
loop.
|
| 83 |
+
|
| 84 |
+
## Record schema (JSONL, one object per line)
|
| 85 |
|
| 86 |
```json
|
| 87 |
+
{"src": "wiki", "url": "https://...", "title": "...", "chars": 1234, "text": "..."}
|
| 88 |
+
{"src": "ia", "url": "https://archive.org/details/...", "title": "...", "chars": 1234, "text": "..."}
|
| 89 |
```
|
| 90 |
|
| 91 |
+
- `src` — `wiki` or `ia`
|
| 92 |
+
- `url` — canonical article/item URL
|
| 93 |
+
- `title` — title trimmed
|
| 94 |
- `chars` — character count of `text`
|
| 95 |
- `text` — cleaned plain-text body
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
## Cleaning pipeline
|
| 98 |
|
| 99 |
+
1. Segmented parallel HTTP of source shards (`SEGMENTS=10`, `SEGMENTS=10` for
|
| 100 |
+
parquet, 8 concurrent `archive.org` fetches)
|
| 101 |
+
2. Multi-process (2× fork) decode: `pyarrow`/`orjson` for parquet, streaming
|
| 102 |
+
`bz2` for legacy dumps, plain-text for IA
|
| 103 |
+
3. Per-record `clean_wiki` / IA Gutenberg-header strip:
|
| 104 |
+
- Gutenberg header/footer carve (`*START…*END*`), tab/NBSP→space,
|
| 105 |
+
CRLF normalization, control-char strip, blank-run collapse,
|
| 106 |
+
email redaction (`[email]`)
|
| 107 |
+
- Min-length gates: `MIN_TEXT_LEN=300`, `MIN_DOC=280`
|
| 108 |
+
- Exact-duplicate removal per batch (title+URL `blake2b-12`)
|
| 109 |
+
4. Batch-shard JSONL → ZIP (deflated level 6, `allowZip64`), immediate
|
| 110 |
+
`HfApi.upload_file` + manifest append + manifest re-upload for resume
|
| 111 |
+
|
| 112 |
+
All ZIPs are **lossless** (`ZIP_DEFLATED` is LZ77+Huffman — perfectly
|
| 113 |
+
reversible).
|
| 114 |
+
|
| 115 |
+
## Provenance & attribution
|
| 116 |
+
|
| 117 |
+
- Underlying Wikipedia articles © their contributors, dual-licensed
|
| 118 |
+
CC-BY-SA/GFDL.
|
| 119 |
+
- Underlying IA Gutenberg texts are public domain (U.S.).
|
| 120 |
+
- This compilation and its cleaned artifacts are additionally distributed
|
| 121 |
+
under **ODATL-1.0** (below). Users must preserve *both* upstream and
|
| 122 |
+
compilation attribution.
|
| 123 |
+
|
| 124 |
+
## Reproducibility
|
| 125 |
+
|
| 126 |
+
The full scraper (`scraper_v3.py`) runs entirely on Google Colab
|
| 127 |
+
(CPU-only). State is kept in a `manifest.jsonl` on the HF repo itself;
|
| 128 |
+
a new VM resumes by skipping `done_keys` (shard URLs + `ia:<id>`).
|
| 129 |
+
Progress and logs live in `/content/data/progress.json` & `scraper.log`.
|
| 130 |
|
| 131 |
## License
|
| 132 |
|