Khmer Lemmatization Studio

A web tool that splits Khmer text into words and maps each derived word (ពាក្យកម្លាយ) to its root word (ពាក្យឫស), for students and Khmer NLP work.

17-second screen recording of the live demo: loading sample text, finding root words, and browsing the dictionary. No sound. Plays only when you press play.

At a glance

My role
Developer, with advisors Dr. Khim Chamroeun and Dr. Mao Makara.
Timeline
Mar 2026
You can check
Code · Live demo

Overview

Many Khmer words are formed from a simpler root, for example កកាយ from កាយ and គំនិត from គិត. Khmer Lemmatization Studio helps students find these roots: paste Khmer text and it shows each word next to its root form. The 60-entry dictionary was compiled from Teacher Vatha’s YouTube lesson on words formed with prefixes (១០០០ពាក្យកម្លាយដោយផ្នត់ដើម), and contributions to expand it are welcome.

My contribution

  • Developed the application: Khmer word tokenization, dictionary-based root-word lookup, a token-level results table, and summary statistics.
  • Deployed it as a public demo on Hugging Face Spaces and released the code under the MIT licence.
  • Worked with advisors Dr. Khim Chamroeun and Dr. Mao Makara; Nhor Povketya and Ly Hor collected the dictionary data.

How it works

What it does

  • Khmer word tokenization
  • Root-word lookup for derived words
  • Token-level results table showing whether each word changed
  • Combined root-form text that can be copied in one step
  • Counts of total and lemmatized words
  • One-click sample text and a browsable dictionary view

How it is built

  • Gradio web interface in Python
  • Word segmentation with khmer-nltk (CRF-based)
  • Derived-word to root-word pairs stored as JSON; new entries are added by pull request
  • Deployed on Hugging Face Spaces

Limitations

  • Root words come from a curated 60-entry dictionary, so derived words outside it are left unchanged.
  • Word boundaries come from the khmer-nltk tokenizer, so its segmentation errors carry into the results.
  • No accuracy evaluation is claimed.