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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//! Per-language rule aggregators for Germanic languages.
//!
//! Covers: American English, British English, German, Dutch, Swedish,
//! Norwegian, Danish, Icelandic.
use crateRewriteRuleChar;
/// Combine American English rule sets into a single vector.
///
/// This includes:
/// - Base orthographic rules (spelling normalization)
/// - American dialect rules (yod-dropping, t-flapping)
/// - Homophone rules (words that sound alike)
/// - Text-speak rules (SMS/text abbreviations)
pub
/// Combine British English rule sets into a single vector.
///
/// This includes:
/// - Base orthographic rules (spelling normalization)
/// - British dialect rules (r-dropping, broad 'a' in BATH words)
/// - Homophone rules (words that sound alike)
/// - Text-speak rules (SMS/text abbreviations)
pub
/// Get Standard German rule set.
///
/// Returns the complete phonetic normalization rules for German (Hochdeutsch):
/// - Umlaut normalization (ä→ae, ö→oe, ü→ue)
/// - Eszett handling (ß→ss)
/// - CH variations (ich-Laut, ach-Laut)
/// - Final devoicing (b→p, d→t, g→k)
/// - W/V pronunciation
/// - SP/ST patterns
pub
/// Get Standard Dutch rule set.
///
/// Returns the complete phonetic normalization rules for Dutch (Nederlands):
/// - IJ digraph handling (ij→EI)
/// - G/CH guttural sounds (→X)
/// - OE→U, EU→OE, UI→OY vowel patterns
/// - W→V approximant
/// - SCH→sX (not sh like German)
/// - Final devoicing (b→p, d→t)
pub
/// Get Swedish rule set.
///
/// Returns the complete phonetic normalization rules for Swedish (Svenska):
/// - Three extra vowels: å→O, ä→AE, ö→OE
/// - SJ-sound: sj/skj/stj→SJ (unique Swedish voiceless fricative)
/// - TJ-sound: tj/kj→TJ (voiceless palatal fricative)
/// - Silent consonant clusters: dj/gj/hj/lj→J
/// - G/K before front vowels: g→J, k→TJ
/// - Standard consonant normalizations
pub
/// Get Norwegian rule set.
///
/// Returns the complete phonetic normalization rules for Norwegian (Norsk):
/// - Three extra vowels: æ→AE, ø→OE, å→O
/// - KJ-sound: kj→KJ (voiceless palatal fricative)
/// - SJ-sound: sj/skj→SJ
/// - Silent consonant clusters: hv→v, hj→J
/// - Velar nasal: ng→NG
/// - Standard consonant normalizations
///
/// Note: Covers both Bokmål and Nynorsk spelling variants.
pub
/// Get Danish rule set.
///
/// Returns the complete phonetic normalization rules for Danish (Dansk):
/// - Three extra vowels: æ→AE, ø→OE, å→O
/// - Old spelling: aa→O (historical spelling for å)
/// - SJ-sound: sj→SJ
/// - Silent consonant clusters: hv→v, hj→J
/// - Velar nasal: ng→NG
/// - Standard consonant normalizations
///
/// Note: Stød (glottal stop) is not represented in spelling and thus not handled.
pub
/// Get Icelandic rule set.
///
/// Returns the complete phonetic normalization rules for Icelandic (Íslenska):
/// - Archaic Norse orthography
/// - Unique letters: Þ/þ(th), Ð/ð(dh), Æ/æ(ai)
/// - Accented vowels indicate different sounds
/// - Consonant clusters: ll→tl, rl→rtl, hv→kv
pub