The Khmer phrase «សួស្តីបទពិសោធន៍» holds two words («សួស្តី» + «បទពិសោធន៍») written together. A machine does not know where the boundary is — word segmentation finds those boundaries.
Common approaches:
- Dictionary longest-match: scan left to right, take the longest dictionary word. Easy and fast, but wrong on out-of-dictionary words and ambiguous splits.
- Statistical / ML: a model (CRF or neural) trained on text with marked boundaries. Better, but needs labelled segmentation data.
- Zero-width space: if the text has U+200B it is a strong hint — but not a guarantee.
Why it matters: a wrong boundary → wrong words → wrong downstream meaning. In search or training, bad segmentation drags the whole pipeline down. Example: «កម្ពុជា» may be one word or part of «កម្ពុជាសម័យថ្មី» in a longer phrase.
What to remember:
- Khmer writes words together — segmentation comes before most NLP
- Longest-match is easy but error-prone; models are better but need data
- U+200B is a hint, not a rule