--- language: - tr tags: - turkish - corpus - sentencepiece - unigram - tokenized --- # my_turkish_corpus_1 Cleaned and tokenized Turkish text corpus for language model training. ## Dataset Summary | Property | Value | |---|---| | Language | Turkish | | Token count | ~369M | | Vocab size | 8192 (SentencePiece Unigram) | | UNK rate | 0% | | Chars/token | 3.62 | | Token dtype | int32 | ## Cleaning - Fixed 38K+ broken Latin-1→UTF8 encoding errors - Removed Myanmar/Burmese contamination (58 lines) - Removed HTML tags, junk lines, empty lines, adjacent duplicates - Normalized whitespace, removed soft hyphens & non-breaking spaces ## Files | File | Description | Size | |---|---|---| | `tr_unigram_8192_corpus_ids.npy` | Tokenized corpus (flat int32) | ~1.48 GB | | `tr_unigram_8192.model` | SentencePiece Unigram model | ~374 KB | | `tr_unigram_8192.vocab` | Vocabulary text file | ~144 KB | | `spm_vocab.json` | Vocabulary JSON (piece→id) | ~155 KB | | `spm_meta.json` | Training metadata | ~586 B | ## Usage ```python import numpy as np from huggingface_hub import hf_hub_download import sentencepiece as spm npy = hf_hub_download("dcx514ai/my_turkish_corpus_1", "tr_unigram_8192_corpus_ids.npy") mdl = hf_hub_download("dcx514ai/my_turkish_corpus_1", "tr_unigram_8192.model") ids = np.load(npy) # ~369M tokens sp = spm.SentencePieceProcessor(model_file=mdl) text = sp.decode(ids[:100].tolist()) print(text) ``` ## Stats - `tr_corpus_clean.txt`: 2,029,958 lines / 696 MB - `tr_corpus2_clean.txt`: 419,629 lines / 640 MB - Total: 2,449,587 clean lines / ~1.34 GB raw text → 369M tokens