KurdishCorpus-clean / README.md
alanhasn's picture
Upload README.md with huggingface_hub
5c446d5 verified
|
Raw
History Blame Contribute Delete
11.9 kB
metadata
license:
  - cc-by-sa-4.0
  - odc-by
  - cc0-1.0
  - other
language:
  - kmr
  - ckb
  - diq
multilinguality: multilingual
task_categories:
  - text-generation
  - fill-mask
pretty_name: Kurdish National Corpus v1.1 (Kurmanji-Native)
size_categories:
  - 1M<n<10M
dataset_info:
  features:
    - name: id
      dtype: string
    - name: text
      dtype: string
    - name: title
      dtype: string
    - name: language
      dtype: string
    - name: dialect
      dtype: string
    - name: source
      dtype: string
    - name: url
      dtype: string
    - name: license
      dtype: string
    - name: author
      dtype: string
    - name: date
      dtype: string
    - name: num_chars
      dtype: int64
    - name: num_words
      dtype: int64
    - name: lid_label
      dtype: string
    - name: lid_prob
      dtype: float64
    - name: quality_score
      dtype: float64
    - name: subject
      dtype: string
    - name: level
      dtype: string
    - name: grade
      dtype: string
    - name: pages
      dtype: int64
  splits:
    - name: train
      num_bytes: 7681828199
      num_examples: 2734857
  download_size: 7681828199
  dataset_size: 7681828199
configs:
  - config_name: default
    data_files:
      - split: train
        path: corpus_v2_open_release.jsonl

The Largest Documented Kurmanji and Multi-Dialect Kurdish Dataset — v1.1

A large-scale, multi-dialect Kurdish text corpus prioritizing native Kurmanji (Northern Kurdish) fluency, with substantial Sorani (Central Kurdish) and a Zazaki baseline. Built for language modeling, tokenizer training, and general-purpose Kurdish NLP.

This release contains only openly-licensed or presumptively-free redistributable content. A parallel research-tier subset (copyrighted commercial news/broadcast scrapes and a small set of copyrighted private books — see Licensing below) exists locally for internal training use but is deliberately excluded from this public release.

Dataset Statistics (v1.1, open-release)

Dialect Documents Words Doc share Word share
Kurmanji (kmr) 2,121,482 603,988,734 77.6% 73.0%
Sorani (ckb) 595,877 219,089,076 21.8% 26.5%
Zazaki (diq) 17,498 4,764,337 0.6% 0.6%
Total 2,734,857 827,842,147

v1.1 adds ~371,500 Kurmanji documents (+167.1M words) over v1.0, almost entirely from two new sources (see Sources below): kurdish-web, a CC-BY-4.0 Kurdish/Zaza web-crawl corpus (Kurmanji portion only — this project deliberately ingests Kurmanji-only from new multi-dialect sources by default, leaving that source's Sorani/Zazaki configs uncollected), and kurdish-theses, a small CC-BY-4.0 academic-thesis corpus. Sorani and Zazaki totals are byte-for-byte unchanged from v1.0, confirming this update is Kurmanji-only as intended.

Exact token counts (verified, reproducible)

The word counts above are whitespace-token counts computed at extraction time, not subword/model tokens. For an exact figure, every document in this exact release file was tokenized with OpenAI's tiktoken (cl100k_base encoding) on 2026-07-17:

Dialect Tokens (cl100k_base) Share
Kurmanji (kmr) 1,589,729,406 53.5%
Sorani (ckb) 1,367,695,358 46.1%
Zazaki (diq) 12,436,166 0.4%
Total 2,969,860,930

Sorani's Arabic script is markedly less token-efficient under generic BPE vocabularies than Kurmanji's Latin script (roughly 7 tokens/word vs. ~2.8), so its token share overstates its real proportion relative to the word counts above; a custom Kurdish tokenizer would close most of this gap.

This count is exact and reproducible, not an estimate — run python scripts/count_exact_tokens.py data/final/corpus_v2_open_release.jsonl yourself against the released file to verify it. It is also, as far as we know, the only published Kurdish corpus that discloses a per-dialect token breakdown at all: other large aggregate Kurdish corpora advertise a single multidialectal total token count without stating which tokenizer produced it or how it splits across dialects, which makes independent verification or a fair Kurmanji-specific comparison impossible from their documentation alone.

Sources

Source Documents License
FineWeb-2 (HuggingFaceFW) 876,654 ODC-BY-1.0
Kurdish Web Corpus (Kurmanji portion only; internal source tag kurdish-web) 392,721 CC-BY-4.0 — created by HF user muzaffercky
Wiki-Ferheng (wiktextract of Kurdish Wiktionary) 453,390 CC-BY-SA-4.0 + GFDL
Kurdish Wiktionary (ku/ckb, direct XML extraction) 374,565 CC-BY-SA-4.0
MADLAD-400 198,696 ODC-BY-1.0
HPLT 2.0 167,389 CC0-1.0
CC-100 136,305 Common Crawl ToU
Kurdish Wikipedia (ku/ckb/diq) 98,619 CC-BY-SA-4.0
OPUS CCAligned 27,460 CC-derived (Common Crawl terms)
Tatoeba 8,228 CC-BY-2.0-FR
Kurdish Academic Theses (internal source tag kurdish-theses) 373 CC-BY-4.0 — created by HF user muzaffercky, declared for their derived/processed text; the underlying theses' upstream terms from YÖK Tez Merkezi (Turkey's national thesis repository) are not independently verified by this project — same category of caveat as the Rojava curriculum below
Kurdish Wikiquote 152 CC-BY-SA-4.0
Internet Archive (public-domain-verified books) 127 Public Domain Mark / CC0 / age-verified PD
Rojava school curriculum (PDFs) 99 Presumptively free educational material, distributed by the Rojava Autonomous Administration for schools' use — per the data provider's representation, not independently verified by this project against a specific copyright framework (three Arabic-language subject textbooks from this same batch were identified and removed — see Data Cleaning below)
VOA Kurdish (Kurmanji + Sorani) 72 Public Domain (U.S. government work, 17 U.S.C. §105)
Kurdish Wikibooks 7 CC-BY-SA-4.0

The Sources and Licensing sections above are self-contained for this release's purposes; they summarize a longer internal source-verification process (per-source license checks, volume estimates, and the engineering history behind each collection phase) that isn't included in this distribution.

Licensing — why some content is not in this release

This project maintains a two-tier policy: open (the license permits redistribution, included here) and research (copyrighted material collected for internal model training only, never redistributed). The following sources exist in the project's full working corpus but are excluded from this public release:

Source Docs excluded Why
Ronahi TV news/broadcast (Kurmanji) 48,768 Copyrighted broadcast content
Kurdistan24 news (Kurmanji) 165 Copyrighted commercial news
Rudaw news (Kurmanji) 93 Copyrighted commercial news
Kurdistan Parliament legislation 177 Government text, presumptively PD but not independently verified against Iraqi/KRG statute
Local PDF books (incl. one political work) 3 Copyrighted, non-openly-licensed

Note on the Rojava school curriculum specifically: this source is included in the release (see Sources above), on the basis that it is distributed freely by the Rojava Autonomous Administration for educational use. That representation has not been independently verified by this project against a specific copyright statute or license text — the same category of uncertainty as the Kurdistan Parliament legislation above, which is kept research-tier for exactly this reason. If you plan to build on this subset specifically, you may want to do your own diligence before treating it as unambiguously public domain.

If you need the research-tier subset for your own (non-redistributed) training, it is available in the project's working directory; it is not part of this Hugging Face release and should not be re-uploaded elsewhere without independently clearing the licensing questions above.

Data Cleaning & Quality Pipeline

  1. Collection — per-source extractors (Wikimedia XML dumps, HPLT/MADLAD/ FineWeb-2/CC-100 web-crawl shards, OPUS parallel corpora, targeted PDF/HTML scrapers) into a common JSONL schema.
  2. Exact deduplication — hash-based, at merge time.
  3. Near-duplicate removal — MinHash/LSH (Jaccard ≥0.8) across the whole prose corpus, keeper priority favoring more-curated sources.
  4. Language identification — GlotLID (fastText), removing documents whose predicted language isn't a Kurdish variant above threshold. Dictionary/curriculum sources are exempted from removal but still fully classified, which enabled the fix below.
  5. Gopher-style quality filtering — min/max length, symbol ratio, repetition (line/paragraph/n-gram), stopword presence; dictionary and curriculum sources are exempted from the length/repetition battery (short definitions and formulas would otherwise be wrongly rejected) but still checked for basic non-corruption.
  6. Surgical language sanitation (this release's key fix) — during PDF ingestion of the Rojava school curriculum, three Arabic-language subject textbooks (an elementary Arabic-language course, titled "عربي" / "عربي مكون كردي") slipped through alongside ~100 genuinely Kurdish curriculum PDFs. A first attempt to remove them with a hand-built Arabic character/stopword density heuristic backfired badly: because several Arabic letters (ة ث ص ض ط ظ ذ ي) also appear incidentally in ordinary Kurdish text — quoting an Arabic-script proper noun in parentheses (a standard Kurdish-Wikipedia convention, e.g. "Trablûs (bi erebî: طرابلس)"), or a dictionary correctly documenting an Arabic loanword's etymology — the density filter quarantined 17,574 documents when only 3 were actually contaminated, with 92% of the false positives coming from already-verified-clean FineWeb-2 Sorani content. The fix: every document's GlotLID classification (lid_label) was already computed and stored during step 4, just never used for this purpose. Filtering specifically on source == "rojava-curriculum" AND lid_label == "arz_Arab" identified exactly the 3 contaminated documents, with zero false positives — confirmed by manual inspection of all three (subject fields read "عربي" / "عربي مكون كردي") and of the full 102-document curriculum set (the rest carry Kurdish or classification-noise labels, never a genuine Arabic one). This is the recommended lesson for anyone extending this corpus: prefer a model-based whole-document signal already computed by your pipeline over a hand-built character/keyword heuristic for language-purity checks — the latter cannot distinguish "this document is in language X" from "this document merely mentions language X." This quarantine step is re-applied on every pipeline rebuild (new sources go through the same merge → near-dedup → LID → quality → surgical-sanitation sequence); the v1.1 rebuild reconfirmed the identical 3 documents and zero false positives.

Intended Use

Pretraining and fine-tuning language models, embeddings, tokenizers, and other NLP systems for Kurdish (Kurmanji-priority, with Sorani and Zazaki support). Not vetted for toxic/harmful content beyond the quality filters above; downstream users training public-facing systems should apply their own safety filtering.

Citation

If you use this dataset, please cite the source repository and, where applicable, the upstream datasets listed in Sources above (particularly FineWeb-2, MADLAD-400, HPLT, and the Kurdish Wikimedia projects, each of which has its own citation guidance).