1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Per-language rule aggregators for Southeast Asian languages.
//!
//! Covers: Thai, Vietnamese, Indonesian, Tagalog (Filipino).
use crateRewriteRuleChar;
/// Get Thai rule set.
///
/// Returns the complete phonetic normalization rules for Thai (ไทย):
/// - Brahmic-derived abugida
/// - No spaces between words
/// - 5 tones (partially marked)
/// - 44 consonants, vowels can appear before/after/above/below consonants
pub
/// Get Vietnamese rule set.
///
/// Returns the complete phonetic normalization rules for Vietnamese (Tiếng Việt):
/// - Latin script with extensive diacritics
/// - 6 tones marked with diacritics (stripped for phonetic matching)
/// - Special vowels: ă, â, ê, ô, ơ, ư
/// - Special consonant: đ (voiced alveolar)
/// - Digraphs: ch, gh, gi, kh, ng, ngh, nh, ph, qu, th, tr
pub
/// Get Indonesian rule set.
///
/// Returns the complete phonetic normalization rules for Indonesian (Bahasa Indonesia):
/// - Digraphs: ng→NG (velar nasal), ny→NY (palatal nasal), sy→SH
/// - C → CH (like English "ch", not "k")
/// - KH → KH (voiceless velar fricative, Arabic loans)
/// - V → F (typically pronounced as F in Indonesian)
/// - Nearly phonemic Latin orthography
pub
/// Tagalog phonetic rules.
///
/// Returns rules for normalizing Tagalog/Filipino text.
///
/// # Key Features
///
/// - **NG digraph**: ng→NG (velar nasal)
/// - **Spanish loanword adaptations**: ll→ly, ñ→ny, qu→k
/// - **Borrowed consonant normalization**: f→p, v→b, z→s
/// - **Simple vowel system**: a, e, i, o, u
pub