Datasets:
TilQazyna / Til-Books
A large corpus of full-text books in Kazakh (and Russian/English co-resident in the same collections), assembled by extracting and OCR-ing digitised book holdings. 16,847 books, each provided in two layers: the exact extracted/OCR text (
text_raw) and a cleaned, reflowed reading text (text).
Part of the TilQazyna master collection.
Abstract
Til-Books turns scattered digitised book holdings — born-digital PDFs, scanned page images, and
mixed-format archives — into a single, schema-uniform, quality-tiered book corpus for Kazakh
language modelling. Born-digital PDFs are text-extracted directly; image-only / scanned pages are
recognised with a vision LLM (Qwen3-VL) under a Kazakh-tuned OCR prompt. Every book is stored
twice: text_raw preserves the exact extraction/OCR (book layout intact), and text is the same
content with book artifacts removed (de-hyphenation, paragraph reflow, page-number/header/footer
stripping) — a rule-based transform that never rewrites the words, so there is no model
hallucination. Books are tiered premium / clean / raw by language, length, and cleanliness.
At a glance
| Books | 16,847 (deduplicated from 17,510 ingested; 663 near-duplicates dropped) |
| Layers | text_raw (exact extract/OCR) + text (cleaned, reflowed) |
| Tiers | premium 12,988 · clean 2,593 · raw 1,266 |
| Languages | kk 13,194 · ru 2,076 · en 1,209 · mixed 355 · other 13 |
| Sources | digitised-PDF 13,848 · scanned-PDF (OCR) 1,575 · 600-book set 1,050 · KazNEB scans (OCR) 374 |
| OCR engine | Qwen3-VL-30B-A3B (vision), Kazakh OCR prompt |
| License | CC-BY-4.0 · Access: gated (manual) |
Why this dataset
There is no clean, full-text Kazakh book corpus on the open hub — the large Kazakh corpora are web/news, and digital libraries (KazNEB, etc.) serve only scanned page images behind viewers. Books are the highest-quality long-form register (edited prose, literature, science, law), which is exactly what is scarce for Kazakh LM training. Til-Books fills that gap with both the raw OCR (for those who want fidelity) and a cleaned reading text (for training).
Sources & provenance (source column)
source |
what | text path |
|---|---|---|
staged-pdf |
born-digital PDFs from a national document archive | PyMuPDF text-layer extraction |
staged-scanned |
image-only PDFs from the same archive | Qwen3-VL OCR (per page) |
600kitap |
the «Қазақша 600 кітап» collection (mixed formats) | direct extraction + OCR |
kazneb |
scanned books from KazNEB (page-image folders) | Qwen3-VL OCR (per page) |
Companion repos with additional book sources harvested separately: Til-Books-Adebiportal, Til-Books-InternetArchive.
Two-layer text — what text vs text_raw mean
text_raw— the exact extracted / OCR'd text. Faithful to the page (line breaks, hyphenation, page numbers, running headers all present). Use this if you need maximum fidelity or want to run your own cleaning.text— the same content with book layout removed by rules (no LLM, no rewriting):- de-hyphenation across line breaks (
сло-\nво→слово) - paragraph reflow (hard single line-breaks joined; blank line = paragraph boundary)
- standalone page numbers, recurring running headers/footers, and УДК/ББК/ISBN boilerplate stripped
- whitespace normalised Use this as ready-to-train reading text.
- de-hyphenation across line breaks (
Schema
| column | type | description |
|---|---|---|
text |
string | cleaned, reflowed reading text (layer 2) |
text_raw |
string | exact extracted / OCR text with book layout (layer 1) |
source |
string | staged-pdf / staged-scanned / 600kitap / kazneb |
book_id |
string | source identifier of the book |
n_chars |
int | length of text |
n_chars_raw |
int | length of text_raw |
lang |
string | detected dominant language (kk/ru/en/mixed/other) |
tier |
string | premium / clean / raw |
Quality tiers (cumulative)
Tiered by cheap signals (language, length, alphabetic-character ratio):
- premium — Kazakh, ≥ 1000 chars, clean ratio ≥ 0.7 (well-extracted Kazakh books)
- clean — premium plus kk/ru/mixed, ≥ 300 chars, clean ratio ≥ 0.55
- all — everything, including short / noisy / heavily-OCR-degraded books
clean reads premium + clean shards; all reads everything. Single-copy storage via config
globs (no duplication on disk).
Usage
from datasets import load_dataset
# cleanest Kazakh books, ready-to-train cleaned text
ds = load_dataset("TilQazyna/Til-Books", "premium", split="train")
print(ds[0]["text"][:1000]) # layer 2 (cleaned)
print(ds[0]["text_raw"][:1000]) # layer 1 (exact OCR/extract)
# broader set
ds = load_dataset("TilQazyna/Til-Books", "clean", split="train")
# everything
ds = load_dataset("TilQazyna/Til-Books", "all", split="train")
kk_books = ds.filter(lambda r: r["lang"] == "kk")
Limitations & biases
- OCR error —
kaznebandstaged-scannedbooks are machine-recognised (Qwen3-VL) and contain recognition errors; preferpremiumfor cleaner text, or usetext_rawto assess. - Cleaning is heuristic — the
textreflow is rule-based; on unusual layouts (poetry, tables, multi-column) it can over- or under-join lines.text_rawis always the safe fallback. - Mixed languages — book collections contain Russian and some English;
langtags the dominant language per book, not per passage. - Tiering is signal-based, not human-judged.
Ethical & legal
- Assembled from digitised library/archive holdings for Kazakh-language NLP research.
- Copyright status varies by book and year; gated (
manual) to match org policy and to keep access deliberate. Do not redistribute in-copyright full texts outside research use. - No targeted de-anonymisation; incidental personal data in books must not be used to profile individuals.
Citation
@misc{tilqazyna_books,
title = {TilQazyna Til-Books: a two-layer Kazakh full-text book corpus},
author = {TilQazyna},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/TilQazyna/Til-Books}}
}
FAQ
Why two text columns? Fidelity vs usability. text_raw is exactly what came off the page;
text is the cleaned reading version. You choose; nothing is invented.
Was the text rewritten by an LLM? No. Cleaning is pure rules (de-hyphenate, reflow, strip
page furniture). An LLM (Qwen3-VL) was used only to OCR scanned images into text_raw — not to
paraphrase.
How many are real Kazakh books? 13,194 are tagged kk; the rest are Russian/English/mixed
co-resident in the same archives. Filter on lang.
Which tier for pre-training? premium for cleanest Kazakh; clean for a broader mix; all
if you filter yourself.
Is this everything? No — it is the digitised holdings processed so far (national archive PDFs +
KazNEB + the 600-book set). KazNEB alone has ~40k books; harvesting continues. See the companion
Til-Books-* repos for additional sources.
Why gated? Org policy + copyright caution. Access is granted on request.
- Downloads last month
- 28