@kensio/pinyinjs 1.8.0 → 1.8.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/dist/decode/gan-frames.d.ts +29 -0
- package/dist/decode/gan-frames.d.ts.map +1 -0
- package/dist/decode/gan-frames.js +120 -0
- package/dist/decode/gan-frames.js.map +1 -0
- package/dist/decode/gan-rule.d.ts +17 -0
- package/dist/decode/gan-rule.d.ts.map +1 -0
- package/dist/decode/gan-rule.js +41 -0
- package/dist/decode/gan-rule.js.map +1 -0
- package/dist/decode/huan-rule.d.ts +26 -0
- package/dist/decode/huan-rule.d.ts.map +1 -0
- package/dist/decode/huan-rule.js +81 -0
- package/dist/decode/huan-rule.js.map +1 -0
- package/dist/decode/reading-rules.d.ts +3 -0
- package/dist/decode/reading-rules.d.ts.map +1 -1
- package/dist/decode/reading-rules.js +9 -0
- package/dist/decode/reading-rules.js.map +1 -1
- package/dist/decode/reduplication-rule.d.ts +23 -0
- package/dist/decode/reduplication-rule.d.ts.map +1 -0
- package/dist/decode/reduplication-rule.js +157 -0
- package/dist/decode/reduplication-rule.js.map +1 -0
- package/dist/decode/script-words.d.ts +15 -0
- package/dist/decode/script-words.d.ts.map +1 -1
- package/dist/decode/script-words.js +30 -0
- package/dist/decode/script-words.js.map +1 -1
- package/dist/decode/script.d.ts.map +1 -1
- package/dist/decode/script.js +5 -2
- package/dist/decode/script.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a 干 means "to concern", which is `gān` and is written 干 in both
|
|
3
|
+
* scripts.
|
|
4
|
+
*
|
|
5
|
+
* 干 has three senses. `gàn` is to do (幹), `gān` is dry (乾), and `gān` is
|
|
6
|
+
* also to concern or to have to do with (干). The dictionary stores 干 as
|
|
7
|
+
* `gàn`, and the third sense lives almost entirely in a handful of set frames:
|
|
8
|
+
* 这不干你的事, 干你什么事, 与你无干 and 干卿底事.
|
|
9
|
+
*/
|
|
10
|
+
import type { Dictionary } from "../dictionary/dictionary.js";
|
|
11
|
+
import type { Syllable } from "../syllable/syllable.js";
|
|
12
|
+
/**
|
|
13
|
+
* The character. 简体 and 繁體 both write the "to concern" sense this way.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CONCERNING = "\u5E72";
|
|
16
|
+
/**
|
|
17
|
+
* Whether a syllable is `gān`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isGan(syllable: Syllable | undefined): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the 干 at a position means "to concern".
|
|
22
|
+
*
|
|
23
|
+
* Four frames, each matched as characters: 不干你的事, 干你什么事, 干卿何事
|
|
24
|
+
* and 与你无干. A 干 with a pronoun after it is not enough on its own, because
|
|
25
|
+
* 你干你的事 tells someone to get on with their own work and is `gàn`. 不 in
|
|
26
|
+
* front or a question after is what makes it the other sense.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isConcerningAt(dictionary: Dictionary, characters: readonly string[], at: number): boolean;
|
|
29
|
+
//# sourceMappingURL=gan-frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gan-frames.d.ts","sourceRoot":"","sources":["../../src/decode/gan-frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,UAAU,WAAM,CAAC;AAE9B;;GAEG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAI7D;AA0HD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,EAAE,EAAE,MAAM,GACT,OAAO,CAUT"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { toCharacters } from "../script/characters.js";
|
|
2
|
+
/**
|
|
3
|
+
* The character. 简体 and 繁體 both write the "to concern" sense this way.
|
|
4
|
+
*/
|
|
5
|
+
export const CONCERNING = "干";
|
|
6
|
+
/**
|
|
7
|
+
* Whether a syllable is `gān`.
|
|
8
|
+
*/
|
|
9
|
+
export function isGan(syllable) {
|
|
10
|
+
return (syllable?.initial === "g" && syllable.final === "an" && syllable.tone === 1);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The pronouns a 干 frame concerns, in both scripts.
|
|
14
|
+
*/
|
|
15
|
+
const PRONOUNS = new Set(["你", "我", "他", "她", "它", "您", "咱", "俺"]);
|
|
16
|
+
/**
|
|
17
|
+
* The plural suffix a pronoun can take, in both scripts.
|
|
18
|
+
*/
|
|
19
|
+
const PLURAL = new Set(["们", "們"]);
|
|
20
|
+
/**
|
|
21
|
+
* What 干 + pronoun asks about in 干你什么事 and 干你屁事.
|
|
22
|
+
*/
|
|
23
|
+
const WHAT = ["什么", "什麼", "啥", "屁", "鸟", "鳥"];
|
|
24
|
+
/**
|
|
25
|
+
* What 干卿 asks about, in 干卿何事 and 干卿底事.
|
|
26
|
+
*/
|
|
27
|
+
const WHICH = new Set(["何", "底", "甚"]);
|
|
28
|
+
/**
|
|
29
|
+
* The negation in front of 无干, in both scripts.
|
|
30
|
+
*/
|
|
31
|
+
const WITHOUT = new Set(["无", "無"]);
|
|
32
|
+
/**
|
|
33
|
+
* Where a pronoun starting at a position ends, or undefined where none starts
|
|
34
|
+
* there.
|
|
35
|
+
*/
|
|
36
|
+
function pronounEndingFrom(characters, at) {
|
|
37
|
+
if (!PRONOUNS.has(characters[at] ?? "")) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return PLURAL.has(characters[at + 1] ?? "") ? at + 2 : at + 1;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Whether the text from a position spells one of a list of words.
|
|
44
|
+
*/
|
|
45
|
+
function spellsAt(characters, at, word) {
|
|
46
|
+
return toCharacters(word).every((character, offset) => characters[at + offset] === character);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 不干你的事 and 不干我事: 不 in front, a pronoun after, then (的)事.
|
|
50
|
+
*/
|
|
51
|
+
function isNotConcerning(characters, at) {
|
|
52
|
+
if (characters[at - 1] !== "不") {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
let after = pronounEndingFrom(characters, at + 1);
|
|
56
|
+
if (after === undefined) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
if (characters[after] === "的") {
|
|
60
|
+
after++;
|
|
61
|
+
}
|
|
62
|
+
return characters[after] === "事";
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 干你什么事 and 干你屁事: a pronoun after, then what about it.
|
|
66
|
+
*
|
|
67
|
+
* The pronoun is what separates this from 你干什么事, which is the verb.
|
|
68
|
+
*/
|
|
69
|
+
function isAskingWhat(characters, at) {
|
|
70
|
+
const after = pronounEndingFrom(characters, at + 1);
|
|
71
|
+
if (after === undefined) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return WHAT.some((what) => spellsAt(characters, after, what) &&
|
|
75
|
+
characters[after + toCharacters(what).length] === "事");
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 干卿何事 and 干卿底事.
|
|
79
|
+
*/
|
|
80
|
+
function isAskingWhich(characters, at) {
|
|
81
|
+
return (characters[at + 1] === "卿" &&
|
|
82
|
+
WHICH.has(characters[at + 2] ?? "") &&
|
|
83
|
+
characters[at + 3] === "事");
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* 与你无干: 无 in front, and no tagged word of 干's own after.
|
|
87
|
+
*
|
|
88
|
+
* 毫无干劲, 无干扰 and 无干粮 hold 干劲, 干扰 and 干粮, and those carry their
|
|
89
|
+
* own readings.
|
|
90
|
+
*/
|
|
91
|
+
function isUnconcerned(dictionary, characters, at) {
|
|
92
|
+
if (!WITHOUT.has(characters[at - 1] ?? "")) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
for (let to = at + 2; to <= Math.min(characters.length, at + 4); to++) {
|
|
96
|
+
const word = characters.slice(at, to).join("");
|
|
97
|
+
if ((dictionary.lookup(word)?.partOfSpeech ?? "") !== "") {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Whether the 干 at a position means "to concern".
|
|
105
|
+
*
|
|
106
|
+
* Four frames, each matched as characters: 不干你的事, 干你什么事, 干卿何事
|
|
107
|
+
* and 与你无干. A 干 with a pronoun after it is not enough on its own, because
|
|
108
|
+
* 你干你的事 tells someone to get on with their own work and is `gàn`. 不 in
|
|
109
|
+
* front or a question after is what makes it the other sense.
|
|
110
|
+
*/
|
|
111
|
+
export function isConcerningAt(dictionary, characters, at) {
|
|
112
|
+
if (characters[at] !== CONCERNING) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
return (isNotConcerning(characters, at) ||
|
|
116
|
+
isAskingWhat(characters, at) ||
|
|
117
|
+
isAskingWhich(characters, at) ||
|
|
118
|
+
isUnconcerned(dictionary, characters, at));
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=gan-frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gan-frames.js","sourceRoot":"","sources":["../../src/decode/gan-frames.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC;AAE9B;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,QAA8B;IAClD,OAAO,CACL,QAAQ,EAAE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干 read `gān` where it means "to concern".
|
|
4
|
+
*
|
|
5
|
+
* The character is stored `gàn` with `gān` as an alternate, so 这不干你的事
|
|
6
|
+
* came out `Zhè bú gàn nǐ de shì`. 无干 and 干卿底事 are keys in the full
|
|
7
|
+
* tier and read `gān` through the word. The standard tier holds neither, and
|
|
8
|
+
* no tier holds 干卿何事. The full tier holds 不干 as `bù gàn`, which is right
|
|
9
|
+
* for 我不干了, and an edge reading `gàn` across a frame is taken off the
|
|
10
|
+
* lattice with the rest. See {@link isConcerningAt} for the frames.
|
|
11
|
+
*
|
|
12
|
+
* Over 88,866 lines of Tatoeba and zh.wikipedia and both CPP splits, the
|
|
13
|
+
* frames match twice, in 這不干你的事 and 不干我的事. Both move to `gān` in
|
|
14
|
+
* the standard and full tiers, and nothing else moves.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CONCERNING_GAN: EdgeRule;
|
|
17
|
+
//# sourceMappingURL=gan-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gan-rule.d.ts","sourceRoot":"","sources":["../../src/decode/gan-rule.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,QAAQ,EAAe,MAAM,YAAY,CAAC;AAErE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,QAqB5B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reading rule for 干 where it means "to concern".
|
|
3
|
+
*/
|
|
4
|
+
import { isConcerningAt, isGan } from "./gan-frames.js";
|
|
5
|
+
/**
|
|
6
|
+
* 干 read `gān` where it means "to concern".
|
|
7
|
+
*
|
|
8
|
+
* The character is stored `gàn` with `gān` as an alternate, so 这不干你的事
|
|
9
|
+
* came out `Zhè bú gàn nǐ de shì`. 无干 and 干卿底事 are keys in the full
|
|
10
|
+
* tier and read `gān` through the word. The standard tier holds neither, and
|
|
11
|
+
* no tier holds 干卿何事. The full tier holds 不干 as `bù gàn`, which is right
|
|
12
|
+
* for 我不干了, and an edge reading `gàn` across a frame is taken off the
|
|
13
|
+
* lattice with the rest. See {@link isConcerningAt} for the frames.
|
|
14
|
+
*
|
|
15
|
+
* Over 88,866 lines of Tatoeba and zh.wikipedia and both CPP splits, the
|
|
16
|
+
* frames match twice, in 這不干你的事 and 不干我的事. Both move to `gān` in
|
|
17
|
+
* the standard and full tiers, and nothing else moves.
|
|
18
|
+
*/
|
|
19
|
+
export const CONCERNING_GAN = {
|
|
20
|
+
name: "concerning-gan",
|
|
21
|
+
verdictFor: (context) => {
|
|
22
|
+
const { characters, dictionary, edge } = context;
|
|
23
|
+
if (edge.reading.length !== edge.to - edge.from) {
|
|
24
|
+
return "keep";
|
|
25
|
+
}
|
|
26
|
+
let verdict = "keep";
|
|
27
|
+
for (let at = edge.from; at < edge.to; at++) {
|
|
28
|
+
if (!isConcerningAt(dictionary, characters, at)) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (!isGan(edge.reading[at - edge.from])) {
|
|
32
|
+
return "forbid";
|
|
33
|
+
}
|
|
34
|
+
if (edge.to - edge.from === 1) {
|
|
35
|
+
verdict = "force";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return verdict;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=gan-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gan-rule.js","sourceRoot":"","sources":["../../src/decode/gan-rule.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGxD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAa;IACtC,IAAI,EAAE,gBAAgB;IACtB,UAAU,EAAE,CAAC,OAAoB,EAAE,EAAE;QACnC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QACjD,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAChD,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,IAAI,OAAO,GAAgB,MAAM,CAAC;QAClC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;YAC5C,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC;gBAChD,SAAS;YACX,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;gBACzC,OAAO,QAAQ,CAAC;YAClB,CAAC;YACD,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;gBAC9B,OAAO,GAAG,OAAO,CAAC;YACpB,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Syllable } from "../syllable/syllable.js";
|
|
2
|
+
import { type EdgeRule } from "./rules.js";
|
|
3
|
+
/**
|
|
4
|
+
* Whether a syllable is `huán`, the verbal reading of 还.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isHuan(syllable: Syllable | undefined): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* 还 read as `huán` where it gives back money, a book or an account.
|
|
9
|
+
*
|
|
10
|
+
* The character is stored `hái` with `huán` as an alternate, and the adverb is
|
|
11
|
+
* by far the commoner of the two. The verb mostly lives in words that carry
|
|
12
|
+
* their own reading (还给, 归还, 偿还, 还债). 还钱 is a word in the full tier
|
|
13
|
+
* only, since no frequency list counts it, so the standard tier read
|
|
14
|
+
* 我得去银行还钱 as `hái qián`. See {@link RETURNED} for the objects.
|
|
15
|
+
*
|
|
16
|
+
* An untagged pair ending in 还 is taken off the lattice where it reads the 还
|
|
17
|
+
* `hái`, for the reason {@link TEACHING_JIAO} gives. 倒还 is a key the full
|
|
18
|
+
* tier holds with no part of speech.
|
|
19
|
+
*
|
|
20
|
+
* Over 88,866 lines of Tatoeba and zh.wikipedia and both CPP splits, this
|
|
21
|
+
* moves 5 decodes in the standard tier and all 5 are corrections (還錢 three
|
|
22
|
+
* times, 还钱 and 還書). Each now reads what the full tier reads through the
|
|
23
|
+
* word. Nothing moves in the full tier.
|
|
24
|
+
*/
|
|
25
|
+
export declare const RETURNING_HUAN: EdgeRule;
|
|
26
|
+
//# sourceMappingURL=huan-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huan-rule.d.ts","sourceRoot":"","sources":["../../src/decode/huan-rule.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAI9D;AAoCD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,EAAE,QAiB5B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a 还 is giving something back or is the adverb.
|
|
3
|
+
*
|
|
4
|
+
* The adverb `hái` comes in front of a verb or an adjective. The verb `huán`
|
|
5
|
+
* takes an object, and what is given back is most often money, a book or a
|
|
6
|
+
* debt.
|
|
7
|
+
*/
|
|
8
|
+
import { toCharacters } from "../script/characters.js";
|
|
9
|
+
import { tagOf, wordsStartingAt, } from "./rules.js";
|
|
10
|
+
/**
|
|
11
|
+
* Whether a syllable is `huán`, the verbal reading of 还.
|
|
12
|
+
*/
|
|
13
|
+
export function isHuan(syllable) {
|
|
14
|
+
return (syllable?.initial === "h" && syllable.final === "uan" && syllable.tone === 2);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The character in both scripts.
|
|
18
|
+
*/
|
|
19
|
+
const RETURNING = new Set(["还", "還"]);
|
|
20
|
+
/**
|
|
21
|
+
* What a 还 gives back, in both scripts.
|
|
22
|
+
*
|
|
23
|
+
* Money, a book and an account. The full tier holds 还钱, 还书 and 还账 as
|
|
24
|
+
* words, all three `huán`, and the standard tier holds none of them. 还债 and
|
|
25
|
+
* 还款 are in both tiers and need nothing here.
|
|
26
|
+
*
|
|
27
|
+
* Written out because the tags will not do it. jieba tags 有点, 客气, 问 and
|
|
28
|
+
* 头 `n`, and 还有点, 还客气, 还问 and 还头一回 are all the adverb. Over 88,866
|
|
29
|
+
* lines of Tatoeba and zh.wikipedia, the standard tier decodes 39 standalone
|
|
30
|
+
* 还 in front of a word with a noun tag, and 30 of them are the adverb.
|
|
31
|
+
*/
|
|
32
|
+
const RETURNED = new Set(["钱", "錢", "书", "書", "账", "賬", "帳"]);
|
|
33
|
+
/**
|
|
34
|
+
* Whether the 还 at a position has something given back after it.
|
|
35
|
+
*
|
|
36
|
+
* The object has to stand clear of a tagged word of its own. 他还书法很好 has
|
|
37
|
+
* 书法 after the 还, and that 还 is the adverb.
|
|
38
|
+
*/
|
|
39
|
+
function isReturningAt(context, at) {
|
|
40
|
+
if (!RETURNED.has(context.characters[at + 1] ?? "")) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return !wordsStartingAt(context, at + 1).some((word) => toCharacters(word).length > 1 && tagOf(context, word) !== "");
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 还 read as `huán` where it gives back money, a book or an account.
|
|
47
|
+
*
|
|
48
|
+
* The character is stored `hái` with `huán` as an alternate, and the adverb is
|
|
49
|
+
* by far the commoner of the two. The verb mostly lives in words that carry
|
|
50
|
+
* their own reading (还给, 归还, 偿还, 还债). 还钱 is a word in the full tier
|
|
51
|
+
* only, since no frequency list counts it, so the standard tier read
|
|
52
|
+
* 我得去银行还钱 as `hái qián`. See {@link RETURNED} for the objects.
|
|
53
|
+
*
|
|
54
|
+
* An untagged pair ending in 还 is taken off the lattice where it reads the 还
|
|
55
|
+
* `hái`, for the reason {@link TEACHING_JIAO} gives. 倒还 is a key the full
|
|
56
|
+
* tier holds with no part of speech.
|
|
57
|
+
*
|
|
58
|
+
* Over 88,866 lines of Tatoeba and zh.wikipedia and both CPP splits, this
|
|
59
|
+
* moves 5 decodes in the standard tier and all 5 are corrections (還錢 three
|
|
60
|
+
* times, 还钱 and 還書). Each now reads what the full tier reads through the
|
|
61
|
+
* word. Nothing moves in the full tier.
|
|
62
|
+
*/
|
|
63
|
+
export const RETURNING_HUAN = {
|
|
64
|
+
name: "returning-huan",
|
|
65
|
+
verdictFor: (context) => {
|
|
66
|
+
const { edge } = context;
|
|
67
|
+
if (RETURNING.has(edge.text)) {
|
|
68
|
+
return isHuan(edge.reading[0]) && isReturningAt(context, edge.from)
|
|
69
|
+
? "force"
|
|
70
|
+
: "keep";
|
|
71
|
+
}
|
|
72
|
+
return edge.partOfSpeech === "" &&
|
|
73
|
+
RETURNING.has(toCharacters(edge.text).at(-1) ?? "") &&
|
|
74
|
+
edge.reading.length === edge.to - edge.from &&
|
|
75
|
+
!isHuan(edge.reading.at(-1)) &&
|
|
76
|
+
isReturningAt(context, edge.to - 1)
|
|
77
|
+
? "forbid"
|
|
78
|
+
: "keep";
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=huan-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huan-rule.js","sourceRoot":"","sources":["../../src/decode/huan-rule.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAGL,KAAK,EACL,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,M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Aa,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC;gBACjE,CAAC,CAAC,OAAO;gBACT,CAAC,CAAC,MAAM,CAAC;QACb,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,KAAK,EAAE;YAC7B,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACnD,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI;YAC3C,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5B,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YACnC,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,MAAM,CAAC;IACb,CAAC;CACF,CAAC"}
|
|
@@ -3,6 +3,9 @@ export { TAXI_DI } from "./taxi-rule.js";
|
|
|
3
3
|
export { EXPERIENTIAL_GUO } from "./guo-rule.js";
|
|
4
4
|
export { TEACHING_JIAO } from "./jiao-rule.js";
|
|
5
5
|
export { SEPARATED_COMPOUND } from "./split-rule.js";
|
|
6
|
+
export { RETURNING_HUAN } from "./huan-rule.js";
|
|
7
|
+
export { CONCERNING_GAN } from "./gan-rule.js";
|
|
8
|
+
export { REDUPLICATED_VERB } from "./reduplication-rule.js";
|
|
6
9
|
import { type EdgeRule } from "./rules.js";
|
|
7
10
|
/**
|
|
8
11
|
* 儿 does not stand on its own where the dictionary attests the 儿化.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reading-rules.d.ts","sourceRoot":"","sources":["../../src/decode/reading-rules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reading-rules.d.ts","sourceRoot":"","sources":["../../src/decode/reading-rules.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,EAAE,QAY5B,CAAC;AAsCF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,eAAe,EAAE,QAuB7B,CAAC;AAIF,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,QAAQ,EAe5C,CAAC"}
|
|
@@ -4,11 +4,17 @@ import { TAXI_DI } from "./taxi-rule.js";
|
|
|
4
4
|
import { EXPERIENTIAL_GUO } from "./guo-rule.js";
|
|
5
5
|
import { TEACHING_JIAO } from "./jiao-rule.js";
|
|
6
6
|
import { SEPARATED_COMPOUND } from "./split-rule.js";
|
|
7
|
+
import { RETURNING_HUAN } from "./huan-rule.js";
|
|
8
|
+
import { CONCERNING_GAN } from "./gan-rule.js";
|
|
9
|
+
import { REDUPLICATED_VERB } from "./reduplication-rule.js";
|
|
7
10
|
export { MODAL_DE, PARTICLE_DE, POTENTIAL_DE } from "./de-rule.js";
|
|
8
11
|
export { TAXI_DI } from "./taxi-rule.js";
|
|
9
12
|
export { EXPERIENTIAL_GUO } from "./guo-rule.js";
|
|
10
13
|
export { TEACHING_JIAO } from "./jiao-rule.js";
|
|
11
14
|
export { SEPARATED_COMPOUND } from "./split-rule.js";
|
|
15
|
+
export { RETURNING_HUAN } from "./huan-rule.js";
|
|
16
|
+
export { CONCERNING_GAN } from "./gan-rule.js";
|
|
17
|
+
export { REDUPLICATED_VERB } from "./reduplication-rule.js";
|
|
12
18
|
import { toCharacters } from "../script/characters.js";
|
|
13
19
|
import { tagOf, wordEndingAt, } from "./rules.js";
|
|
14
20
|
/**
|
|
@@ -144,5 +150,8 @@ export const READING_RULES = [
|
|
|
144
150
|
PLAYING_TAN,
|
|
145
151
|
EXPERIENTIAL_GUO,
|
|
146
152
|
SEPARATED_COMPOUND,
|
|
153
|
+
REDUPLICATED_VERB,
|
|
154
|
+
RETURNING_HUAN,
|
|
155
|
+
CONCERNING_GAN,
|
|
147
156
|
];
|
|
148
157
|
//# sourceMappingURL=reading-rules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reading-rules.js","sourceRoot":"","sources":["../../src/decode/reading-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"reading-rules.js","sourceRoot":"","sources":["../../src/decode/reading-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAA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|
3
|
+
* A verb said twice around 了 or 一 takes its verbal reading on both halves.
|
|
4
|
+
*
|
|
5
|
+
* 数 is stored `shù`, the noun, with `shǔ` as an alternate. 数数 is a word and
|
|
6
|
+
* reads `shǔshù`. Put 了 between the halves and the word is gone, so 他数了数
|
|
7
|
+
* 桌上的数字 came out `shù le shù`. The full tier holds 数一数 as a word and
|
|
8
|
+
* the standard tier does not, so 数一数 went the same way there.
|
|
9
|
+
*
|
|
10
|
+
* The same shape split other verbs down the middle. 弹了弹 read `tán le dàn`,
|
|
11
|
+
* because the 弹 rule saw the 了 after the first half and nothing after the
|
|
12
|
+
* second. 教了教 read `jiāo le jiào` for the same reason. See
|
|
13
|
+
* {@link VERBAL_READINGS} for the characters and {@link reduplicatedAt} for
|
|
14
|
+
* the shapes turned away.
|
|
15
|
+
*
|
|
16
|
+
* Over 88,866 lines of Tatoeba and zh.wikipedia, A了A and A一A appear 107
|
|
17
|
+
* times with an AA key behind them, across 43 shapes led by 想一想, 看了看 and
|
|
18
|
+
* 看一看. None of them is one of these characters, and every one already read
|
|
19
|
+
* both halves alike. Across those lines and both CPP splits, the rule moves no
|
|
20
|
+
* decode in either tier.
|
|
21
|
+
*/
|
|
22
|
+
export declare const REDUPLICATED_VERB: EdgeRule;
|
|
23
|
+
//# sourceMappingURL=reduplication-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduplication-rule.d.ts","sourceRoot":"","sources":["../../src/decode/reduplication-rule.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,QAAQ,EAId,MAAM,YAAY,CAAC;AAqIpB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAc/B,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a verb is read when it is said twice with 了 or 一 between.
|
|
3
|
+
*
|
|
4
|
+
* 数了数 and 数一数 are one verb said twice. Each half is a character of its
|
|
5
|
+
* own to the lattice, and each falls back on the character's default.
|
|
6
|
+
*/
|
|
7
|
+
import { isSameSyllable } from "../dictionary/entry.js";
|
|
8
|
+
import { QUANTITY_CHARACTERS } from "../numerals/characters.js";
|
|
9
|
+
import { toCharacters } from "../script/characters.js";
|
|
10
|
+
import { readSyllable } from "../syllable/syllable.js";
|
|
11
|
+
import { tagOf, wordsEndingAt, wordsStartingAt, } from "./rules.js";
|
|
12
|
+
/**
|
|
13
|
+
* What can stand between the halves of a reduplicated verb.
|
|
14
|
+
*
|
|
15
|
+
* 看了看 is the completed form and 看一看 the tentative one. Both are verbal
|
|
16
|
+
* shapes. A noun or a 量词 repeats with 一 as well (一天一天, 一种一种), and
|
|
17
|
+
* {@link reduplicatedAt} turns that shape away by the numeral in front.
|
|
18
|
+
*/
|
|
19
|
+
const INFIX = new Set(["了", "一"]);
|
|
20
|
+
/**
|
|
21
|
+
* The polyphones whose verbal reading is not their default.
|
|
22
|
+
*
|
|
23
|
+
* The default is the reading a character takes in most text. For these that
|
|
24
|
+
* reading is a noun (数 `shù`, 种 `zhǒng`), an adjective (凉 `liáng`) or the
|
|
25
|
+
* reading their compounds take (教 `jiào`, 弹 `dàn`, 削 `xuē`). A
|
|
26
|
+
* reduplicated character is a verb, and the verbal reading is the one it
|
|
27
|
+
* wants.
|
|
28
|
+
*
|
|
29
|
+
* 卷 is in for its tail. Its default is already `juǎn`, and 卷一卷 read the
|
|
30
|
+
* second half `juàn` off 一卷, a word the dictionary tags `m`.
|
|
31
|
+
*
|
|
32
|
+
* Written out by hand because the dictionary has no tag per reading. The
|
|
33
|
+
* nearest thing it holds is the reduplicated word itself, and that is the
|
|
34
|
+
* wrong evidence. Of the 19 AA keys in the standard tier whose first syllable
|
|
35
|
+
* differs from the character's default, 数数 (in both scripts) is the only
|
|
36
|
+
* verb said twice. The rest are literary reduplicatives (查查 `zhāzhā`, 拜拜 `báibái`, 累累
|
|
37
|
+
* `léiléi`), and reading 查一查 off 查查 would turn a correct `chá` into `zhā`.
|
|
38
|
+
*/
|
|
39
|
+
const VERBAL_READINGS = new Map([
|
|
40
|
+
["数", "shǔ"],
|
|
41
|
+
["數", "shǔ"],
|
|
42
|
+
["凉", "liàng"],
|
|
43
|
+
["涼", "liàng"],
|
|
44
|
+
["种", "zhòng"],
|
|
45
|
+
["種", "zhòng"],
|
|
46
|
+
["教", "jiāo"],
|
|
47
|
+
["弹", "tán"],
|
|
48
|
+
["彈", "tán"],
|
|
49
|
+
["卷", "juǎn"],
|
|
50
|
+
["削", "xiāo"],
|
|
51
|
+
].map(([character, text]) => {
|
|
52
|
+
const syllable = readSyllable(text);
|
|
53
|
+
/* c8 ignore next 3 -- every reading above is a syllable */
|
|
54
|
+
if (syllable === undefined) {
|
|
55
|
+
throw new Error(`${text} is not a syllable`);
|
|
56
|
+
}
|
|
57
|
+
return [character, syllable];
|
|
58
|
+
}));
|
|
59
|
+
/**
|
|
60
|
+
* Whether a tagged word of more than one character starts or ends at a
|
|
61
|
+
* position.
|
|
62
|
+
*/
|
|
63
|
+
function isInTaggedWord(words, context) {
|
|
64
|
+
return words.some((word) => toCharacters(word).length > 1 && tagOf(context, word) !== "");
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Where the reduplication covering a position starts, or undefined.
|
|
68
|
+
*
|
|
69
|
+
* The position is either half. Three things turn the shape away. A numeral in
|
|
70
|
+
* front makes it a count said twice (一种一种, 一卷一卷). A tagged word ending
|
|
71
|
+
* at the first half claims that half (多数一数 holds 多数). A tagged word
|
|
72
|
+
* starting at the second half claims that one, and that is how 数了数字 keeps
|
|
73
|
+
* 数字 `shùzì`.
|
|
74
|
+
*/
|
|
75
|
+
function reduplicatedAt(context, at) {
|
|
76
|
+
const { characters } = context;
|
|
77
|
+
const character = characters[at] ?? "";
|
|
78
|
+
let head;
|
|
79
|
+
if (INFIX.has(characters[at + 1] ?? "") && characters[at + 2] === character) {
|
|
80
|
+
head = at;
|
|
81
|
+
}
|
|
82
|
+
else if (INFIX.has(characters[at - 1] ?? "") &&
|
|
83
|
+
characters[at - 2] === character) {
|
|
84
|
+
head = at - 2;
|
|
85
|
+
}
|
|
86
|
+
if (head === undefined ||
|
|
87
|
+
QUANTITY_CHARACTERS.has(characters[head - 1] ?? "") ||
|
|
88
|
+
isInTaggedWord(wordsEndingAt(context, head + 1), context) ||
|
|
89
|
+
isInTaggedWord(wordsStartingAt(context, head + 2), context)) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
return head;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The syllable a reduplication gives the character at a position, or
|
|
96
|
+
* undefined where it gives none.
|
|
97
|
+
*/
|
|
98
|
+
function verbalSyllableAt(context, at) {
|
|
99
|
+
const verbal = VERBAL_READINGS.get(context.characters[at] ?? "");
|
|
100
|
+
if (verbal === undefined) {
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
return reduplicatedAt(context, at) === undefined ? undefined : verbal;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Whether an edge longer than one character reads either half another way.
|
|
107
|
+
*
|
|
108
|
+
* 一卷 reaches into the second half of 卷一卷, and the decode read it
|
|
109
|
+
* `juǎn yíjuàn` through that word. The full tier's 数一数 is `shǔ yī shù`, and
|
|
110
|
+
* that reading of the second half goes too. The rule reads it `shǔ yì shǔ`.
|
|
111
|
+
*/
|
|
112
|
+
function readsAgainst(context) {
|
|
113
|
+
const { edge } = context;
|
|
114
|
+
if (edge.reading.length !== edge.to - edge.from) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
return edge.reading.some((syllable, offset) => {
|
|
118
|
+
const said = verbalSyllableAt(context, edge.from + offset);
|
|
119
|
+
return said !== undefined && !isSameSyllable(syllable, said);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* A verb said twice around 了 or 一 takes its verbal reading on both halves.
|
|
124
|
+
*
|
|
125
|
+
* 数 is stored `shù`, the noun, with `shǔ` as an alternate. 数数 is a word and
|
|
126
|
+
* reads `shǔshù`. Put 了 between the halves and the word is gone, so 他数了数
|
|
127
|
+
* 桌上的数字 came out `shù le shù`. The full tier holds 数一数 as a word and
|
|
128
|
+
* the standard tier does not, so 数一数 went the same way there.
|
|
129
|
+
*
|
|
130
|
+
* The same shape split other verbs down the middle. 弹了弹 read `tán le dàn`,
|
|
131
|
+
* because the 弹 rule saw the 了 after the first half and nothing after the
|
|
132
|
+
* second. 教了教 read `jiāo le jiào` for the same reason. See
|
|
133
|
+
* {@link VERBAL_READINGS} for the characters and {@link reduplicatedAt} for
|
|
134
|
+
* the shapes turned away.
|
|
135
|
+
*
|
|
136
|
+
* Over 88,866 lines of Tatoeba and zh.wikipedia, A了A and A一A appear 107
|
|
137
|
+
* times with an AA key behind them, across 43 shapes led by 想一想, 看了看 and
|
|
138
|
+
* 看一看. None of them is one of these characters, and every one already read
|
|
139
|
+
* both halves alike. Across those lines and both CPP splits, the rule moves no
|
|
140
|
+
* decode in either tier.
|
|
141
|
+
*/
|
|
142
|
+
export const REDUPLICATED_VERB = {
|
|
143
|
+
name: "reduplicated-verb",
|
|
144
|
+
verdictFor: (context) => {
|
|
145
|
+
const { edge } = context;
|
|
146
|
+
if (edge.to - edge.from !== 1) {
|
|
147
|
+
return readsAgainst(context) ? "forbid" : "keep";
|
|
148
|
+
}
|
|
149
|
+
const said = verbalSyllableAt(context, edge.from);
|
|
150
|
+
const here = edge.reading[0];
|
|
151
|
+
if (said === undefined || here === undefined) {
|
|
152
|
+
return "keep";
|
|
153
|
+
}
|
|
154
|
+
return isSameSyllable(here, said) ? "force" : "keep";
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=reduplication-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduplication-rule.js","sourceRoot":"","sources":["../../src/decode/reduplication-rule.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EA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C,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7C,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IACvD,CAAC;CACF,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* can show where the conversion was guessing.
|
|
7
7
|
*/
|
|
8
8
|
import type { ScriptChoice, ScriptEvidence, ScriptTarget } from "./script-types.js";
|
|
9
|
+
import type { Dictionary } from "../dictionary/dictionary.js";
|
|
9
10
|
import { type CharacterConversion } from "../script/conversion.js";
|
|
10
11
|
import { type Region } from "../script/glyphs.js";
|
|
11
12
|
import type { Script } from "../script/script.js";
|
|
@@ -21,6 +22,20 @@ export declare function targetOf(target: ScriptTarget): {
|
|
|
21
22
|
* Convert one word, preferring what a source wrote to what its characters imply.
|
|
22
23
|
*/
|
|
23
24
|
export declare function convertWord(table: ReadonlyMap<string, CharacterConversion>, words: ReadonlyMap<string, string>, word: string, reading: readonly Syllable[]): readonly ScriptChoice[];
|
|
25
|
+
/**
|
|
26
|
+
* Keep 干 where it means "to concern".
|
|
27
|
+
*
|
|
28
|
+
* 干 read `gān` is 乾 when it means dry (干燥, 干货) and stays 干 when it means
|
|
29
|
+
* to concern (干扰, 相干), and the syllable cannot tell the two apart. A word
|
|
30
|
+
* settles most of them. A 干 standing alone at `gān` fell back on 乾, which
|
|
31
|
+
* wrote 与你无干 as 與你無乾 and 干卿底事 as 乾卿底事. The frames that read
|
|
32
|
+
* it `gān` in the first place are the ones that decide it here. See
|
|
33
|
+
* {@link isConcerningAt}.
|
|
34
|
+
*
|
|
35
|
+
* `from` is where the word starts in `characters`, which are the whole run's,
|
|
36
|
+
* since the frames reach past the word.
|
|
37
|
+
*/
|
|
38
|
+
export declare function keepConcerning(choices: readonly ScriptChoice[], dictionary: Dictionary, characters: readonly string[], from: number, reading: readonly Syllable[]): readonly ScriptChoice[];
|
|
24
39
|
/**
|
|
25
40
|
* Rank what settled a character, strongest evidence first.
|
|
26
41
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-words.d.ts","sourceRoot":"","sources":["../../src/decode/script-words.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"script-words.d.ts","sourceRoot":"","sources":["../../src/decode/script-words.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAQA;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAC/C,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,QAAQ,EAAE,GAC3B,SAAS,YAAY,EAAE,CAuCzB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,QAAQ,EAAE,GAC3B,SAAS,YAAY,EAAE,CAmBzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,OAAO,EACpB,QAAQ,EAAE,OAAO,GAChB,cAAc,CAQhB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { toCharacters } from "../script/characters.js";
|
|
2
2
|
import { conversionKey, convertCharacter, formsOf, } from "../script/conversion.js";
|
|
3
3
|
import { DEFAULT_REGION } from "../script/glyphs.js";
|
|
4
|
+
import { CONCERNING, isConcerningAt, isGan } from "./gan-frames.js";
|
|
4
5
|
/**
|
|
5
6
|
* The script and region a target names.
|
|
6
7
|
*/
|
|
@@ -49,6 +50,35 @@ export function convertWord(table, words, word, reading) {
|
|
|
49
50
|
};
|
|
50
51
|
});
|
|
51
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Keep 干 where it means "to concern".
|
|
55
|
+
*
|
|
56
|
+
* 干 read `gān` is 乾 when it means dry (干燥, 干货) and stays 干 when it means
|
|
57
|
+
* to concern (干扰, 相干), and the syllable cannot tell the two apart. A word
|
|
58
|
+
* settles most of them. A 干 standing alone at `gān` fell back on 乾, which
|
|
59
|
+
* wrote 与你无干 as 與你無乾 and 干卿底事 as 乾卿底事. The frames that read
|
|
60
|
+
* it `gān` in the first place are the ones that decide it here. See
|
|
61
|
+
* {@link isConcerningAt}.
|
|
62
|
+
*
|
|
63
|
+
* `from` is where the word starts in `characters`, which are the whole run's,
|
|
64
|
+
* since the frames reach past the word.
|
|
65
|
+
*/
|
|
66
|
+
export function keepConcerning(choices, dictionary, characters, from, reading) {
|
|
67
|
+
if (reading.length !== choices.length) {
|
|
68
|
+
return choices;
|
|
69
|
+
}
|
|
70
|
+
return choices.map((choice, at) => choice.from === CONCERNING &&
|
|
71
|
+
choice.to !== CONCERNING &&
|
|
72
|
+
isGan(reading[at]) &&
|
|
73
|
+
isConcerningAt(dictionary, characters, from + at)
|
|
74
|
+
? {
|
|
75
|
+
from: choice.from,
|
|
76
|
+
to: CONCERNING,
|
|
77
|
+
evidence: "reading",
|
|
78
|
+
alternatives: [choice.to, ...choice.alternatives].filter((form) => form !== CONCERNING),
|
|
79
|
+
}
|
|
80
|
+
: choice);
|
|
81
|
+
}
|
|
52
82
|
/**
|
|
53
83
|
* Rank what settled a character, strongest evidence first.
|
|
54
84
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-words.js","sourceRoot":"","sources":["../../src/decode/script-words.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"script-words.js","sourceRoot":"","sources":["../../src/decode/script-words.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAEL,aAAa,EACb,gBAAgB,EAChB,OAAO,GACR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAC;AAGlE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEpE;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAoB;IAI3C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACpD,CAAC;IACD,OAAO;QACL,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;KACxD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,U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IACD,OAAO,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../src/decode/script.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAS5D,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,mBAAmB,CAAC;AAC3B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,aAAkB,GAC1B,gBAAgB,
|
|
1
|
+
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../src/decode/script.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAS5D,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,mBAAmB,CAAC;AAC3B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,aAAkB,GAC1B,gBAAgB,CAmDlB;AAeD;;GAEG;AACH,wBAAgB,QAAQ,CACtB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,aAAkB,GAC1B,MAAM,CAER;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE/D"}
|
package/dist/decode/script.js
CHANGED
|
@@ -5,7 +5,7 @@ import { decodeRun } from "./decode.js";
|
|
|
5
5
|
import { READING_RULES } from "./reading-rules.js";
|
|
6
6
|
import { splitRuns } from "./runs.js";
|
|
7
7
|
import { applyRegion } from "./script-region.js";
|
|
8
|
-
import { convertWord, targetOf } from "./script-words.js";
|
|
8
|
+
import { convertWord, keepConcerning, targetOf } from "./script-words.js";
|
|
9
9
|
export { SCRIPT_EVIDENCE, SCRIPT_TARGETS, } from "./script-types.js";
|
|
10
10
|
/**
|
|
11
11
|
* Convert a text between the scripts, reporting what it was unsure about.
|
|
@@ -43,6 +43,8 @@ export function toScriptPieces(dictionary, tables, text, options = {}) {
|
|
|
43
43
|
converted += run.text;
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
+
const characters = toCharacters(run.text);
|
|
47
|
+
let from = 0;
|
|
46
48
|
// 繁體 glyph variants are folded to the canonical form first, so that a
|
|
47
49
|
// Hong Kong input converts the same as its Taiwan spelling would.
|
|
48
50
|
for (const word of decodeRun(dictionary, run.text, READING_RULES)) {
|
|
@@ -50,9 +52,10 @@ export function toScriptPieces(dictionary, tables, text, options = {}) {
|
|
|
50
52
|
const isAligned = word.reading.length === toCharacters(canonical).length;
|
|
51
53
|
const chosen = applyRegion(isSameScript
|
|
52
54
|
? keepWord(canonical)
|
|
53
|
-
: convertWord(table, words, canonical, word.reading), word.reading, region, isAligned);
|
|
55
|
+
: keepConcerning(convertWord(table, words, canonical, word.reading), dictionary, characters, from, word.reading), word.reading, region, isAligned);
|
|
54
56
|
choices.push(...chosen);
|
|
55
57
|
converted += chosen.map((choice) => choice.to).join("");
|
|
58
|
+
from += toCharacters(word.text).length;
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
return { text: converted, choices };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script.js","sourceRoot":"","sources":["../../src/decode/script.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"script.js","sourceRoot":"","sources":["../../src/decode/script.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAO1E,OAAO,EACL,eAAe,EAKf,cAAc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AU,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;AAChE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAoB;IACpD,OAAO,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC;AACvC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export type { ReadingProjection, ReadingUnit } from "./decode/locking.js";
|
|
|
51
51
|
export { applyEdgeRules, tagOf, wordEndingAt, wordStartingAt, } from "./decode/rules.js";
|
|
52
52
|
export type { EdgeContext, EdgeRule, EdgeVerdict } from "./decode/rules.js";
|
|
53
53
|
export type { PositionalReading, ReadingHint, ReadingHints, WordReading, } from "./decode/hints.js";
|
|
54
|
-
export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, COUNTED_MEASURE, EXPERIENTIAL_GUO, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, SEPARATED_COMPOUND, TAXI_DI, TEACHING_JIAO, } from "./decode/reading-rules.js";
|
|
54
|
+
export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, CONCERNING_GAN, COUNTED_MEASURE, EXPERIENTIAL_GUO, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, REDUPLICATED_VERB, RETURNING_HUAN, SEPARATED_COMPOUND, TAXI_DI, TEACHING_JIAO, } from "./decode/reading-rules.js";
|
|
55
55
|
export { readingCost, shortestPath, spacingCost } from "./decode/viterbi.js";
|
|
56
56
|
export type { CostOf } from "./decode/viterbi.js";
|
|
57
57
|
export type { DecodedWord, ScoredWord, WordSeparator } from "./decode/word.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,o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EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC/E,YAAY,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export { buildScriptTables } from "./dictionary/script-tables.js";
|
|
|
31
31
|
export { allEdges, buildLattice, cutPoints, READING_CHARGE, } from "./decode/lattice.js";
|
|
32
32
|
export { isSettled, projectReadings, settledUnits, unitsOf, } from "./decode/locking.js";
|
|
33
33
|
export { applyEdgeRules, tagOf, wordEndingAt, wordStartingAt, } from "./decode/rules.js";
|
|
34
|
-
export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, COUNTED_MEASURE, EXPERIENTIAL_GUO, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, SEPARATED_COMPOUND, TAXI_DI, TEACHING_JIAO, } from "./decode/reading-rules.js";
|
|
34
|
+
export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, CONCERNING_GAN, COUNTED_MEASURE, EXPERIENTIAL_GUO, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, REDUPLICATED_VERB, RETURNING_HUAN, SEPARATED_COMPOUND, TAXI_DI, TEACHING_JIAO, } from "./decode/reading-rules.js";
|
|
35
35
|
export { readingCost, shortestPath, spacingCost } from "./decode/viterbi.js";
|
|
36
36
|
export { cardinalHanzi, LARGEST_CARDINAL } from "./numerals/cardinal.js";
|
|
37
37
|
export { DIGIT_CHARACTERS, numeralSyllable, QUANTITY_CHARACTERS, UNIT_VALUES, yaoSyllable, } from "./numerals/characters.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAGlC,OAAO,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Ac,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EACL,UAAU,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kensio/pinyinjs",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.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.70.0",
|
|
73
73
|
"oxlint": "^1.77.0",
|
|
74
74
|
"oxlint-tsgolint": "^7.0.2001",
|
|
75
75
|
"semantic-release": "25.0.9",
|