@kensio/pinyinjs 1.10.0 → 1.10.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.
- package/README.md +1 -1
- package/data/core.entries +48 -47
- package/data/core.freq +0 -0
- package/data/core.keys +1 -0
- package/data/full.counts +0 -0
- package/data/full.entries +72 -63
- package/data/full.freq +0 -0
- package/data/full.keys +9 -0
- package/data/manifest.json +16 -16
- package/data/script.map +5 -3
- package/data/standard.entries +49 -48
- package/data/standard.freq +0 -0
- package/data/standard.keys +1 -0
- package/dist/dictionary/character-defaults.d.ts +8 -0
- package/dist/dictionary/character-defaults.d.ts.map +1 -1
- package/dist/dictionary/character-defaults.js +20 -0
- package/dist/dictionary/character-defaults.js.map +1 -1
- package/dist/dictionary/merge-types.d.ts +6 -0
- package/dist/dictionary/merge-types.d.ts.map +1 -1
- package/dist/dictionary/merge-types.js.map +1 -1
- package/dist/dictionary/merge.d.ts.map +1 -1
- package/dist/dictionary/merge.js +13 -3
- package/dist/dictionary/merge.js.map +1 -1
- package/dist/dictionary/reference-readings.d.ts +21 -0
- package/dist/dictionary/reference-readings.d.ts.map +1 -0
- package/dist/dictionary/reference-readings.js +112 -0
- package/dist/dictionary/reference-readings.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Readings a standard reference dictionary gives that no source carries.
|
|
3
|
+
*
|
|
4
|
+
* Unihan, the phrase corpus and CC-CEDICT between them miss a tail of
|
|
5
|
+
* readings that print dictionaries list (a character's reading in one literary
|
|
6
|
+
* word, a surname, a place name, a dialect word). Where a source has the word
|
|
7
|
+
* and reads it from the character's everyday reading, the printed reading is
|
|
8
|
+
* the better evidence, and it replaces the corpus's.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* A character's readings a standard reference dictionary gives and the
|
|
12
|
+
* sources lack, as tone-marked pinyin.
|
|
13
|
+
*
|
|
14
|
+
* They follow every reading a source gives, so they never set a character's
|
|
15
|
+
* default and only ever stand as alternates. The three characters no source
|
|
16
|
+
* reads at all take the reading here as their only one. A 繁體 form is listed
|
|
17
|
+
* beside its 简体 one, since each has a Unihan entry of its own.
|
|
18
|
+
*
|
|
19
|
+
* Three dialect readings are left out, 不 `dǔn` in 不子, 泽 `duó` in 凌泽 (an
|
|
20
|
+
* icicle) and syllabic 姆 `m̄`. Each character has one reading otherwise, and a
|
|
21
|
+
* second would mark every free-standing 不, every 泽 in a given name and every
|
|
22
|
+
* 姆 in a transliterated one uncertain. 不子 carries its reading as a word.
|
|
23
|
+
*/
|
|
24
|
+
const CHARACTER_READINGS = new Map([
|
|
25
|
+
["咹", ["ǎn"]],
|
|
26
|
+
["㼎", ["báo"]],
|
|
27
|
+
["箄", ["bēi"]],
|
|
28
|
+
["屏", ["bīng"]], // 屏营
|
|
29
|
+
["礤", ["cā"]],
|
|
30
|
+
["倡", ["chāng"]], // 倡优
|
|
31
|
+
["樘", ["chēng"]],
|
|
32
|
+
["𡷫", ["chéng"]], // a surname
|
|
33
|
+
["郗", ["chī"]], // a surname
|
|
34
|
+
["佁", ["chì"]], // 佁儗
|
|
35
|
+
["玼", ["cī"]],
|
|
36
|
+
["粢", ["cī"]], // 粢饭
|
|
37
|
+
["酂", ["cuán"]], // a place name
|
|
38
|
+
["酇", ["cuán"]],
|
|
39
|
+
["嵅", ["dǎn", "dǎng"]], // place names in Guangxi
|
|
40
|
+
["碴", ["zhǎ"]], // 道碴
|
|
41
|
+
["嘚", ["dè"]], // 嘚瑟
|
|
42
|
+
["镫", ["dēng"]],
|
|
43
|
+
["鐙", ["dēng"]],
|
|
44
|
+
["澄", ["dēng"]],
|
|
45
|
+
["螲", ["dié"]], // 螲𬠅
|
|
46
|
+
["𭣧", ["dù"]],
|
|
47
|
+
["柂", ["duò"]],
|
|
48
|
+
["媠", ["duò"]],
|
|
49
|
+
["欸", ["ē", "é", "ě", "è"]],
|
|
50
|
+
["噁", ["è"]], // 二噁英
|
|
51
|
+
["胲", ["gǎi"]],
|
|
52
|
+
["𭥙", ["gǎng"]],
|
|
53
|
+
["岗", ["gàng"]], // 岗尖, 岗口儿甜
|
|
54
|
+
["崗", ["gàng"]],
|
|
55
|
+
["瘩", ["dā"]], // 疙疙瘩瘩, 疙里疙瘩
|
|
56
|
+
["𫵼", ["gēng"]],
|
|
57
|
+
["𣪘", ["guǐ"]],
|
|
58
|
+
["亢", ["háng"]], // the throat, in literary use
|
|
59
|
+
["猲", ["hè"]],
|
|
60
|
+
["愒", ["hè"]],
|
|
61
|
+
["沕", ["hū"]],
|
|
62
|
+
["鳠", ["huò"]],
|
|
63
|
+
["鱯", ["huò"]],
|
|
64
|
+
["雘", ["huò"]],
|
|
65
|
+
["筊", ["jiǎo"]],
|
|
66
|
+
["寁", ["jié"]],
|
|
67
|
+
["蹴", ["jiù"]],
|
|
68
|
+
["菹", ["jù"]],
|
|
69
|
+
["朘", ["juān"]],
|
|
70
|
+
["蠼", ["jué"]],
|
|
71
|
+
["焅", ["kào"]],
|
|
72
|
+
["㲉", ["kòu"]],
|
|
73
|
+
["磈", ["kuǐ"]],
|
|
74
|
+
["癞", ["là"]], // 癞痢
|
|
75
|
+
["癩", ["là"]],
|
|
76
|
+
["乐", ["lào"]], // 乐亭, a place name
|
|
77
|
+
["樂", ["lào"]],
|
|
78
|
+
["嘞", ["lē"]],
|
|
79
|
+
["𥉳", ["liū"]],
|
|
80
|
+
["蹓", ["liù"]],
|
|
81
|
+
["碌", ["lū"]], // 骨碌碌
|
|
82
|
+
["箵", ["xǐng"]],
|
|
83
|
+
]);
|
|
84
|
+
/**
|
|
85
|
+
* Words a standard reference dictionary reads, with the reading it gives, as
|
|
86
|
+
* the phrase corpus writes one. That is a syllable per character, tone-marked,
|
|
87
|
+
* and unmarked for 轻声. An 儿 read as 儿化 is `r5`, as CC-CEDICT writes it.
|
|
88
|
+
*
|
|
89
|
+
* Each either has no source at all or is read in the phrase corpus from its
|
|
90
|
+
* characters' everyday readings. 凌泽 is left out. It is a dialect word for an
|
|
91
|
+
* icicle, and as a word it would take every given name 凌泽 apart.
|
|
92
|
+
*/
|
|
93
|
+
const WORD_READINGS = new Map([
|
|
94
|
+
["粢饭", ["cī", "fàn"]],
|
|
95
|
+
["道碴", ["dào", "zhǎ"]],
|
|
96
|
+
["螲𬠅", ["dié", "dāng"]],
|
|
97
|
+
["不子", ["dǔn", "zi"]],
|
|
98
|
+
["岗尖", ["gàng", "jiān"]],
|
|
99
|
+
["岗口儿甜", ["gàng", "kǒu", "r5", "tián"]],
|
|
100
|
+
["疙疙瘩瘩", ["gē", "ge", "dā", "dā"]],
|
|
101
|
+
["疙里疙瘩", ["gē", "li", "gē", "dā"]],
|
|
102
|
+
["骨碌碌", ["gū", "lū", "lū"]],
|
|
103
|
+
["骨碌碌地", ["gū", "lū", "lū", "de"]],
|
|
104
|
+
]);
|
|
105
|
+
/**
|
|
106
|
+
* The readings the build adds to the sources.
|
|
107
|
+
*/
|
|
108
|
+
export const REFERENCE_READINGS = {
|
|
109
|
+
characters: CHARACTER_READINGS,
|
|
110
|
+
words: WORD_READINGS,
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=reference-readings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-readings.js","sourceRoot":"","sources":["../../src/dictionary/reference-readings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH;;;;;;;;;;;;;GAaG;AACH,MAAM,kBAAkB,GAA2C,IAAI,GAAG,CAAC;IACzE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACb,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IACd,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IACd,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK;IACtB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACb,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,C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,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kensio/pinyinjs",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "Chinese hanzi to pinyin conversion",
|
|
5
5
|
"repository": "https://github.com/KensioSoftware/pinyinjs",
|
|
6
6
|
"homepage": "https://pinyinjs.dev",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
70
70
|
"fta-cli": "^3.0.0",
|
|
71
71
|
"jiti": "^2.7.0",
|
|
72
|
-
"oxfmt": "^0.
|
|
72
|
+
"oxfmt": "^0.74.0",
|
|
73
73
|
"oxlint": "^1.77.0",
|
|
74
74
|
"oxlint-tsgolint": "^7.0.2001",
|
|
75
75
|
"semantic-release": "25.0.9",
|