mengsay's picture
Link the technical report (PDF on GitHub) in the card and citation
11cdfcb verified
|
Raw History Blame Contribute Delete
6.86 kB
metadata
pretty_name: Samdei Type Resources
license: other
license_name: mixed-cc-by-4.0-cc0-apache-2.0
language:
  - km
task_categories:
  - translation
  - text-generation
tags:
  - transliteration
  - romanization
  - romanized-khmer
  - khmer
  - lexicon
  - synthetic
size_categories:
  - 1K<n<10K
multilinguality: monolingual
source_datasets:
  - original
configs:
  - config_name: chat_sentences
    default: true
    data_files:
      - split: train
        path: chat_sentences/chat_sentences.jsonl
  - config_name: chat_sentences_romanized
    data_files:
      - split: train
        path: chat_sentences/chat_sentences_romanized.jsonl
  - config_name: chat_lexicon
    data_files:
      - split: train
        path: lexicons/chat_lexicon.jsonl
  - config_name: places
    data_files:
      - split: train
        path: lexicons/places.jsonl
  - config_name: english_chat_words
    data_files:
      - split: train
        path: lexicons/english_chat_words.jsonl
  - config_name: spelling_tables
    data_files:
      - split: train
        path: spelling_tables/spelling_tables.jsonl

Samdei Type Resources

These are the small reusable pieces behind the Samdei Type training data:

  • LLM-written Khmer chat sentences (2,483), with Gemma 4 romanizations of most of them;
  • two spelling tables mined from public lists of romanized Khmer words;
  • three hand-written lexicons: chat spellings of frequent words, place names and English chat words.

They are inputs of our data generator, which is not public. The training pairs made from them are in samdei/samdei-type-pretraining-data and samdei/samdei-type-finetuning-data.

Paper: technical report. Inference code: github.com/Samdei-Labs/samdei-type.

Configs

Config Rows Content License
chat_sentences 2,483 Khmer chat sentences written by Gemma 4 12B: khmer, domain (50), register (4) CC BY 4.0
chat_sentences_romanized 2,133 Gemma 4 romanizations of those sentences: khmer, latin, style (0–3), ok (passed our filters) CC BY 4.0
chat_lexicon 293 chat spellings of 99 frequent words: khmer, latin, weight, is_abbreviation CC0
places 76 Cambodian provinces, Phnom Penh areas and landmarks: khmer, latin_variants (a list) CC0
english_chat_words 358 English and Latin tokens common in Khmer chat, copied verbatim on both sides: word CC0
spelling_tables 368 the two mined tables, flattened: table, slot, key, spelling, prob Apache-2.0, with attribution

The original JSON tables, which the generator reads, are in spelling_tables/rules_chh.json and spelling_tables/rules_wd.json.

The pieces

Chat sentences. Web text is mostly news and prose. To cover chat topics, Gemma 4 12B, run locally, wrote Khmer chat sentences across 50 domains and 4 registers:

  • casual chat between close friends;
  • chat between a customer and a seller;
  • a polite message from a younger person to an older one;
  • a family group chat.

They are the only Khmer targets of the Samdei Type training data that are not human-written, and they were never used for evaluation. The file has 2,483 rows and 2,350 distinct texts.

Romanizations. Gemma 4 romanized the sentences "the way Cambodians type on Messenger", with 4 style prompts and 10 sentences per call. Each row's khmer is the sentence as it entered the training corpus: normalized, deduplicated, and split where a generated line held more than one sentence. It can therefore differ from the chat_sentences row it came from. ok marks the rows that passed our filters and became training pairs.

Spelling tables. These are per-slot tables (onset, vowel, coda, glide, context) of how people spell each Khmer sound in Latin letters. They were learned with Viterbi alignment and hard EM from two public lists:

  • rules_chh: the Chhunneng word list, 24.9k (Khmer word, romanization) pairs in a consistent, dictionary-like scheme (ខ្ញុំ → khnhom, ឆ → chh). Held-out log-likelihood per letter: −1.31 with our hand tables, −0.86 with the mined table.
  • rules_wd: 1.6k Wikidata person and place names, English label against Khmer label. This is the official, name-style scheme (Kampong, Banteay, Srae).

Words that are targets of a word-level evaluation set were removed from both lists before mining. Each (table, slot, key) row group gives a distribution over spellings, and prob sums to 1 within a group.

Chat lexicon. For 99 frequent words, it gives the spellings chat uses with their sampling weights, e.g. knhom, khnhom, kyom and nh for ខ្ញុំ, or tv for ទៅ. is_abbreviation marks the shortcuts. An abbreviation listed here is reserved for its word: the generator never produces it for another word.

How to load

from datasets import load_dataset
sents = load_dataset("samdei/samdei-type-resources", "chat_sentences", split="train")
lex = load_dataset("samdei/samdei-type-resources", "chat_lexicon", split="train")

Limitations

  • The chat sentences are LLM output. They can contain unnatural phrasing or spelling mistakes, and their topics follow the 50 domains we listed.
  • The Gemma romanizations reflect one LLM's idea of chat spelling. They are looser and less regular than a rule-based generator, but they are not real typing.
  • Each spelling table reproduces its source's scheme: a dictionary scheme for rules_chh and an official name scheme for rules_wd, not chat spelling as such.
  • The lexicons are small and hand-written by the authors.

License

Piece License Attribution
Chat sentences and their romanizations CC BY 4.0 written with Gemma 4 (Apache-2.0)
Chat lexicon, places, English chat words CC0 –
rules_chh table Apache-2.0 derived from the Chhunneng romanized Khmer dataset, MIT License, © 2025 Chrea Chanchhunneng (notice below)
rules_wd table Apache-2.0 derived from Wikidata (CC0)

The MIT notice of the Chhunneng dataset must accompany rules_chh. Its full text is included as spelling_tables/LICENSE-chhunneng.txt.

Citation

@misc{samdei-type-2026,
  title  = {Samdei Type: Separating What Is Written from How It Is Spelled for Romanized Khmer Transliteration},
  author = {Mengsay Loem},
  year   = {2026},
  note   = {Technical report},
  url    = {https://github.com/Samdei-Labs/samdei-type/blob/main/paper/samdei-type.pdf}
}

Contact: open a discussion in this repository's Community tab.