TL;DR
The khammoon project introduces a new paradigm for Thai NLP by shifting from ambiguous "word" segmentation to consistent morpheme-level segmentation. By combining a rigorous linguistic guideline with an LLM-in-the-loop annotation pipeline, the authors produced a lightweight 1M-parameter segmenter that achieves a 0.992 F1 score and matches or exceeds word-level baselines on downstream tasks like NER and sentiment analysis.
What Problem Does This Paper Address?
Thai is written without spaces between words, making segmentation the "Step 0" of almost every Thai NLP pipeline. Historically, this has been done at the word level. However, the concept of a "word" in Thai is notoriously slippery. Because Thai relies heavily on productive compounding (sticking two meaningful units together to make a new one), different annotators and tools often disagree on where one word ends and the next begins.
For example, should "drinking water" (น้ำดื่ม) be one unit or two? This inconsistency creates "noisy" representations for machine learning models. The authors argue that we should instead segment at the level of the khammoon (คํามูล)—the smallest atomic unit that carries meaning. By focusing on these stable, morphemic building blocks, we can eliminate the ambiguity inherent in compounding.
Methods
The authors developed a three-pronged approach to operationalize morpheme segmentation:
- Linguistic Guideline: They translated traditional Thai grammar into a formal decision procedure. This includes specific tests like the substitution test (can you replace one part with another word?) and the insertion test (can you stick a word in the middle without losing meaning?).
- LLM-in-the-Loop Annotation: To scale their high-quality human labels to a massive 70M-character corpus, they used an LLM (Qwen3-30B) prompted with their guidelines. Crucially, they didn't just take the LLM's output as gospel; they used a two-round correction process where human-labeled data was used to fix systematic LLM errors (like the tendency to keep common compounds whole).
- The khammoon Model: They trained a lightweight, 1.06M-parameter convolutional BiLSTM. The model treats segmentation as a character-level binary classification task. It incorporates "Thai Character Clusters" (TCCs) as a hard constraint, ensuring the model never suggests a boundary that would break the fundamental orthographic rules of the Thai script.
Datasets
- BEST2009: A standard Thai word segmentation corpus, adapted for morpheme-level training.
- Wangchan: A new, diverse test set covering finance, legal, medical, and retail domains to evaluate out-of-domain generalization.
- Human-Labeled Reference: 4,252 sentences from two domains, used for guideline validation and model fine-tuning.
- LLM-Annotated Corpus: A 70M-character dataset generated via the LLM pipeline to provide the scale needed for deep learning.
Key Insights and Ideas
- Consistency > Granularity: The paper demonstrates that even though morphemes are smaller units than words, their linguistic consistency makes them superior features for downstream models.
- LLMs have "Compound Bias": A fascinating finding was that LLMs systematically fail to split common compounds that the guideline requires splitting. Human "steering" through targeted corrections was essential to reach high accuracy.
- TCC Constraints are "Free" Wins: By forbidding boundaries inside Thai Character Clusters, the authors eliminated a whole class of invalid outputs (like splitting a vowel from its base consonant) with zero penalty to recall.
- Small Models are Enough: Despite the trend toward massive models, a 1M-parameter BiLSTM was sufficient to capture the morphological rules, provided the training data was high-quality and consistent.
Key Results
- State-of-the-Art Accuracy: khammoon achieved a boundary F1 score of 0.992 on out-of-domain text, significantly outperforming word-level baselines and uncorrected LLM outputs.
- Efficiency: The model processes 32,100 characters per second on a single CPU thread (using ONNX Runtime), making it practical for real-world production environments.
- Downstream Performance: In Named Entity Recognition (NER), khammoon (0.719 F1) outperformed popular word-level segmenters like AttaCut (0.658) and DeepCut (0.666). In sentiment analysis and POS tagging, it performed on par with the best word-level tools.
Limitations and Future Work
- Domain Coverage: While the model generalizes well to formal and instructional text, its performance on highly noisy social media text or slang remains unverified.
- Lexical Ambiguity: The authors note that rare proper names and complex Pali-Sanskrit compounds still pose challenges, as they often require deep etymological knowledge to segment correctly.
- Static Taxonomy: As Thai evolves with new loanwords and coinages, the linguistic guideline and model will require periodic updates to remain relevant.
Summary updated