@shaxpir/duiduidui-models 1.17.1 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,6 +19,7 @@ const VALID_SYLLABLES = new Set([
|
|
|
19
19
|
// === Zero-initial (standalone vowel syllables) ===
|
|
20
20
|
'a', 'ai', 'an', 'ang', 'ao',
|
|
21
21
|
'e', 'ei', 'en', 'eng', 'er',
|
|
22
|
+
'ng', // 嗯 (nasal interjection, sometimes written ǹg or ńg)
|
|
22
23
|
'o', 'ou',
|
|
23
24
|
// === y- initial (represents i-/ü- standalone) ===
|
|
24
25
|
'ya', 'yao', 'yan', 'yang',
|
|
@@ -188,14 +189,15 @@ const UMLAUT_VARIANT_MAP = (() => {
|
|
|
188
189
|
return map;
|
|
189
190
|
})();
|
|
190
191
|
// Tone marks that might appear in pinyin (including v with combining tone marks)
|
|
191
|
-
const TONE_MARKS = /[
|
|
192
|
+
const TONE_MARKS = /[āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜńňǹ]|v[\u0301\u030C\u0300]?/g;
|
|
192
193
|
const TONE_MAP = {
|
|
193
194
|
'ā': 'a', 'á': 'a', 'ǎ': 'a', 'à': 'a',
|
|
194
195
|
'ē': 'e', 'é': 'e', 'ě': 'e', 'è': 'e',
|
|
195
196
|
'ī': 'i', 'í': 'i', 'ǐ': 'i', 'ì': 'i',
|
|
196
197
|
'ō': 'o', 'ó': 'o', 'ǒ': 'o', 'ò': 'o',
|
|
197
198
|
'ū': 'u', 'ú': 'u', 'ǔ': 'u', 'ù': 'u',
|
|
198
|
-
'ǖ': 'ü', 'ǘ': 'ü', 'ǚ': 'ü', 'ǜ': 'ü'
|
|
199
|
+
'ǖ': 'ü', 'ǘ': 'ü', 'ǚ': 'ü', 'ǜ': 'ü',
|
|
200
|
+
'ń': 'n', 'ň': 'n', 'ǹ': 'n'
|
|
199
201
|
};
|
|
200
202
|
// Maps toned vowels to base letters with ü→v (pipeline convention)
|
|
201
203
|
// Includes both lowercase and uppercase variants.
|