@kensio/pinyinjs 1.9.7 → 1.9.9
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/changyong-rule.d.ts +14 -0
- package/dist/decode/changyong-rule.d.ts.map +1 -0
- package/dist/decode/changyong-rule.js +128 -0
- package/dist/decode/changyong-rule.js.map +1 -0
- package/dist/decode/complement-rule.d.ts +41 -0
- package/dist/decode/complement-rule.d.ts.map +1 -0
- package/dist/decode/complement-rule.js +82 -0
- package/dist/decode/complement-rule.js.map +1 -0
- package/dist/decode/particle-rule.d.ts +42 -0
- package/dist/decode/particle-rule.d.ts.map +1 -0
- package/dist/decode/particle-rule.js +92 -0
- package/dist/decode/particle-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 +11 -0
- package/dist/decode/reading-rules.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,14 @@
|
|
|
1
|
+
import { type EdgeRule } from "./rules.js";
|
|
2
|
+
/**
|
|
3
|
+
* 常用 is taken apart where 用 has an object and 常 is the adverb in front of it.
|
|
4
|
+
*
|
|
5
|
+
* The adjective is kept after a verb, a degree word, a 是 or a measure word,
|
|
6
|
+
* before a 的, a 于, a 词, 字 or 语 or the end of the run, and at the start of
|
|
7
|
+
* the run. Where a word other than an adverb already ends at the 常, the
|
|
8
|
+
* decode is left as it was. Everywhere else the 常 is *often* and the 用
|
|
9
|
+
* *use*. Taking the edge away leaves the two to
|
|
10
|
+
* read as themselves. The readings are `cháng yòng` either way, so this
|
|
11
|
+
* changes the segmentation and the spacing.
|
|
12
|
+
*/
|
|
13
|
+
export declare const VERBAL_CHANGYONG: EdgeRule;
|
|
14
|
+
//# sourceMappingURL=changyong-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changyong-rule.d.ts","sourceRoot":"","sources":["../../src/decode/changyong-rule.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,QAAQ,EAId,MAAM,YAAY,CAAC;AA0GpB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAU9B,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The 常用 that is 常 *often* and the verb 用 *use*, and not the adjective
|
|
3
|
+
* *in common use*.
|
|
4
|
+
*
|
|
5
|
+
* 常用 is a word, and every source counts it: 常用的汉字, 一个常用工具, 越来越常用.
|
|
6
|
+
* The same two characters are as often the adverb 常 in front of 用 taking an
|
|
7
|
+
* object, with a second verb saying what the thing is used for: 我常用微博看新闻,
|
|
8
|
+
* 妈妈常用剩饭给我们做炒饭, 父亲常用慎独这个词提醒我. The decode read every one
|
|
9
|
+
* of them as the adjective, and filed the sentence under the wrong word.
|
|
10
|
+
*/
|
|
11
|
+
import { toCharacters } from "../script/characters.js";
|
|
12
|
+
import { tagOf, wordEndingAt, wordsEndingAt, } from "./rules.js";
|
|
13
|
+
/**
|
|
14
|
+
* The word, which is written the same in both scripts.
|
|
15
|
+
*/
|
|
16
|
+
const IN_COMMON_USE = new Set(["常用"]);
|
|
17
|
+
/**
|
|
18
|
+
* The words in front of 常用 that make it describe something.
|
|
19
|
+
*
|
|
20
|
+
* A degree word grades the adjective (很常用, 最常用的, 越来越常用), and 是 says
|
|
21
|
+
* what something is (是常用的). The adverb 常 takes none of them.
|
|
22
|
+
*/
|
|
23
|
+
const BEFORE_ADJECTIVE = new Set([
|
|
24
|
+
"很",
|
|
25
|
+
"最",
|
|
26
|
+
"更",
|
|
27
|
+
"挺",
|
|
28
|
+
"较",
|
|
29
|
+
"較",
|
|
30
|
+
"比较",
|
|
31
|
+
"比較",
|
|
32
|
+
"非常",
|
|
33
|
+
"十分",
|
|
34
|
+
"相当",
|
|
35
|
+
"相當",
|
|
36
|
+
"越来越",
|
|
37
|
+
"越來越",
|
|
38
|
+
"是",
|
|
39
|
+
]);
|
|
40
|
+
/**
|
|
41
|
+
* The measure words that leave 常用 describing the noun they count.
|
|
42
|
+
*
|
|
43
|
+
* 一个常用工具, 哪些常用的汉字, 一种常用的方法.
|
|
44
|
+
*/
|
|
45
|
+
const MEASURES = new Set(toCharacters("个個种種些项項类類款套"));
|
|
46
|
+
/**
|
|
47
|
+
* What can follow the adjective and not the verb.
|
|
48
|
+
*
|
|
49
|
+
* 常用的 describes a noun, and 常用于 is *commonly used for*, a fixed phrase
|
|
50
|
+
* with 用于 inside it. The end of the run (越来越常用。) leaves 用 no object.
|
|
51
|
+
*/
|
|
52
|
+
const AFTER_ADJECTIVE = new Set(["的", "于", "於", ""]);
|
|
53
|
+
/**
|
|
54
|
+
* The characters after 常用 that make it one of the vocabulary nouns.
|
|
55
|
+
*
|
|
56
|
+
* 常用词, 常用字 and 常用语 are the commonly used words, characters and
|
|
57
|
+
* phrases, and 常用词汇 and 常用词表 grow out of them. 常用字 is a word of its
|
|
58
|
+
* own and 常用词 is not, so 学习常用词很重要 read 常 用词.
|
|
59
|
+
*/
|
|
60
|
+
const VOCABULARY = new Set(toCharacters("词詞字语語"));
|
|
61
|
+
/**
|
|
62
|
+
* The tag prefix jieba gives an adverb.
|
|
63
|
+
*/
|
|
64
|
+
const ADVERB_TAG = "d";
|
|
65
|
+
/**
|
|
66
|
+
* The tag prefix jieba gives a verb.
|
|
67
|
+
*/
|
|
68
|
+
const VERB_TAG = "v";
|
|
69
|
+
/**
|
|
70
|
+
* Whether a longer word other than an adverb ends at the 常, and would take it
|
|
71
|
+
* once 常用 is gone.
|
|
72
|
+
*
|
|
73
|
+
* 文学作品中常用夜来香来象征思念 is 中 and then 常 用, and taking the edge away let
|
|
74
|
+
* 中常 *middling* take the 常. Which word the 常 belongs to there is a question
|
|
75
|
+
* this rule cannot answer, so it leaves the decode as it was. An adverb is let
|
|
76
|
+
* through, because an adverb in front of 用 is the reading the rule is after:
|
|
77
|
+
* 时常常用古书里的典故 is 时 常常 用. Only a tagged word counts, as in
|
|
78
|
+
* {@link import("./cai-rule.js").MODAL_CAI}.
|
|
79
|
+
*/
|
|
80
|
+
function isClaimed(context, from) {
|
|
81
|
+
return wordsEndingAt(context, from + 1).some((word) => {
|
|
82
|
+
const tag = tagOf(context, word);
|
|
83
|
+
return word.length > 1 && tag !== "" && !tag.startsWith(ADVERB_TAG);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Whether the context at a 常用 says it is the adjective.
|
|
88
|
+
*/
|
|
89
|
+
function isAdjective(context, from, to) {
|
|
90
|
+
const next = context.characters[to] ?? "";
|
|
91
|
+
if (AFTER_ADJECTIVE.has(next) || VOCABULARY.has(next)) {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
// A run that starts with 常用 has no subject for 常 to be the adverb of,
|
|
95
|
+
// and is more often a heading or a list: 常用工具, 常用字.
|
|
96
|
+
if (from === 0) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
// A verb in front has 常用 describe its object: 掌握常用词汇, 学习常用工具.
|
|
100
|
+
// The longest word is asked, since 父亲 ends in 亲, which can be a verb.
|
|
101
|
+
if (tagOf(context, wordEndingAt(context, from)).startsWith(VERB_TAG)) {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
return wordsEndingAt(context, from).some((word) => BEFORE_ADJECTIVE.has(word) || MEASURES.has(word.at(-1) ?? ""));
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 常用 is taken apart where 用 has an object and 常 is the adverb in front of it.
|
|
108
|
+
*
|
|
109
|
+
* The adjective is kept after a verb, a degree word, a 是 or a measure word,
|
|
110
|
+
* before a 的, a 于, a 词, 字 or 语 or the end of the run, and at the start of
|
|
111
|
+
* the run. Where a word other than an adverb already ends at the 常, the
|
|
112
|
+
* decode is left as it was. Everywhere else the 常 is *often* and the 用
|
|
113
|
+
* *use*. Taking the edge away leaves the two to
|
|
114
|
+
* read as themselves. The readings are `cháng yòng` either way, so this
|
|
115
|
+
* changes the segmentation and the spacing.
|
|
116
|
+
*/
|
|
117
|
+
export const VERBAL_CHANGYONG = {
|
|
118
|
+
name: "verbal-changyong",
|
|
119
|
+
verdictFor: (context) => {
|
|
120
|
+
const { edge } = context;
|
|
121
|
+
return IN_COMMON_USE.has(edge.text) &&
|
|
122
|
+
!isClaimed(context, edge.from) &&
|
|
123
|
+
!isAdjective(context, edge.from, edge.to)
|
|
124
|
+
? "forbid"
|
|
125
|
+
: "keep";
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=changyong-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changyong-rule.js","sourceRoot":"","sources":["../../src/decode/changyong-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAGL,KAAK,EACL,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,GAAG;CACJ,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAA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,CAAC,IAAI,CACtC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CACxE,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAa;IACxC,IAAI,EAAE,kBAAkB;IACxB,UAAU,EAAE,CAAC,OAAoB,EAAE,EAAE;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QACzB,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YACjC,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC;YAC9B,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;YACzC,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,MAAM,CAAC;IACb,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rules for a 得 marking a complement, where a dictionary word would read
|
|
3
|
+
* it `dé`.
|
|
4
|
+
*/
|
|
5
|
+
import { type EdgeRule } from "./rules.js";
|
|
6
|
+
/**
|
|
7
|
+
* A word beginning with 得 does not start where a complement 得 does.
|
|
8
|
+
*
|
|
9
|
+
* The same fault {@link import("./de-rule.js").PARTICLE_DE} fixes for 的. The particle 得 attaches to
|
|
10
|
+
* the verb or adjective in front of it, so a dictionary key spanning that 得
|
|
11
|
+
* and the next character is describing some other sentence: 他冻得直发抖 came
|
|
12
|
+
* out `dòng dé zhí` on the strength of 得直, read `dé zhí`, and 他冻得发抖 with
|
|
13
|
+
* no 直 was right all along.
|
|
14
|
+
*
|
|
15
|
+
* Only a key no source has tagged is forbidden. 得到, 得出 and 得体 are words
|
|
16
|
+
* jieba counted, and a verb can stand before each of them as a verb of its own
|
|
17
|
+
* (才能得到服务, 表现得体). The untagged keys carry a reading somebody asserted
|
|
18
|
+
* for 得 at the head of a phrase, which is mostly `dé` or `děi`, and neither is
|
|
19
|
+
* the reading after a verb.
|
|
20
|
+
*
|
|
21
|
+
* Over the 88,612 sentences of Tatoeba and the 43,367 Chinese Boost 例句 it
|
|
22
|
+
* changes 5 runs in the full tier: 震得直响, 吹得直响, 吹得直晃 and 累得直喘,
|
|
23
|
+
* each now `de`, and 怕得工夫肯略來看覷我麼, where the 得 was already `de` and
|
|
24
|
+
* 工夫 now takes its neutral tone. The core and standard tiers do not change.
|
|
25
|
+
*/
|
|
26
|
+
export declare const COMPLEMENT_DE: EdgeRule;
|
|
27
|
+
/**
|
|
28
|
+
* 算得 taken apart where it is 算 with a complement after it.
|
|
29
|
+
*
|
|
30
|
+
* jieba counted 算得 and tagged it a verb, read `suàn dé`, which is the word
|
|
31
|
+
* meaning "to count as": 这算得什么. Calculating takes a complement like any
|
|
32
|
+
* other verb, and 祖冲之把圆周率算得非常准确 came out `suàn dé fēicháng`. With
|
|
33
|
+
* the word gone the 得 reads as the particle.
|
|
34
|
+
*
|
|
35
|
+
* {@link import("./de-rule.js").POTENTIAL_DE} already handles 算得上. Of the 11 sentences holding 算得
|
|
36
|
+
* in Tatoeba and the Chinese Boost 例句, 7 are 算得上 and the other 4 are the
|
|
37
|
+
* complement this rule reads: 算得很精细, 算得特别快, 算得非常准确 and
|
|
38
|
+
* 算得跟他一样快. All 4 change, and nothing else does.
|
|
39
|
+
*/
|
|
40
|
+
export declare const CALCULATING_SUAN: EdgeRule;
|
|
41
|
+
//# sourceMappingURL=complement-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complement-rule.d.ts","sourceRoot":"","sources":["../../src/decode/complement-rule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAEL,KAAK,QAAQ,EAId,MAAM,YAAY,CAAC;AAYpB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,EAAE,QAc3B,CAAC;AAcF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAU9B,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rules for a 得 marking a complement, where a dictionary word would read
|
|
3
|
+
* it `dé`.
|
|
4
|
+
*/
|
|
5
|
+
import { tagOf, wordEndingAt, wordStartingAt, } from "./rules.js";
|
|
6
|
+
/**
|
|
7
|
+
* The tags a word carries when the 得 after it marks a complement.
|
|
8
|
+
*
|
|
9
|
+
* A verb or an adjective: 冻得直发抖, 累得直喘, 吹得直响. Nouns are left out,
|
|
10
|
+
* though jieba tags 气 as one and 他气得直跺脚 is the same sentence. A noun is
|
|
11
|
+
* also what stands before a modal 得 or one meaning "to get", and including
|
|
12
|
+
* them read 多音字得看句子 with `de` where it is `děi`.
|
|
13
|
+
*/
|
|
14
|
+
const COMPLEMENTED_TAGS = /^(?:v|a)/u;
|
|
15
|
+
/**
|
|
16
|
+
* A word beginning with 得 does not start where a complement 得 does.
|
|
17
|
+
*
|
|
18
|
+
* The same fault {@link import("./de-rule.js").PARTICLE_DE} fixes for 的. The particle 得 attaches to
|
|
19
|
+
* the verb or adjective in front of it, so a dictionary key spanning that 得
|
|
20
|
+
* and the next character is describing some other sentence: 他冻得直发抖 came
|
|
21
|
+
* out `dòng dé zhí` on the strength of 得直, read `dé zhí`, and 他冻得发抖 with
|
|
22
|
+
* no 直 was right all along.
|
|
23
|
+
*
|
|
24
|
+
* Only a key no source has tagged is forbidden. 得到, 得出 and 得体 are words
|
|
25
|
+
* jieba counted, and a verb can stand before each of them as a verb of its own
|
|
26
|
+
* (才能得到服务, 表现得体). The untagged keys carry a reading somebody asserted
|
|
27
|
+
* for 得 at the head of a phrase, which is mostly `dé` or `děi`, and neither is
|
|
28
|
+
* the reading after a verb.
|
|
29
|
+
*
|
|
30
|
+
* Over the 88,612 sentences of Tatoeba and the 43,367 Chinese Boost 例句 it
|
|
31
|
+
* changes 5 runs in the full tier: 震得直响, 吹得直响, 吹得直晃 and 累得直喘,
|
|
32
|
+
* each now `de`, and 怕得工夫肯略來看覷我麼, where the 得 was already `de` and
|
|
33
|
+
* 工夫 now takes its neutral tone. The core and standard tiers do not change.
|
|
34
|
+
*/
|
|
35
|
+
export const COMPLEMENT_DE = {
|
|
36
|
+
name: "complement-de",
|
|
37
|
+
verdictFor: (context) => {
|
|
38
|
+
const { edge } = context;
|
|
39
|
+
if (edge.to - edge.from < 2 ||
|
|
40
|
+
edge.partOfSpeech !== "" ||
|
|
41
|
+
!edge.text.startsWith("得")) {
|
|
42
|
+
return "keep";
|
|
43
|
+
}
|
|
44
|
+
const before = wordEndingAt(context, edge.from);
|
|
45
|
+
return COMPLEMENTED_TAGS.test(tagOf(context, before)) ? "forbid" : "keep";
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
/** 算得, which is the same in both scripts. */
|
|
49
|
+
const SUAN_DE = "算得";
|
|
50
|
+
/**
|
|
51
|
+
* What a complement of degree starts with: an adverb, a degree word, an
|
|
52
|
+
* adjective, or the 跟 or 比 of a comparison.
|
|
53
|
+
*
|
|
54
|
+
* 算得很精细, 算得非常准确, 算得快, 算得跟他一样快. What follows 算得 meaning
|
|
55
|
+
* "to count as" is a noun phrase or a verb, so 是, 什么 and 上 are not in it.
|
|
56
|
+
*/
|
|
57
|
+
const DEGREE_TAGS = /^(?:d|zg|a|p)/u;
|
|
58
|
+
/**
|
|
59
|
+
* 算得 taken apart where it is 算 with a complement after it.
|
|
60
|
+
*
|
|
61
|
+
* jieba counted 算得 and tagged it a verb, read `suàn dé`, which is the word
|
|
62
|
+
* meaning "to count as": 这算得什么. Calculating takes a complement like any
|
|
63
|
+
* other verb, and 祖冲之把圆周率算得非常准确 came out `suàn dé fēicháng`. With
|
|
64
|
+
* the word gone the 得 reads as the particle.
|
|
65
|
+
*
|
|
66
|
+
* {@link import("./de-rule.js").POTENTIAL_DE} already handles 算得上. Of the 11 sentences holding 算得
|
|
67
|
+
* in Tatoeba and the Chinese Boost 例句, 7 are 算得上 and the other 4 are the
|
|
68
|
+
* complement this rule reads: 算得很精细, 算得特别快, 算得非常准确 and
|
|
69
|
+
* 算得跟他一样快. All 4 change, and nothing else does.
|
|
70
|
+
*/
|
|
71
|
+
export const CALCULATING_SUAN = {
|
|
72
|
+
name: "calculating-suan",
|
|
73
|
+
verdictFor: (context) => {
|
|
74
|
+
const { edge } = context;
|
|
75
|
+
if (edge.text !== SUAN_DE) {
|
|
76
|
+
return "keep";
|
|
77
|
+
}
|
|
78
|
+
const after = wordStartingAt(context, edge.to);
|
|
79
|
+
return DEGREE_TAGS.test(tagOf(context, after)) ? "forbid" : "keep";
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=complement-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complement-rule.js","sourceRoot":"","sources":["../../src/decode/complement-rule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAGL,KAAK,EACL,YAAY,EACZ,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAa;IACrC,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,CAAC,OAAoB,EAAE,EAAE;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QACzB,IACE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC;YACvB,IAAI,CAAC,YAAY,KAAK,EAAE;YACxB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAC1B,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5E,CAAC;CACF,CAAC;AAEF,6CAA6C;AAC7C,MAAM,OAAO,GAAG,IAAI,CAAC;AAErB;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAa;IACxC,IAAI,EAAE,kBAAkB;IACxB,UAAU,EAAE,CAAC,OAAoB,EAAE,EAAE;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QACzB,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC1B,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAC/C,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACrE,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rules about words that begin at an aspect particle or at the adverbial
|
|
3
|
+
* 地.
|
|
4
|
+
*
|
|
5
|
+
* {@link import("./de-rule.js").PARTICLE_DE} and
|
|
6
|
+
* {@link import("./complement-rule.js").COMPLEMENT_DE} settle the same fault for 的 and
|
|
7
|
+
* 得: the full tier keeps keys no source tagged, many of them from the phrase
|
|
8
|
+
* corpus, and one that starts at a particle reads that particle as whatever it
|
|
9
|
+
* is at the head of a phrase.
|
|
10
|
+
*/
|
|
11
|
+
import { type EdgeRule } from "./rules.js";
|
|
12
|
+
/**
|
|
13
|
+
* A word beginning with 着 or 了 does not start where the aspect particle does.
|
|
14
|
+
*
|
|
15
|
+
* 她手里拿着花 came out `ná zháo huā` on the strength of 着花, and 终于还清了债
|
|
16
|
+
* came out `huánqīng liǎo zhài` on 了债. Both keys are real words — 着花 is a
|
|
17
|
+
* plant coming into bloom and 了债 is settling a debt — and both read the
|
|
18
|
+
* particle as the verb it is at the head of a phrase. After a verb it is the
|
|
19
|
+
* aspect particle.
|
|
20
|
+
*
|
|
21
|
+
* Only an untagged key is forbidden, so 着急, 着火 and 了解 are left to the
|
|
22
|
+
* decode. 猜着了 and 睡着了 keep `zháo`, since the word there is 猜着 or 睡着
|
|
23
|
+
* and does not start at the 着.
|
|
24
|
+
*
|
|
25
|
+
* Over the 88,612 sentences of Tatoeba and the 43,367 Chinese Boost 例句 it
|
|
26
|
+
* changes 6 runs in the full tier and all 6 are corrections: 拿着花 twice,
|
|
27
|
+
* 逆着风 and 追著風, which become `zhe`, and 还清了债 and 付了賬, which become
|
|
28
|
+
* `le`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ASPECTUAL_PARTICLE: EdgeRule;
|
|
31
|
+
/**
|
|
32
|
+
* A word beginning with 地 does not start where the adverbial particle does.
|
|
33
|
+
*
|
|
34
|
+
* 她惆怅地望着窗外 came out `chóuchàng dì wàng` on the strength of 地望, a word
|
|
35
|
+
* for a family's place of origin. After an adjective or an adverb 地 is the
|
|
36
|
+
* particle that makes it modify a verb, and reads `de`.
|
|
37
|
+
*
|
|
38
|
+
* Over the 88,612 sentences of Tatoeba and the 43,367 Chinese Boost 例句 it
|
|
39
|
+
* changes 2 runs in the full tier, both corrections: 惆怅地望着 and 悠哉地坐.
|
|
40
|
+
*/
|
|
41
|
+
export declare const ADVERBIAL_DI: EdgeRule;
|
|
42
|
+
//# sourceMappingURL=particle-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particle-rule.d.ts","sourceRoot":"","sources":["../../src/decode/particle-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,YAAY,CAAC;AAgCpB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC;AAcF;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rules about words that begin at an aspect particle or at the adverbial
|
|
3
|
+
* 地.
|
|
4
|
+
*
|
|
5
|
+
* {@link import("./de-rule.js").PARTICLE_DE} and
|
|
6
|
+
* {@link import("./complement-rule.js").COMPLEMENT_DE} settle the same fault for 的 and
|
|
7
|
+
* 得: the full tier keeps keys no source tagged, many of them from the phrase
|
|
8
|
+
* corpus, and one that starts at a particle reads that particle as whatever it
|
|
9
|
+
* is at the head of a phrase.
|
|
10
|
+
*/
|
|
11
|
+
import { tagOf, wordEndingAt, } from "./rules.js";
|
|
12
|
+
/**
|
|
13
|
+
* Whether an edge is a word of more than one character that no source tagged
|
|
14
|
+
* and that begins with one of the given characters.
|
|
15
|
+
*/
|
|
16
|
+
function isUntaggedFrom(context, characters) {
|
|
17
|
+
const { edge } = context;
|
|
18
|
+
return (edge.to - edge.from >= 2 &&
|
|
19
|
+
edge.partOfSpeech === "" &&
|
|
20
|
+
characters.has(context.characters[edge.from] ?? ""));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 着 and 了, in both scripts.
|
|
24
|
+
*
|
|
25
|
+
* 过 is left out. It is an aspect particle after a verb, but a verb of its own
|
|
26
|
+
* after one too, and 她怕过马路 and 设置过马路警察 lost `guò` to the particle's
|
|
27
|
+
* neutral tone when it was in.
|
|
28
|
+
*/
|
|
29
|
+
const ASPECT_PARTICLES = new Set(["着", "著", "了"]);
|
|
30
|
+
/**
|
|
31
|
+
* The tag prefix jieba gives a verb, which is what an aspect particle follows.
|
|
32
|
+
*/
|
|
33
|
+
const VERB_TAG = "v";
|
|
34
|
+
/**
|
|
35
|
+
* A word beginning with 着 or 了 does not start where the aspect particle does.
|
|
36
|
+
*
|
|
37
|
+
* 她手里拿着花 came out `ná zháo huā` on the strength of 着花, and 终于还清了债
|
|
38
|
+
* came out `huánqīng liǎo zhài` on 了债. Both keys are real words — 着花 is a
|
|
39
|
+
* plant coming into bloom and 了债 is settling a debt — and both read the
|
|
40
|
+
* particle as the verb it is at the head of a phrase. After a verb it is the
|
|
41
|
+
* aspect particle.
|
|
42
|
+
*
|
|
43
|
+
* Only an untagged key is forbidden, so 着急, 着火 and 了解 are left to the
|
|
44
|
+
* decode. 猜着了 and 睡着了 keep `zháo`, since the word there is 猜着 or 睡着
|
|
45
|
+
* and does not start at the 着.
|
|
46
|
+
*
|
|
47
|
+
* Over the 88,612 sentences of Tatoeba and the 43,367 Chinese Boost 例句 it
|
|
48
|
+
* changes 6 runs in the full tier and all 6 are corrections: 拿着花 twice,
|
|
49
|
+
* 逆着风 and 追著風, which become `zhe`, and 还清了债 and 付了賬, which become
|
|
50
|
+
* `le`.
|
|
51
|
+
*/
|
|
52
|
+
export const ASPECTUAL_PARTICLE = {
|
|
53
|
+
name: "aspectual-particle",
|
|
54
|
+
verdictFor: (context) => {
|
|
55
|
+
if (!isUntaggedFrom(context, ASPECT_PARTICLES)) {
|
|
56
|
+
return "keep";
|
|
57
|
+
}
|
|
58
|
+
const before = wordEndingAt(context, context.edge.from);
|
|
59
|
+
return tagOf(context, before).startsWith(VERB_TAG) ? "forbid" : "keep";
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
/** The adverbial particle, which is the same in both scripts. */
|
|
63
|
+
const DI = new Set(["地"]);
|
|
64
|
+
/**
|
|
65
|
+
* The tags a word carries when the 地 after it is the adverbial particle.
|
|
66
|
+
*
|
|
67
|
+
* An adjective, a descriptive word or an adverb: 惆怅地, 悠哉地, 慢慢地. A verb
|
|
68
|
+
* is left out, because 地 after a verb is far more often the ground: 发射到
|
|
69
|
+
* 地球轨道.
|
|
70
|
+
*/
|
|
71
|
+
const ADVERBIAL_TAGS = /^(?:a|z|d)/u;
|
|
72
|
+
/**
|
|
73
|
+
* A word beginning with 地 does not start where the adverbial particle does.
|
|
74
|
+
*
|
|
75
|
+
* 她惆怅地望着窗外 came out `chóuchàng dì wàng` on the strength of 地望, a word
|
|
76
|
+
* for a family's place of origin. After an adjective or an adverb 地 is the
|
|
77
|
+
* particle that makes it modify a verb, and reads `de`.
|
|
78
|
+
*
|
|
79
|
+
* Over the 88,612 sentences of Tatoeba and the 43,367 Chinese Boost 例句 it
|
|
80
|
+
* changes 2 runs in the full tier, both corrections: 惆怅地望着 and 悠哉地坐.
|
|
81
|
+
*/
|
|
82
|
+
export const ADVERBIAL_DI = {
|
|
83
|
+
name: "adverbial-di",
|
|
84
|
+
verdictFor: (context) => {
|
|
85
|
+
if (!isUntaggedFrom(context, DI)) {
|
|
86
|
+
return "keep";
|
|
87
|
+
}
|
|
88
|
+
const before = wordEndingAt(context, context.edge.from);
|
|
89
|
+
return ADVERBIAL_TAGS.test(tagOf(context, before)) ? "forbid" : "keep";
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=particle-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particle-rule.js","sourceRoot":"","sources":["../../src/decode/particle-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAGL,KAAK,EACL,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,SAAS,cAAc,CACrB,OAAoB,EACpB,UAA+B;IAE/B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACzB,OAAO,CACL,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC;QACxB,IAAI,CAAC,YAAY,KAAK,EAAE;QACxB,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,C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CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACzE,CAAC;CACF,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { MODAL_DE, NOUN_HUA, PARTICLE_DE, POTENTIAL_DE } from "./de-rule.js";
|
|
2
|
+
export { CALCULATING_SUAN, COMPLEMENT_DE } from "./complement-rule.js";
|
|
3
|
+
export { ADVERBIAL_DI, ASPECTUAL_PARTICLE } from "./particle-rule.js";
|
|
2
4
|
export { TAXI_DI } from "./taxi-rule.js";
|
|
3
5
|
export { COUNTED_MEASURE } from "./measure-rule.js";
|
|
4
6
|
export { COUNTED_GE } from "./ge-rule.js";
|
|
@@ -19,6 +21,7 @@ export { LOCATIVE_SHANG_PU, SPREADING_PU } from "./pu-rule.js";
|
|
|
19
21
|
export { RESULTATIVE_ZHAO } from "./zhao-rule.js";
|
|
20
22
|
export { VERBAL_DE_QUESHI } from "./dique-rule.js";
|
|
21
23
|
export { COMPASS_DONGXI } from "./dongxi-rule.js";
|
|
24
|
+
export { VERBAL_CHANGYONG } from "./changyong-rule.js";
|
|
22
25
|
import type { EdgeRule } from "./rules.js";
|
|
23
26
|
export { ATTESTED_ERHUA } from "./erhua-rule.js";
|
|
24
27
|
export { ADJECTIVAL_CHANG, ADJECTIVAL_MEI, EASY_HAO, PLAYING_TAN, SUMMING_DOU, } from "./polyphone-rules.js";
|
|
@@ -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":"AAyBA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,YAAY,EAA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AUjD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,WAAW,EACX,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,QAAQ,EAqC5C,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { MODAL_DE, NOUN_HUA, PARTICLE_DE, POTENTIAL_DE } from "./de-rule.js";
|
|
2
|
+
import { CALCULATING_SUAN, COMPLEMENT_DE } from "./complement-rule.js";
|
|
3
|
+
import { ADVERBIAL_DI, ASPECTUAL_PARTICLE } from "./particle-rule.js";
|
|
2
4
|
import { TAXI_DI } from "./taxi-rule.js";
|
|
3
5
|
import { COUNTED_MEASURE } from "./measure-rule.js";
|
|
4
6
|
import { COUNTED_GE } from "./ge-rule.js";
|
|
@@ -19,7 +21,10 @@ import { LOCATIVE_SHANG_PU, SPREADING_PU } from "./pu-rule.js";
|
|
|
19
21
|
import { RESULTATIVE_ZHAO } from "./zhao-rule.js";
|
|
20
22
|
import { VERBAL_DE_QUESHI } from "./dique-rule.js";
|
|
21
23
|
import { COMPASS_DONGXI } from "./dongxi-rule.js";
|
|
24
|
+
import { VERBAL_CHANGYONG } from "./changyong-rule.js";
|
|
22
25
|
export { MODAL_DE, NOUN_HUA, PARTICLE_DE, POTENTIAL_DE } from "./de-rule.js";
|
|
26
|
+
export { CALCULATING_SUAN, COMPLEMENT_DE } from "./complement-rule.js";
|
|
27
|
+
export { ADVERBIAL_DI, ASPECTUAL_PARTICLE } from "./particle-rule.js";
|
|
23
28
|
export { TAXI_DI } from "./taxi-rule.js";
|
|
24
29
|
export { COUNTED_MEASURE } from "./measure-rule.js";
|
|
25
30
|
export { COUNTED_GE } from "./ge-rule.js";
|
|
@@ -40,6 +45,7 @@ export { LOCATIVE_SHANG_PU, SPREADING_PU } from "./pu-rule.js";
|
|
|
40
45
|
export { RESULTATIVE_ZHAO } from "./zhao-rule.js";
|
|
41
46
|
export { VERBAL_DE_QUESHI } from "./dique-rule.js";
|
|
42
47
|
export { COMPASS_DONGXI } from "./dongxi-rule.js";
|
|
48
|
+
export { VERBAL_CHANGYONG } from "./changyong-rule.js";
|
|
43
49
|
import { ATTESTED_ERHUA } from "./erhua-rule.js";
|
|
44
50
|
export { ATTESTED_ERHUA } from "./erhua-rule.js";
|
|
45
51
|
import { ADJECTIVAL_CHANG, ADJECTIVAL_MEI, EASY_HAO, PLAYING_TAN, SUMMING_DOU, } from "./polyphone-rules.js";
|
|
@@ -51,6 +57,10 @@ export const READING_RULES = [
|
|
|
51
57
|
MODAL_DE,
|
|
52
58
|
PARTICLE_DE,
|
|
53
59
|
POTENTIAL_DE,
|
|
60
|
+
COMPLEMENT_DE,
|
|
61
|
+
CALCULATING_SUAN,
|
|
62
|
+
ASPECTUAL_PARTICLE,
|
|
63
|
+
ADVERBIAL_DI,
|
|
54
64
|
TAXI_DI,
|
|
55
65
|
NOUN_HUA,
|
|
56
66
|
TEACHING_JIAO,
|
|
@@ -79,5 +89,6 @@ export const READING_RULES = [
|
|
|
79
89
|
MODAL_CAI,
|
|
80
90
|
VERBAL_DE_QUESHI,
|
|
81
91
|
COMPASS_DONGXI,
|
|
92
|
+
VERBAL_CHANGYONG,
|
|
82
93
|
];
|
|
83
94
|
//# 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,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,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sBAAsB,CAAC;AAE9B,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,WAAW,EACX,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAwB;IAChD,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,YAAY;IACZ,OAAO;IACP,QAAQ;IACR,aAAa;IACb,cAAc;IACd,eAAe;IACf,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,cAAc;IACd,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,QAAQ;IACR,cAAc;IACd,WAAW;IACX,SAAS;IACT,gBAAgB;IAChB,cAAc;IACd,gBAAgB;CACjB,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, ADJECTIVAL_MEI, ATTESTED_ERHUA, CONCERNING_GAN, OBTAINING_DE, COUNTED_GE, COUNTED_MEASURE, COUNTED_NAME, COUNTING_ZHI, COMPASS_DONGXI, DOMINANT_READING, EASY_HAO, EXPERIENTIAL_GUO, LOCATIVE_SHANG_PU, MODAL_CAI, MODAL_DE, NOUN_HUA, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, POTENTIAL_LIAO, READING_RULES, REDUPLICATED_VERB, RESULTATIVE_ZHAO, RETURNING_HUAN, SEPARATED_COMPOUND, SPREADING_PU, SUMMING_DOU, TAXI_DI, VERBAL_DE_QUESHI, TEACHING_JIAO, VERBAL_READING, } from "./decode/reading-rules.js";
|
|
54
|
+
export { ADJECTIVAL_CHANG, ADJECTIVAL_MEI, ADVERBIAL_DI, ASPECTUAL_PARTICLE, ATTESTED_ERHUA, CALCULATING_SUAN, COMPLEMENT_DE, CONCERNING_GAN, OBTAINING_DE, COUNTED_GE, COUNTED_MEASURE, COUNTED_NAME, COUNTING_ZHI, COMPASS_DONGXI, DOMINANT_READING, EASY_HAO, EXPERIENTIAL_GUO, LOCATIVE_SHANG_PU, MODAL_CAI, MODAL_DE, NOUN_HUA, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, POTENTIAL_LIAO, READING_RULES, REDUPLICATED_VERB, RESULTATIVE_ZHAO, RETURNING_HUAN, SEPARATED_COMPOUND, SPREADING_PU, SUMMING_DOU, TAXI_DI, VERBAL_CHANGYONG, VERBAL_DE_QUESHI, TEACHING_JIAO, VERBAL_READING, } 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,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO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/D,OAAO,EACL,UAAU,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,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;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, ADJECTIVAL_MEI, ATTESTED_ERHUA, CONCERNING_GAN, OBTAINING_DE, COUNTED_GE, COUNTED_MEASURE, COUNTED_NAME, COUNTING_ZHI, COMPASS_DONGXI, DOMINANT_READING, EASY_HAO, EXPERIENTIAL_GUO, LOCATIVE_SHANG_PU, MODAL_CAI, MODAL_DE, NOUN_HUA, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, POTENTIAL_LIAO, READING_RULES, REDUPLICATED_VERB, RESULTATIVE_ZHAO, RETURNING_HUAN, SEPARATED_COMPOUND, SPREADING_PU, SUMMING_DOU, TAXI_DI, VERBAL_DE_QUESHI, TEACHING_JIAO, VERBAL_READING, } from "./decode/reading-rules.js";
|
|
34
|
+
export { ADJECTIVAL_CHANG, ADJECTIVAL_MEI, ADVERBIAL_DI, ASPECTUAL_PARTICLE, ATTESTED_ERHUA, CALCULATING_SUAN, COMPLEMENT_DE, CONCERNING_GAN, OBTAINING_DE, COUNTED_GE, COUNTED_MEASURE, COUNTED_NAME, COUNTING_ZHI, COMPASS_DONGXI, DOMINANT_READING, EASY_HAO, EXPERIENTIAL_GUO, LOCATIVE_SHANG_PU, MODAL_CAI, MODAL_DE, NOUN_HUA, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, POTENTIAL_LIAO, READING_RULES, REDUPLICATED_VERB, RESULTATIVE_ZHAO, RETURNING_HUAN, SEPARATED_COMPOUND, SPREADING_PU, SUMMING_DOU, TAXI_DI, VERBAL_CHANGYONG, VERBAL_DE_QUESHI, TEACHING_JIAO, VERBAL_READING, } 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,EACL,gBAAgB,EAChB,eAAe,EACf,UAAU,GACX,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGtE,OAAO,EACL,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,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AAC;AAEjC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,cAAc,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.9.
|
|
3
|
+
"version": "1.9.9",
|
|
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.73.0",
|
|
73
73
|
"oxlint": "^1.77.0",
|
|
74
74
|
"oxlint-tsgolint": "^7.0.2001",
|
|
75
75
|
"semantic-release": "25.0.9",
|