arXiv:2609.30984cs.CLSep 2026

Manuscript Offprint

arXiv:2609.30984

THA: Weighted Finite-State Text Normalization and Inverse Text Normalization for Khmer

Seanghay Yath

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Text-to-speech needs written text in spoken form, and speech recognition output needs the reverse. For Khmer, neither direction has a maintained open-source tool, and the script makes both harder: words are not separated by spaces, and number words occur inside ordinary words. We present THA, a Khmer text normalization and inverse text normalization toolkit built from weighted finite-state transducers. It segments and classifies a whole line in one shortest-path search, and a second transducer rejects token boundaries inside a Khmer syllable. On Google’s Khmer test suite, THA agrees with the reference on all 274 cardinals up to one spelling variant, and on 2,906 real TTS prompts, 153 of the 158 sentences it rewrites are correct. THA is open source under the Apache 2.0 license.

1 Introduction

A TTS front end has to turn “สัณ 1.05”intothewordsaspeakerwouldsay,“สัณ๑๑๑๑−๑๑๑๑”,andanASRsystemhastoturn“มีพิกัด”backinto“1.05” into the words a speaker would say, “สัณ ๑๑๑๑-๑๑๑๑”, and an ASR system has to turn “มีพิกัด” back into “250”. These two tasks, text normalization (TN) and inverse text normalization (ITN), are usually done with hand-written grammars compiled into weighted finite-state transducers (WFSTs) [6, 10, 27], since neural models still make the occasional unrecoverable error, such as reading the wrong number [25, 36].

For Khmer, the only released grammars are Google’s Thrax grammars for TTS [24]. They do TN only, expect input that is already segmented into words, and have been archived since 2021. NeMo [37] and WeTextProcessing [32] do not support Khmer. The language also breaks some of their assumptions: Khmer is written without spaces between words, so there are no tokens to classify one at a time, and short number words occur inside ordinary words (“two”, begins “melodious”).

THA is an open-source toolkit for both directions. It tags a whole line in one shortest-path search, so it needs no word segmenter (§4.1), and a filter transducer rejects tokens that start or end inside a Khmer syllable (§4.2). We describe the grammars for 17 TN and 13 ITN classes (§4.3, §4.5) and evaluate them against Google’s test suite, on spoken-form TTS prompts, by round trip and with an ablation (§5).

1๑๑10๑๑10210^{2}๑๑
2๑๑20๑๑10310^{3}๑๑
3๑30๑๑๑๑ (๑๑๑)10410^{4}๑๑๑
4๑๑40๑๑๑๑ (๑๑)10510^{5}๑๑๑
5๑๑50๑๑๑๑ (๑๑)10610^{6}๑๑๑
6๑๑๑๑60๑๑๑๑ (๑๑๑)10910^{9}๑๑๑๑
7๑๑๑๑70๑๑๑๑ (๑๑๑)๑๑๑๑
8๑๑๑80๑๑๑๑ (๑๑๑)101210^{12}๑๑๑๑
9๑๑๑๑90๑๑๑๑ (๑๑)0๑๑๑

Table 1: Khmer number words. Short spoken forms of the tens are in parentheses; they are only used before a digit (๑๑๑๑, 62).

References (27)