You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Victorian tier-2 corpus, 1837-1901

Additional English books in the 1837-1901 window, deduplicated against the existing British Library + Project Gutenberg corpus, for extending pretraining data beyond the 3.35B-token tier-1 set.

Contents

  • loc-txt.tar - one .txt per book, flat, UTF-8, no nested directories
  • tier2_loc_manifest.csv - lccn,title,author,year,pages,words,chars,sha256
  • tier2_loc_drop.csv - dropped items and the reason (year, short, low_alpha, low_type_token, dup_bl:0.61, ...)
  • tokenizer-32k.json - the tokenizer the corpus was measured against

Build

Books kept 40,912
Characters 11,444,117,354
Tokens (est., 4.27 chars/token) ~2.68B
Years 1837-1901
Source rows scanned 131,885
Dropped: out of range 131,885
Dropped: OCR quality 11,737 low type/token, 7,913 short, 321 low alpha, 214 word length
Dropped: duplicates 2,496 intra-tier-2, 1,300 vs British Library, 729 vs Project Gutenberg

Total corpus after merge: 3.35B (tier-1) + 2.68B (tier-2) = ~6.0B unique tokens.

Provenance

Source: Library of Congress Selected Digitized Books, via the storytracer/LoC-PD-Books dataset (CC0). Full text is LoC OCR, US public domain.

Cleaning (applied to every book)

  1. Unicode NFC, ligature expansion (fi, fl, ffi, ffl), soft-hyphen removal.
  2. Running heads dropped: lines under 70 chars repeating 10+ times.
  3. Page numbers and roman-numeral folios dropped.
  4. Line-break dehyphenation (govern-\nment -> government).
  5. Quality gate: >=20k chars, >=55% alphabetic, mean word length 3.5-8.0, type/token ratio >=0.12.

Deduplication

Char-12 MinHash, 64 permutations, 32-band LSH, Jaccard >=0.45 against:

  • every tier-1 British Library book (28,097 texts)
  • every Project Gutenberg text (10,256)
  • every earlier tier-2 book in the same run

Threshold rationale: at 5% OCR character error rate the same book scores ~0.39 on char-12 shingles while unrelated text sits at ~0.018. 0.45 is conservative: it drops clear re-scans and multi-volume repeats, and keeps partial retellings.

Not included

  • HathiTrust (814k public-domain volumes, 480GB+): requires a research application, and Google-digitised volumes need an institutional agreement.
  • Chronicling America newspapers: ~1 TB of batch tarballs for a few billion usable tokens; poor download-to-text ratio.

Use

hf download raspbfox/victoria-tier2 loc-txt.tar --repo-type dataset --local-dir /tmp/t2
mkdir -p data/tier2/loc && tar -xf /tmp/t2/loc-txt.tar -C data/tier2/loc
python bin/11_build_bl_corpus.py --phase tokenize \
  --text-dir data/tier2/loc --token-dir data/tokens-tier2
Downloads last month
-