--- language: - nog - tr pretty_name: "Old Nogay Turkish OCR Corpus" license: cc-by-4.0 size_categories: - n<1K task_categories: - text-generation - fill-mask - feature-extraction language_creators: - found annotations_creators: - machine-generated multilinguality: - multilingual source_datasets: - original tags: - text - historical - ocr - nogai - turkic-languages - low-resource-language - historical-nlp - corpus-linguistics - parquet configs: - config_name: pages default: true data_files: - split: train path: data/pages/train.parquet - split: validation path: data/pages/validation.parquet - split: test path: data/pages/test.parquet - config_name: documents data_files: - split: train path: data/documents/train.parquet - split: validation path: data/documents/validation.parquet - split: test path: data/documents/test.parquet --- # Old Nogay Turkish OCR Corpus This is a small OCR-derived corpus of historical Nogay Turkish / Turkic textual material, collected, classified, extracted, and packaged by **Fatih Burak Karagöz / CDLI.ai** for exploratory NLP, historical corpus work, and OCR-quality analysis. We are proud to release this as a contribution to Turkish NLP, Turkic-language NLP, historical NLP, and Turkish studies. The goal is not to pretend that a small OCR corpus is a polished benchmark. The goal is more grounded and, in a way, more useful: to make rare historical Turkic text material inspectable, reusable, and honest about its extraction state. ![Research lenses](analysis/assets/research-lenses.png) The corpus is especially useful for asking practical questions such as: - How do modern tokenizers behave on Nogay/Turkic surface forms and Turkish diacritics? - What happens if historical text preprocessing silently ASCII-folds `ı`, `ş`, `ğ`, `ç`, `ö`, `ü`, `ä`, or `ñ`? - Can OCR warning metadata help filter or weight pages during corpus experiments? - How should document-level splits be handled when a small corpus is also available page by page? ## What Is Inside? The dataset contains 19 historical source documents and 178 extracted pages. The material is centered on Nogay/Turkic literary and folk-text material, with Turkish-facing metadata and, in some documents, Turkish commentary, headings, or translation context. Treat it as an OCR corpus for historical Turkic NLP research, not as a monolingual clean-room Nogay benchmark. | measure | value | | --- | ---: | | documents | 19 | | pages | 178 | | page-level words | 74,776 | | page-level characters | 518,939 | | cl100k tokens | 224,110 | | regex word tokens | 73,166 | | unique regex word tokens | 22,939 | | page validation | 116 pass / 62 warn / 0 fail | ## Corpus Shape Each row below is one source document. The bar length shows word count; teal marks pages that passed validation, and red marks pages with warnings. This makes the corpus imbalance visible: a few documents carry much of the text, and warning density varies by document. ![Document atlas](analysis/assets/document-atlas.png) ## Historical Spread The dated metadata spans labels from `1400s` through `1966`, with 8 undated documents. These dates come from the extraction metadata and should be read as corpus labels, not as a final philological chronology. ![Historical timeline](analysis/assets/historical-timeline.png) ## Orthography Matters For Turkish and Nogay/Turkic NLP, the character inventory is not a cosmetic detail. The extracted text has a strong Latin-extended profile, including high counts of dotless `ı`, `ş`, `ü`, `ö`, `ğ`, and `ç`, plus rare `ä` and `ñ` traces. There are also 11 Cyrillic characters, which should be inspected as original title text, source-script traces, or OCR confusables before any automatic replacement. ![Orthography fingerprint](analysis/assets/orthography-fingerprint.png) ## Surface Forms Worth Inspecting This figure groups frequent surface forms by research lens. These are not lemmas, and the grouping is intentionally conservative: it is meant to help researchers see forms that should be inspected before normalization, lemmatization, tokenizer evaluation, or retrieval experiments. ![Turkic token constellation](analysis/assets/turkic-token-constellation.png) ## Splits And OCR Quality Pages inherit their document split, so pages from the same source document do not leak across train, validation, and test. The validation and test splits are tiny and should be used for smoke tests or leakage-safe examples, not benchmark claims. ![Split quality](analysis/assets/split-quality.png) | split | documents | pages | words | cl100k tokens | validation status | | --- | ---: | ---: | ---: | ---: | --- | | train | 17 | 168 | 68,853 | 207,280 | 114 pass / 54 warn | | validation | 1 | 7 | 4,847 | 13,394 | 2 pass / 5 warn | | test | 1 | 3 | 1,076 | 3,436 | 0 pass / 3 warn | ## Loading The default config is `pages`, because page-level rows are easier to inspect and filter. ```python from datasets import load_dataset pages = load_dataset("fatihburakkaragoz/old-nogay-turkish-ocr-corpus", "pages") documents = load_dataset("fatihburakkaragoz/old-nogay-turkish-ocr-corpus", "documents") ``` Local loading from a clone of this repository: ```python from datasets import load_dataset pages = load_dataset(".", "pages") documents = load_dataset(".", "documents") ``` ## Configurations ### `pages` One row per source page. Use this for filtering, OCR-quality inspection, training examples, retrieval chunks, and page-aware analysis. Important fields: - `page_id`, `document_id`, `page_number` - `document_name`, `title`, `author`, `document_date_label` - `raw_text`, `clean_text` - `validation_status`, `validation_issues` - `script_direction`, `primary_script`, `detected_languages` - `token_count_cl100k`, `text_length_chars`, `text_length_words` - `split` ### `documents` One row per source document. Use this for whole-document reading, longer-context experiments, or document-level metadata. The document-level `clean_text` joins page texts with form-feed page separators: `\n\f\n`. Important fields: - `document_id`, `document_name`, `title`, `author`, `document_date_label` - `page_count` - `raw_text`, `clean_text`, `markdown` - `pages_pass`, `pages_warn`, `pages_fail`, `pages_empty` - `dominant_script`, `dominant_direction`, `languages_detected` - `total_tokens_cl100k` - `split` ## Quality Notes - No page is empty and no page has `validation_status = fail`. - All 62 warning pages are flagged for remaining line-break hyphenation. - `raw_text` and `clean_text` are NFC-normalized in this packaged release. - Metadata strings were also NFC-normalized for this Hugging Face package. - The extraction language labels are `tr` and `ota-latn`; the Hub metadata uses `nog` and `tr` for discoverability. Treat these labels as metadata, not as proof that every span is cleanly language-separated. ## Known Limitations - Some `author` values appear to come from PDF metadata, for example `egitim2@EGITIM2`, and should not be treated as scholarly authorship without manual review. - 8 of 19 documents are undated. - The corpus is small and imbalanced. - OCR warnings are preserved rather than silently corrected. - The data contains Turkish-facing context as well as Nogay/Turkic material, so downstream users should inspect task-specific slices before claiming language-pure results. ## Reproducible Analysis The analysis files are included under `analysis/`. ```bash python scripts/analyze_dataset.py python scripts/make_graphics.py ``` These regenerate: - `analysis/corpus_stats.json` - `analysis/corpus_analysis.md` - `analysis/assets/*.svg` - `analysis/assets/*.png` ## Source And Processing Extraction metadata from `manifest.json`: - `schema_version`: 2 - `pipeline_version`: 2.0.0 - `model_used`: `deepseek-ai/DeepSeek-OCR-2` - `created_by.project`: `opencr` - `created_by.organization`: `cdli.ai` - `split_strategy`: SHA-256 bucket, 90/5/5 target ratios ## Licensing This dataset package is released under **CC BY 4.0** by **Fatih Burak Karagöz / CDLI.ai**. The licensed release covers the collected and classified dataset package, OCR extraction, structured metadata, analysis outputs, graphics, and Hugging Face packaging. The source materials are historical documents collected and processed for this research corpus. If a downstream use requires a separate legal determination for a particular original scan or edition, inspect the relevant source context before redistribution. ## How To Credit There is no separate upstream dataset citation: this is an original collected, classified, and extracted corpus release. If you use it in research, please cite this Hugging Face dataset and credit **Fatih Burak Karagöz / CDLI.ai**. Suggested citation text: ```text Karagöz, Fatih Burak / CDLI.ai. Old Nogay Turkish OCR Corpus. Hugging Face dataset: fatihburakkaragoz/old-nogay-turkish-ocr-corpus. ```