@kensio/pinyinjs 1.10.2 → 1.10.3
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 +13 -13
- package/data/full.counts +0 -0
- package/data/full.entries +21 -20
- package/data/full.freq +0 -0
- package/data/full.keys +1 -0
- package/data/manifest.json +9 -9
- package/data/standard.entries +13 -13
- package/dist/decode/li-frames.d.ts +29 -0
- package/dist/decode/li-frames.d.ts.map +1 -0
- package/dist/decode/li-frames.js +84 -0
- package/dist/decode/li-frames.js.map +1 -0
- package/dist/decode/script-context.d.ts +28 -0
- package/dist/decode/script-context.d.ts.map +1 -0
- package/dist/decode/script-context.js +45 -0
- package/dist/decode/script-context.js.map +1 -0
- package/dist/decode/script-words.d.ts +3 -13
- package/dist/decode/script-words.d.ts.map +1 -1
- package/dist/decode/script-words.js +9 -27
- package/dist/decode/script-words.js.map +1 -1
- package/dist/decode/script.d.ts.map +1 -1
- package/dist/decode/script.js +3 -14
- package/dist/decode/script.js.map +1 -1
- package/dist/dictionary/reference-readings.d.ts.map +1 -1
- package/dist/dictionary/reference-readings.js +26 -5
- package/dist/dictionary/reference-readings.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ Load the dictionary once and keep it. It is immutable and safe to share.
|
|
|
159
159
|
| ---------- | ------: | ----------------: | ---------------------- |
|
|
160
160
|
| `core` | 16,970 | 70 KB | single characters only |
|
|
161
161
|
| `standard` | 66,970 | 377 KB | the most common words |
|
|
162
|
-
| `full` | 461,
|
|
162
|
+
| `full` | 461,563 | 2,378 KB | every word |
|
|
163
163
|
|
|
164
164
|
`full` is the default. The tiers are nested. A page can load `standard` first,
|
|
165
165
|
convert with it, and reload as `full` arrives.
|
package/data/core.entries
CHANGED
|
@@ -561,7 +561,7 @@ kong3 a kong1
|
|
|
561
561
|
juan4 zg
|
|
562
562
|
zong1 zg
|
|
563
563
|
ju4 ag
|
|
564
|
-
qian4 zg
|
|
564
|
+
qian4 zg qing4
|
|
565
565
|
ni2 nr p
|
|
566
566
|
lun2 ns
|
|
567
567
|
zhuo1 zhuo2 g
|
|
@@ -2223,7 +2223,7 @@ pi2 zg pi4
|
|
|
2223
2223
|
qing1 zg
|
|
2224
2224
|
ju4 zg
|
|
2225
2225
|
kong1 zg
|
|
2226
|
-
tang3 chong3
|
|
2226
|
+
tang3 chong3 shang3
|
|
2227
2227
|
dong1 zg
|
|
2228
2228
|
dai4 zg
|
|
2229
2229
|
tan4 zg
|
|
@@ -2734,7 +2734,7 @@ wei2 zg
|
|
|
2734
2734
|
di4
|
|
2735
2735
|
rou2
|
|
2736
2736
|
mei3
|
|
2737
|
-
ruan3
|
|
2737
|
+
ruan3 nen4
|
|
2738
2738
|
wo4 zg
|
|
2739
2739
|
chun1 zg
|
|
2740
2740
|
miao2
|
|
@@ -4184,7 +4184,7 @@ huan4 zg
|
|
|
4184
4184
|
min3 g
|
|
4185
4185
|
bi4 g
|
|
4186
4186
|
yi4 n yi5
|
|
4187
|
-
kai4 zg he4
|
|
4187
|
+
kai4 zg he4,qi4
|
|
4188
4188
|
dang4
|
|
4189
4189
|
yin1 zg
|
|
4190
4190
|
e4 a
|
|
@@ -5752,7 +5752,7 @@ kuo4 zg
|
|
|
5752
5752
|
jing4 zg
|
|
5753
5753
|
po5 zg bo2
|
|
5754
5754
|
fu2 g
|
|
5755
|
-
rui2 zg
|
|
5755
|
+
rui2 zg rui3
|
|
5756
5756
|
tong3 zg
|
|
5757
5757
|
jue2 g
|
|
5758
5758
|
xi1 zg
|
|
@@ -7973,7 +7973,7 @@ yang2 zg chang4
|
|
|
7973
7973
|
ma3 nr
|
|
7974
7974
|
wu3 zg
|
|
7975
7975
|
fu1 zg
|
|
7976
|
-
wen2 zg
|
|
7976
|
+
wen2 zg min2
|
|
7977
7977
|
jie4 zg
|
|
7978
7978
|
ya2 zg
|
|
7979
7979
|
fen1 x bin1
|
|
@@ -9588,7 +9588,7 @@ ou1 wu2 zg
|
|
|
9588
9588
|
qian1 v
|
|
9589
9589
|
jian3 a
|
|
9590
9590
|
pou2 zg
|
|
9591
|
-
bi3 bei1
|
|
9591
|
+
bi3 bei1,pai2
|
|
9592
9592
|
bi4 zg
|
|
9593
9593
|
ge4 zg
|
|
9594
9594
|
yu1
|
|
@@ -11041,7 +11041,7 @@ zi4 zg
|
|
|
11041
11041
|
hui4
|
|
11042
11042
|
sui1
|
|
11043
11043
|
xiang1 ns
|
|
11044
|
-
bi3 x
|
|
11044
|
+
bi3 x pi2
|
|
11045
11045
|
fu2 nrt
|
|
11046
11046
|
tun2
|
|
11047
11047
|
wu2 ns
|
|
@@ -11436,7 +11436,7 @@ meng2 v meng1,meng3
|
|
|
11436
11436
|
suan4 n
|
|
11437
11437
|
li4 vg
|
|
11438
11438
|
ju3 zg
|
|
11439
|
-
bang4
|
|
11439
|
+
bang4 pang2
|
|
11440
11440
|
chu2 zg
|
|
11441
11441
|
huo4
|
|
11442
11442
|
qian4 zg
|
|
@@ -12639,7 +12639,7 @@ yin1 zg
|
|
|
12639
12639
|
an1 v
|
|
12640
12640
|
xian2
|
|
12641
12641
|
nan2
|
|
12642
|
-
chen2 nr
|
|
12642
|
+
chen2 nr shen4
|
|
12643
12643
|
feng3 feng4 v
|
|
12644
12644
|
zhu1 r
|
|
12645
12645
|
yan4 n
|
|
@@ -12877,7 +12877,7 @@ tan2 v
|
|
|
12877
12877
|
shen3
|
|
12878
12878
|
yi4 ng
|
|
12879
12879
|
mou2 v mou5
|
|
12880
|
-
chen2 nr
|
|
12880
|
+
chen2 nr shen4
|
|
12881
12881
|
die2 n
|
|
12882
12882
|
huang3 ng
|
|
12883
12883
|
jian4 vg
|
|
@@ -12987,7 +12987,7 @@ xiu1 x
|
|
|
12987
12987
|
huan2
|
|
12988
12988
|
kun1 zg
|
|
12989
12989
|
he2
|
|
12990
|
-
he2 ng hao2
|
|
12990
|
+
he2 ng hao2,mo4
|
|
12991
12991
|
mo4 g
|
|
12992
12992
|
mao4 ng
|
|
12993
12993
|
li2
|
|
@@ -13244,7 +13244,7 @@ zhi3 n
|
|
|
13244
13244
|
ta1 v
|
|
13245
13245
|
yue4
|
|
13246
13246
|
ba4
|
|
13247
|
-
qi2 zg qi4
|
|
13247
|
+
qi2 zg qi4,qi3
|
|
13248
13248
|
yue4 v
|
|
13249
13249
|
qiang4 x qiang1
|
|
13250
13250
|
tuo4
|
package/data/full.counts
CHANGED
|
Binary file
|
package/data/full.entries
CHANGED
|
@@ -2549,7 +2549,7 @@ ai4
|
|
|
2549
2549
|
qin1
|
|
2550
2550
|
qiang1
|
|
2551
2551
|
chu4
|
|
2552
|
-
pei4
|
|
2552
|
+
pei4 pei1
|
|
2553
2553
|
kuo4
|
|
2554
2554
|
yi1
|
|
2555
2555
|
guai1
|
|
@@ -3539,7 +3539,7 @@ zhen4
|
|
|
3539
3539
|
gai4
|
|
3540
3540
|
pi4
|
|
3541
3541
|
tan3
|
|
3542
|
-
chao3
|
|
3542
|
+
chao3 miao3
|
|
3543
3543
|
chun3
|
|
3544
3544
|
he1
|
|
3545
3545
|
zhuan1
|
|
@@ -57361,7 +57361,7 @@ ju4 man4
|
|
|
57361
57361
|
|
|
57362
57362
|
|
|
57363
57363
|
|
|
57364
|
-
qian4 zg
|
|
57364
|
+
qian4 zg qing4
|
|
57365
57365
|
|
|
57366
57366
|
|
|
57367
57367
|
v
|
|
@@ -121052,7 +121052,7 @@ dai1 mu4 tou5
|
|
|
121052
121052
|
|
|
121053
121053
|
|
|
121054
121054
|
|
|
121055
|
-
men4
|
|
121055
|
+
men4 qi3
|
|
121056
121056
|
cheng2 v
|
|
121057
121057
|
|
|
121058
121058
|
v
|
|
@@ -141392,7 +141392,7 @@ ju4 zg
|
|
|
141392
141392
|
lun3
|
|
141393
141393
|
zheng1
|
|
141394
141394
|
kong1 zg
|
|
141395
|
-
tang3 chong3
|
|
141395
|
+
tang3 chong3 shang3
|
|
141396
141396
|
chong3 yong3
|
|
141397
141397
|
dong1 zg
|
|
141398
141398
|
dai4 zg
|
|
@@ -164047,7 +164047,7 @@ rour2
|
|
|
164047
164047
|
rour2
|
|
164048
164048
|
mei3
|
|
164049
164049
|
dan1
|
|
164050
|
-
ruan3
|
|
164050
|
+
ruan3 nen4
|
|
164051
164051
|
|
|
164052
164052
|
qin1
|
|
164053
164053
|
hui1
|
|
@@ -231209,7 +231209,7 @@ yi4 xing1 suo3 ran2 i
|
|
|
231209
231209
|
n
|
|
231210
231210
|
mian3
|
|
231211
231211
|
yong3
|
|
231212
|
-
kai4 zg he4
|
|
231212
|
+
kai4 zg he4,qi4
|
|
231213
231213
|
|
|
231214
231214
|
|
|
231215
231215
|
|
|
@@ -259794,7 +259794,7 @@ dan3 yi1 fu5 dan3 yi1 fu2
|
|
|
259794
259794
|
|
|
259795
259795
|
shan4 bang1 ns p
|
|
259796
259796
|
shan4 bang1 gao1 yuan2 p
|
|
259797
|
-
meng5
|
|
259797
|
+
meng5 meng3
|
|
259798
259798
|
chan1 zg can4,shan3
|
|
259799
259799
|
v
|
|
259800
259800
|
chan1 he5 chan1 he2 v
|
|
@@ -313182,7 +313182,7 @@ fu2 ying4
|
|
|
313182
313182
|
|
|
313183
313183
|
fu2 gu3 xiang1 ying4 nz
|
|
313184
313184
|
fu2 gu3 xiang1 ying4 nz
|
|
313185
|
-
rui2 zg
|
|
313185
|
+
rui2 zg rui3
|
|
313186
313186
|
tong3 zg
|
|
313187
313187
|
|
|
313188
313188
|
nrt
|
|
@@ -386990,7 +386990,7 @@ ma3 li4 lian2 meng4 lou4 p
|
|
|
386990
386990
|
hong2
|
|
386991
386991
|
wu3 zg
|
|
386992
386992
|
fu1 zg
|
|
386993
|
-
wen2 zg
|
|
386993
|
+
wen2 zg min2
|
|
386994
386994
|
min2 xuan2
|
|
386995
386995
|
min2 zhen1
|
|
386996
386996
|
jie4 zg
|
|
@@ -426839,7 +426839,7 @@ shen2 de5 er2 zi5
|
|
|
426839
426839
|
shen2 shen5 dao1 dao1
|
|
426840
426840
|
|
|
426841
426841
|
|
|
426842
|
-
shen2 shen5
|
|
426842
|
+
shen2 shen5 dao1 dao1 l
|
|
426843
426843
|
|
|
426844
426844
|
nr
|
|
426845
426845
|
|
|
@@ -445724,7 +445724,7 @@ jian3 jun4
|
|
|
445724
445724
|
pou2 zg
|
|
445725
445725
|
lai2
|
|
445726
445726
|
zou1
|
|
445727
|
-
bi3 bei1
|
|
445727
|
+
bi3 bei1,pai2
|
|
445728
445728
|
|
|
445729
445729
|
|
|
445730
445730
|
|
|
@@ -492328,7 +492328,7 @@ xiang1 ns
|
|
|
492328
492328
|
|
|
492329
492329
|
xiang1 fu3
|
|
492330
492330
|
|
|
492331
|
-
bi3 x
|
|
492331
|
+
bi3 x pi2
|
|
492332
492332
|
pi2 cheng2
|
|
492333
492333
|
pi2 yi1
|
|
492334
492334
|
pi2 fou3
|
|
@@ -502122,7 +502122,7 @@ li4 bu3
|
|
|
502122
502122
|
ju3 zg
|
|
502123
502123
|
|
|
502124
502124
|
xi1
|
|
502125
|
-
bang4
|
|
502125
|
+
bang4 pang2
|
|
502126
502126
|
chu2 zg
|
|
502127
502127
|
xu2
|
|
502128
502128
|
tu2
|
|
@@ -532566,7 +532566,7 @@ nan2
|
|
|
532566
532566
|
|
|
532567
532567
|
|
|
532568
532568
|
|
|
532569
|
-
chen2 nr
|
|
532569
|
+
chen2 nr shen4
|
|
532570
532570
|
|
|
532571
532571
|
|
|
532572
532572
|
|
|
@@ -544628,7 +544628,7 @@ mou2 que1
|
|
|
544628
544628
|
|
|
544629
544629
|
|
|
544630
544630
|
|
|
544631
|
-
chen2 nr
|
|
544631
|
+
chen2 nr shen4
|
|
544632
544632
|
|
|
544633
544633
|
|
|
544634
544634
|
|
|
@@ -548549,7 +548549,7 @@ huan1 zhu1
|
|
|
548549
548549
|
kun1 zg
|
|
548550
548550
|
he2
|
|
548551
548551
|
mo4 zi3
|
|
548552
|
-
he2 ng hao2
|
|
548552
|
+
he2 ng hao2,mo4
|
|
548553
548553
|
mo4 yi1 qiu1
|
|
548554
548554
|
mo4 tong2 qiu1
|
|
548555
548555
|
mo4 nu2
|
|
@@ -565274,7 +565274,7 @@ yue4
|
|
|
565274
565274
|
|
|
565275
565275
|
ba4
|
|
565276
565276
|
pa2 qia3
|
|
565277
|
-
qi2 zg qi4
|
|
565277
|
+
qi2 zg qi4,qi3
|
|
565278
565278
|
|
|
565279
565279
|
|
|
565280
565280
|
|
|
@@ -706911,6 +706911,7 @@ beng4
|
|
|
706911
706911
|
ni2
|
|
706912
706912
|
zhi2
|
|
706913
706913
|
hui4
|
|
706914
|
+
pu3
|
|
706914
706915
|
xia4
|
|
706915
706916
|
zhi4
|
|
706916
706917
|
xi1
|
|
@@ -720418,7 +720419,7 @@ di1
|
|
|
720418
720419
|
rou2
|
|
720419
720420
|
suo3
|
|
720420
720421
|
ba4
|
|
720421
|
-
bi1
|
|
720422
|
+
bi1 pi1
|
|
720422
720423
|
shuo4
|
|
720423
720424
|
xiu4
|
|
720424
720425
|
kuan3
|
|
@@ -720733,7 +720734,7 @@ lai4
|
|
|
720733
720734
|
yan2
|
|
720734
720735
|
li4
|
|
720735
720736
|
jian1
|
|
720736
|
-
ou1
|
|
720737
|
+
ou1 ou2,ou3,ou4
|
|
720737
720738
|
zan4
|
|
720738
720739
|
jiao1
|
|
720739
720740
|
zhi4
|
package/data/full.freq
CHANGED
|
Binary file
|
package/data/full.keys
CHANGED
|
@@ -706911,6 +706911,7 @@ e人
|
|
|
706911
706911
|
𡎿
|
|
706912
706912
|
𡏀
|
|
706913
706913
|
𡏁
|
|
706914
|
+
𡏋
|
|
706914
706915
|
𡏘
|
|
706915
706916
|
𡏚
|
|
706916
706917
|
𡏛
|
package/data/manifest.json
CHANGED
|
@@ -5,31 +5,31 @@
|
|
|
5
5
|
"keys": "core.keys",
|
|
6
6
|
"readings": "core.entries",
|
|
7
7
|
"frequencies": "core.freq",
|
|
8
|
-
"bytes":
|
|
9
|
-
"compressedBytes":
|
|
8
|
+
"bytes": 220927,
|
|
9
|
+
"compressedBytes": 71714
|
|
10
10
|
},
|
|
11
11
|
"standard": {
|
|
12
12
|
"entries": 66970,
|
|
13
13
|
"keys": "standard.keys",
|
|
14
14
|
"readings": "standard.entries",
|
|
15
15
|
"frequencies": "standard.freq",
|
|
16
|
-
"bytes":
|
|
17
|
-
"compressedBytes":
|
|
16
|
+
"bytes": 1418887,
|
|
17
|
+
"compressedBytes": 390903
|
|
18
18
|
},
|
|
19
19
|
"full": {
|
|
20
|
-
"entries":
|
|
20
|
+
"entries": 461563,
|
|
21
21
|
"keys": "full.keys",
|
|
22
22
|
"readings": "full.entries",
|
|
23
23
|
"frequencies": "full.freq",
|
|
24
|
-
"bytes":
|
|
25
|
-
"compressedBytes":
|
|
24
|
+
"bytes": 9380232,
|
|
25
|
+
"compressedBytes": 2449826
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"counts": {
|
|
29
29
|
"file": "full.counts",
|
|
30
30
|
"tier": "full",
|
|
31
|
-
"keys":
|
|
32
|
-
"bytes":
|
|
31
|
+
"keys": 723157,
|
|
32
|
+
"bytes": 766852,
|
|
33
33
|
"compressedBytes": 250587
|
|
34
34
|
},
|
|
35
35
|
"script": {
|
package/data/standard.entries
CHANGED
|
@@ -7824,7 +7824,7 @@ juan4 zg
|
|
|
7824
7824
|
zong1 zg
|
|
7825
7825
|
ju4 ag
|
|
7826
7826
|
a
|
|
7827
|
-
qian4 zg
|
|
7827
|
+
qian4 zg qing4
|
|
7828
7828
|
n
|
|
7829
7829
|
ni2 nr p
|
|
7830
7830
|
lun2 ns
|
|
@@ -21325,7 +21325,7 @@ pi2 zg pi4
|
|
|
21325
21325
|
qing1 zg
|
|
21326
21326
|
ju4 zg
|
|
21327
21327
|
kong1 zg
|
|
21328
|
-
tang3 chong3
|
|
21328
|
+
tang3 chong3 shang3
|
|
21329
21329
|
dong1 zg
|
|
21330
21330
|
dai4 zg
|
|
21331
21331
|
tan4 zg
|
|
@@ -25370,7 +25370,7 @@ wei2 zg
|
|
|
25370
25370
|
di4
|
|
25371
25371
|
rou2
|
|
25372
25372
|
mei3
|
|
25373
|
-
ruan3
|
|
25373
|
+
ruan3 nen4
|
|
25374
25374
|
wo4 zg
|
|
25375
25375
|
chun1 zg
|
|
25376
25376
|
miao2
|
|
@@ -35163,7 +35163,7 @@ yi4 you2 wei4 jin4 i
|
|
|
35163
35163
|
n
|
|
35164
35164
|
n
|
|
35165
35165
|
n
|
|
35166
|
-
kai4 zg he4
|
|
35166
|
+
kai4 zg he4,qi4
|
|
35167
35167
|
dang4
|
|
35168
35168
|
yin1 zg
|
|
35169
35169
|
e4 a
|
|
@@ -46333,7 +46333,7 @@ kuo4 zg
|
|
|
46333
46333
|
jing4 zg
|
|
46334
46334
|
po5 zg bo2
|
|
46335
46335
|
fu2 g
|
|
46336
|
-
rui2 zg
|
|
46336
|
+
rui2 zg rui3
|
|
46337
46337
|
tong3 zg
|
|
46338
46338
|
jue2 g
|
|
46339
46339
|
xi1 zg
|
|
@@ -57433,7 +57433,7 @@ ma3 nr
|
|
|
57433
57433
|
nrt
|
|
57434
57434
|
wu3 zg
|
|
57435
57435
|
fu1 zg
|
|
57436
|
-
wen2 zg
|
|
57436
|
+
wen2 zg min2
|
|
57437
57437
|
jie4 zg
|
|
57438
57438
|
ya2 zg
|
|
57439
57439
|
fen1 x bin1
|
|
@@ -65226,7 +65226,7 @@ jian3 piao2 jian3 pu2 a
|
|
|
65226
65226
|
v
|
|
65227
65227
|
a
|
|
65228
65228
|
pou2 zg
|
|
65229
|
-
bi3 bei1
|
|
65229
|
+
bi3 bei1,pai2
|
|
65230
65230
|
bi4 zg
|
|
65231
65231
|
ge4 zg
|
|
65232
65232
|
yu1
|
|
@@ -72777,7 +72777,7 @@ zi4 zg
|
|
|
72777
72777
|
hui4
|
|
72778
72778
|
sui1
|
|
72779
72779
|
xiang1 ns
|
|
72780
|
-
bi3 x
|
|
72780
|
+
bi3 x pi2
|
|
72781
72781
|
fu2 nrt
|
|
72782
72782
|
n
|
|
72783
72783
|
ns
|
|
@@ -74470,7 +74470,7 @@ suan4 n
|
|
|
74470
74470
|
li4 vg
|
|
74471
74471
|
v
|
|
74472
74472
|
ju3 zg
|
|
74473
|
-
bang4
|
|
74473
|
+
bang4 pang2
|
|
74474
74474
|
chu2 zg
|
|
74475
74475
|
huo4
|
|
74476
74476
|
qian4 zg
|
|
@@ -78666,7 +78666,7 @@ an1 v
|
|
|
78666
78666
|
a
|
|
78667
78667
|
xian2
|
|
78668
78668
|
nan2
|
|
78669
|
-
chen2 nr
|
|
78669
|
+
chen2 nr shen4
|
|
78670
78670
|
feng3 feng4 v
|
|
78671
78671
|
feng4 ci4 v
|
|
78672
78672
|
v
|
|
@@ -79995,7 +79995,7 @@ mou2 hua4 n
|
|
|
79995
79995
|
v
|
|
79996
79996
|
i
|
|
79997
79997
|
n
|
|
79998
|
-
chen2 nr
|
|
79998
|
+
chen2 nr shen4
|
|
79999
79999
|
die2 n
|
|
80000
80000
|
n
|
|
80001
80001
|
huang3 ng
|
|
@@ -80331,7 +80331,7 @@ xiu1 x
|
|
|
80331
80331
|
huan2
|
|
80332
80332
|
kun1 zg
|
|
80333
80333
|
he2
|
|
80334
|
-
he2 ng hao2
|
|
80334
|
+
he2 ng hao2,mo4
|
|
80335
80335
|
mo4 g
|
|
80336
80336
|
mao4 ng
|
|
80337
80337
|
i
|
|
@@ -81981,7 +81981,7 @@ zhi3 n
|
|
|
81981
81981
|
ta1 v
|
|
81982
81982
|
yue4
|
|
81983
81983
|
ba4
|
|
81984
|
-
qi2 zg qi4
|
|
81984
|
+
qi2 zg qi4,qi3
|
|
81985
81985
|
yue4 v
|
|
81986
81986
|
v
|
|
81987
81987
|
v
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a 里 standing alone means "in, inside", which 繁體 writes 裡.
|
|
3
|
+
*
|
|
4
|
+
* 里 has two senses that read alike. `lǐ` is the unit of distance and the
|
|
5
|
+
* neighbourhood, written 里 in both scripts (公里, 邻里, 里程, 里长), and `lǐ`
|
|
6
|
+
* is also the locative after a noun, written 裡 (鏡子裡, 房間裡, 冰箱裡). The
|
|
7
|
+
* syllable cannot tell them apart. The character table takes 里 by default,
|
|
8
|
+
* because most of the words that hold 里 are the unit or the neighbourhood.
|
|
9
|
+
* The table converts the locative words it knows (这里, 心里, 家里, 夜里)
|
|
10
|
+
* whole. A 里 the decode leaves as a word of its own has no such word behind
|
|
11
|
+
* it, and is the locative unless a number comes before it: 屋子里 is inside the
|
|
12
|
+
* room, and 走了十里 is ten 里 walked.
|
|
13
|
+
*/
|
|
14
|
+
import type { Dictionary } from "../dictionary/dictionary.js";
|
|
15
|
+
import type { ScriptChoice } from "./script-types.js";
|
|
16
|
+
/**
|
|
17
|
+
* Write 裡 where a 里 standing alone means "in, inside".
|
|
18
|
+
*
|
|
19
|
+
* The character table takes 里 by default, which is right for 公里 and 邻里 and
|
|
20
|
+
* wrote 镜子里 as 鏡子里. A 里 the decode left as a word of its own after a
|
|
21
|
+
* noun is the locative. A number before it makes it the unit, and a
|
|
22
|
+
* transliteration syllable either side makes it part of a name. See
|
|
23
|
+
* {@link isInsideAt}.
|
|
24
|
+
*
|
|
25
|
+
* Only a choice that names 裡 as a rival is touched, which confines this to
|
|
26
|
+
* 简→繁: converting into 简体 has nothing to change 里 into.
|
|
27
|
+
*/
|
|
28
|
+
export declare function writeInside(choices: readonly ScriptChoice[], dictionary: Dictionary, characters: readonly string[], from: number): readonly ScriptChoice[];
|
|
29
|
+
//# sourceMappingURL=li-frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"li-frames.d.ts","sourceRoot":"","sources":["../../src/decode/li-frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAqFtD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,IAAI,EAAE,MAAM,GACX,SAAS,YAAY,EAAE,CAoBzB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { toCharacters } from "../script/characters.js";
|
|
2
|
+
/**
|
|
3
|
+
* The 繁體 form of the locative.
|
|
4
|
+
*/
|
|
5
|
+
const INSIDE = "裡";
|
|
6
|
+
/**
|
|
7
|
+
* What can come before a 里 that counts distance, in both scripts.
|
|
8
|
+
*
|
|
9
|
+
* The numerals, and the words that stand in for one or round it off: 几里,
|
|
10
|
+
* 数里, 十多里, 十来里, 十余里, 半里.
|
|
11
|
+
*/
|
|
12
|
+
const COUNTING = new Set(toCharacters("〇零一二三四五六七八九十百千万萬两兩廿几幾数數多来來余餘半"));
|
|
13
|
+
/**
|
|
14
|
+
* Transliteration syllables that come before a 里 in a foreign name: 克里斯,
|
|
15
|
+
* 加布里埃尔, 德米特里, 鲍里斯, 恩里科, 胡里奥, 齐里.
|
|
16
|
+
*/
|
|
17
|
+
const NAME_BEFORE = new Set(toCharacters("克布特鲍胡恩夏埃尤荷齐弗杰诺莫默奥艾迪阿伊佩塞贝哈帕茨维格"));
|
|
18
|
+
/**
|
|
19
|
+
* Transliteration syllables that come after a 里 in a foreign name: 里玛,
|
|
20
|
+
* 鲍里斯, 胡里奥, 恩里科, 格里菲斯, 斯特里普, 叶里温.
|
|
21
|
+
*/
|
|
22
|
+
const NAME_AFTER = new Set(toCharacters("斯埃玛奥科希约马奇尔亚诺娜莎欧达雅菲普曼温"));
|
|
23
|
+
/**
|
|
24
|
+
* Whether two characters are a word of their own, which the name syllables
|
|
25
|
+
* are not. 坦克里 and 表格里 end in 克 and 格, and 坦克 and 表格 are nouns.
|
|
26
|
+
*/
|
|
27
|
+
function isWord(dictionary, characters) {
|
|
28
|
+
return (characters.length === 2 &&
|
|
29
|
+
dictionary.lookup(characters.join("")) !== undefined);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Whether a 里 sits inside a foreign name, between syllables that make no
|
|
33
|
+
* word with what is either side of them.
|
|
34
|
+
*/
|
|
35
|
+
function isInName(dictionary, characters, at) {
|
|
36
|
+
return ((NAME_BEFORE.has(characters[at - 1]) &&
|
|
37
|
+
!isWord(dictionary, characters.slice(at - 2, at))) ||
|
|
38
|
+
(NAME_AFTER.has(characters[at + 1]) &&
|
|
39
|
+
!isWord(dictionary, characters.slice(at + 1, at + 3))));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Whether the 里 at a position means "in, inside".
|
|
43
|
+
*
|
|
44
|
+
* The caller has already settled that the character is a 里 standing alone.
|
|
45
|
+
* A 里 with nothing before it in the run is left alone, since there is no noun
|
|
46
|
+
* for it to be inside. A run starts after punctuation or any character that is
|
|
47
|
+
* not Han, digits among them, and 5里 is as likely as Facebook里.
|
|
48
|
+
*/
|
|
49
|
+
function isInsideAt(dictionary, characters, at) {
|
|
50
|
+
const before = characters[at - 1];
|
|
51
|
+
return (before !== undefined &&
|
|
52
|
+
!COUNTING.has(before) &&
|
|
53
|
+
!isInName(dictionary, characters, at));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Write 裡 where a 里 standing alone means "in, inside".
|
|
57
|
+
*
|
|
58
|
+
* The character table takes 里 by default, which is right for 公里 and 邻里 and
|
|
59
|
+
* wrote 镜子里 as 鏡子里. A 里 the decode left as a word of its own after a
|
|
60
|
+
* noun is the locative. A number before it makes it the unit, and a
|
|
61
|
+
* transliteration syllable either side makes it part of a name. See
|
|
62
|
+
* {@link isInsideAt}.
|
|
63
|
+
*
|
|
64
|
+
* Only a choice that names 裡 as a rival is touched, which confines this to
|
|
65
|
+
* 简→繁: converting into 简体 has nothing to change 里 into.
|
|
66
|
+
*/
|
|
67
|
+
export function writeInside(choices, dictionary, characters, from) {
|
|
68
|
+
const [choice] = choices;
|
|
69
|
+
if (choices.length !== 1 ||
|
|
70
|
+
choice === undefined ||
|
|
71
|
+
!choice.alternatives.includes(INSIDE) ||
|
|
72
|
+
!isInsideAt(dictionary, characters, from)) {
|
|
73
|
+
return choices;
|
|
74
|
+
}
|
|
75
|
+
return [
|
|
76
|
+
{
|
|
77
|
+
from: choice.from,
|
|
78
|
+
to: INSIDE,
|
|
79
|
+
evidence: "reading",
|
|
80
|
+
alternatives: [choice.to, ...choice.alternatives].filter((form) => form !== INSIDE),
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=li-frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"li-frames.js","sourceRoot":"","sources":["../../src/decode/li-frames.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,CAAC;AAEnB;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CACtB,YAAY,CAAC,+BAA+B,CAAC,CAC9C,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,GAAG,IAAI,GAAG,CACzB,YAAY,CAAC,+BAA+B,CAAC,CAC9C,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,GAAG,IAAI,GAAG,CACxB,YAAY,CAAC,uBAAuB,CAAC,CACtC,CAAC;AAEF;;;GAGG;AACH,SAAS,MAAM,CACb,UAAsB,EACtB,UAA6B;IAE7B,OAAO,CACL,UAAU,CAAC,MAAM,KAAK,CAAC;QACvB,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,SAAS,CACrD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,QAAQ,CACf,UAAsB,EACtB,UAA6B,EAC7B,EAAU;IAEV,OAAO,CACL,CAAC,WAAW,CAAC,G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M,CAAC,YAAY,CAAC,CAAC,MAAM,CACtD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CAC1B;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Revisiting a converted word in the light of the run around it.
|
|
3
|
+
*
|
|
4
|
+
* The character table decides each character alone, and for a few the words
|
|
5
|
+
* either side are what settle it. `script-words` converts a word on its own
|
|
6
|
+
* evidence, and this is what follows it.
|
|
7
|
+
*/
|
|
8
|
+
import type { Dictionary } from "../dictionary/dictionary.js";
|
|
9
|
+
import type { CharacterConversion } from "../script/conversion.js";
|
|
10
|
+
import type { Syllable } from "../syllable/syllable.js";
|
|
11
|
+
import type { ScriptChoice } from "./script-types.js";
|
|
12
|
+
/**
|
|
13
|
+
* What a word in a run is converted against.
|
|
14
|
+
*/
|
|
15
|
+
export interface RunTables {
|
|
16
|
+
readonly dictionary: Dictionary;
|
|
17
|
+
readonly table: ReadonlyMap<string, CharacterConversion>;
|
|
18
|
+
readonly words: ReadonlyMap<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Convert a word, then revisit its choices in the light of the run around it.
|
|
22
|
+
*
|
|
23
|
+
* The character table decides 干 and 里 alone, and a frame around the word can
|
|
24
|
+
* overrule it: 与你无干 keeps 干 and 镜子里 writes 裡. `from` is where the
|
|
25
|
+
* word starts in `characters`, which are the whole run's.
|
|
26
|
+
*/
|
|
27
|
+
export declare function convertInRun(tables: RunTables, word: string, reading: readonly Syllable[], characters: readonly string[], from: number): readonly ScriptChoice[];
|
|
28
|
+
//# sourceMappingURL=script-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-context.d.ts","sourceRoot":"","sources":["../../src/decode/script-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACzD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,QAAQ,EAAE,EAC5B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,IAAI,EAAE,MAAM,GACX,SAAS,YAAY,EAAE,CAUzB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CONCERNING, isConcerningAt, isGan } from "./gan-frames.js";
|
|
2
|
+
import { writeInside } from "./li-frames.js";
|
|
3
|
+
import { convertWord } from "./script-words.js";
|
|
4
|
+
/**
|
|
5
|
+
* Convert a word, then revisit its choices in the light of the run around it.
|
|
6
|
+
*
|
|
7
|
+
* The character table decides 干 and 里 alone, and a frame around the word can
|
|
8
|
+
* overrule it: 与你无干 keeps 干 and 镜子里 writes 裡. `from` is where the
|
|
9
|
+
* word starts in `characters`, which are the whole run's.
|
|
10
|
+
*/
|
|
11
|
+
export function convertInRun(tables, word, reading, characters, from) {
|
|
12
|
+
const converted = convertWord(tables.table, tables.words, word, reading);
|
|
13
|
+
const concerning = keepConcerning(converted, tables.dictionary, characters, from, reading);
|
|
14
|
+
return writeInside(concerning, tables.dictionary, characters, from);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Keep 干 where it means "to concern".
|
|
18
|
+
*
|
|
19
|
+
* 干 read `gān` is 乾 when it means dry (干燥, 干货) and stays 干 when it means
|
|
20
|
+
* to concern (干扰, 相干), and the syllable cannot tell the two apart. A word
|
|
21
|
+
* settles most of them. A 干 standing alone at `gān` fell back on 乾, which
|
|
22
|
+
* wrote 与你无干 as 與你無乾 and 干卿底事 as 乾卿底事. The frames that read
|
|
23
|
+
* it `gān` in the first place are the ones that decide it here. See
|
|
24
|
+
* {@link isConcerningAt}.
|
|
25
|
+
*
|
|
26
|
+
* `from` is where the word starts in `characters`, which are the whole run's,
|
|
27
|
+
* since the frames reach past the word.
|
|
28
|
+
*/
|
|
29
|
+
function keepConcerning(choices, dictionary, characters, from, reading) {
|
|
30
|
+
if (reading.length !== choices.length) {
|
|
31
|
+
return choices;
|
|
32
|
+
}
|
|
33
|
+
return choices.map((choice, at) => choice.from === CONCERNING &&
|
|
34
|
+
choice.to !== CONCERNING &&
|
|
35
|
+
isGan(reading[at]) &&
|
|
36
|
+
isConcerningAt(dictionary, characters, from + at)
|
|
37
|
+
? {
|
|
38
|
+
from: choice.from,
|
|
39
|
+
to: CONCERNING,
|
|
40
|
+
evidence: "reading",
|
|
41
|
+
alternatives: [choice.to, ...choice.alternatives].filter((form) => form !== CONCERNING),
|
|
42
|
+
}
|
|
43
|
+
: choice);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=script-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-context.js","sourceRoot":"","sources":["../../src/decode/script-context.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAYhD;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAiB,EACjB,IAAY,EACZ,OAA4B,EAC5B,UAA6B,EAC7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./script-types.js";
|
|
9
|
-
import type { Dictionary } from "../dictionary/dictionary.js";
|
|
10
9
|
import { type CharacterConversion } from "../script/conversion.js";
|
|
11
10
|
import { type Region } from "../script/glyphs.js";
|
|
12
11
|
import type { Script } from "../script/script.js";
|
|
@@ -23,19 +22,10 @@ export declare function targetOf(target: ScriptTarget): {
|
|
|
23
22
|
*/
|
|
24
23
|
export declare function convertWord(table: ReadonlyMap<string, CharacterConversion>, words: ReadonlyMap<string, string>, word: string, reading: readonly Syllable[]): readonly ScriptChoice[];
|
|
25
24
|
/**
|
|
26
|
-
* Keep
|
|
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.
|
|
25
|
+
* Keep a word as it stands, which is what a text already in the target script
|
|
26
|
+
* needs. Every character is locked, because none of them was in question.
|
|
37
27
|
*/
|
|
38
|
-
export declare function
|
|
28
|
+
export declare function keepWord(word: string): readonly ScriptChoice[];
|
|
39
29
|
/**
|
|
40
30
|
* Rank what settled a character, strongest evidence first.
|
|
41
31
|
*
|
|
@@ -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;AAE3B,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;AAExD;;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;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,YAAY,EAAE,CAO9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,OAAO,EACpB,QAAQ,EAAE,OAAO,GAChB,cAAc,CAQhB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
/**
|
|
6
5
|
* The script and region a target names.
|
|
7
6
|
*/
|
|
@@ -51,33 +50,16 @@ export function convertWord(table, words, word, reading) {
|
|
|
51
50
|
});
|
|
52
51
|
}
|
|
53
52
|
/**
|
|
54
|
-
* Keep
|
|
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.
|
|
53
|
+
* Keep a word as it stands, which is what a text already in the target script
|
|
54
|
+
* needs. Every character is locked, because none of them was in question.
|
|
65
55
|
*/
|
|
66
|
-
export function
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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);
|
|
56
|
+
export function keepWord(word) {
|
|
57
|
+
return toCharacters(word).map((character) => ({
|
|
58
|
+
from: character,
|
|
59
|
+
to: character,
|
|
60
|
+
evidence: "locked",
|
|
61
|
+
alternatives: [],
|
|
62
|
+
}));
|
|
81
63
|
}
|
|
82
64
|
/**
|
|
83
65
|
* Rank what settled a character, strongest evidence first.
|
|
@@ -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"],"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MAAM,CAAC;IAChB,CAAC;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;
|
|
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;AAU5D,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,8 @@ 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 {
|
|
8
|
+
import { convertInRun } from "./script-context.js";
|
|
9
|
+
import { keepWord, targetOf } from "./script-words.js";
|
|
9
10
|
export { SCRIPT_EVIDENCE, SCRIPT_TARGETS, } from "./script-types.js";
|
|
10
11
|
/**
|
|
11
12
|
* Convert a text between the scripts, reporting what it was unsure about.
|
|
@@ -52,7 +53,7 @@ export function toScriptPieces(dictionary, tables, text, options = {}) {
|
|
|
52
53
|
const isAligned = word.reading.length === toCharacters(canonical).length;
|
|
53
54
|
const chosen = applyRegion(isSameScript
|
|
54
55
|
? keepWord(canonical)
|
|
55
|
-
:
|
|
56
|
+
: convertInRun({ dictionary, table, words }, canonical, word.reading, characters, from), word.reading, region, isAligned);
|
|
56
57
|
choices.push(...chosen);
|
|
57
58
|
converted += chosen.map((choice) => choice.to).join("");
|
|
58
59
|
from += toCharacters(word.text).length;
|
|
@@ -60,18 +61,6 @@ export function toScriptPieces(dictionary, tables, text, options = {}) {
|
|
|
60
61
|
}
|
|
61
62
|
return { text: converted, choices };
|
|
62
63
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Keep a word as it stands, which is what a text already in the target script
|
|
65
|
-
* needs. Every character is locked, because none of them was in question.
|
|
66
|
-
*/
|
|
67
|
-
function keepWord(word) {
|
|
68
|
-
return toCharacters(word).map((character) => ({
|
|
69
|
-
from: character,
|
|
70
|
-
to: character,
|
|
71
|
-
evidence: "locked",
|
|
72
|
-
alternatives: [],
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
64
|
/**
|
|
76
65
|
* Convert a text between the scripts. {@link toScriptPieces}, joined.
|
|
77
66
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script.js","sourceRoot":"","sources":["../../src/decode/script.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAA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EAAE,KAAK,EAAE,EAC5B,SAAS,EACT,IAAI,CAAC,OAAO,EACZ,UAAU,EACV,IAAI,CACL,EACL,IAAI,CAAC,OAAO,EACZ,MAAM,EACN,SAAS,CACV,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YACxB,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACxD,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QACzC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CACtB,UAAsB,EACtB,MAAoB,EACpB,IAAY,EACZ,OAAO,GAAkB,EAAE;IAE3B,OAAO,cAAc,CAAC,UAAU,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-readings.d.ts","sourceRoot":"","sources":["../../src/dictionary/reference-readings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;IAC5D,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;CACxD;
|
|
1
|
+
{"version":3,"file":"reference-readings.d.ts","sourceRoot":"","sources":["../../src/dictionary/reference-readings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;IAC5D,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;CACxD;AAwHD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,iBAGhC,CAAC"}
|
|
@@ -17,14 +17,16 @@
|
|
|
17
17
|
* beside its 简体 one, since each has a Unihan entry of its own.
|
|
18
18
|
*
|
|
19
19
|
* Three dialect readings are left out, 不 `dǔn` in 不子, 泽 `duó` in 凌泽 (an
|
|
20
|
-
* icicle) and syllabic 姆 `m
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* icicle) and syllabic 姆 `m̄`, along with the old reading 能 `nài` and the
|
|
21
|
+
* surname reading 扑 `pú`. Each character has one reading otherwise, and a
|
|
22
|
+
* second would mark every free-standing 不, 能 and 扑, every 泽 in a given
|
|
23
|
+
* name and every 姆 in a transliterated one uncertain. 不子 carries its
|
|
24
|
+
* reading as a word. So does 神神道道, the one word that reads 道 as `dāo`.
|
|
23
25
|
*/
|
|
24
26
|
const CHARACTER_READINGS = new Map([
|
|
25
27
|
["咹", ["ǎn"]],
|
|
26
28
|
["㼎", ["báo"]],
|
|
27
|
-
["箄", ["bēi"]],
|
|
29
|
+
["箄", ["bēi", "pái"]],
|
|
28
30
|
["屏", ["bīng"]], // 屏营
|
|
29
31
|
["礤", ["cā"]],
|
|
30
32
|
["倡", ["chāng"]], // 倡优
|
|
@@ -57,7 +59,7 @@ const CHARACTER_READINGS = new Map([
|
|
|
57
59
|
["𣪘", ["guǐ"]],
|
|
58
60
|
["亢", ["háng"]], // the throat, in literary use
|
|
59
61
|
["猲", ["hè"]],
|
|
60
|
-
["愒", ["hè"]],
|
|
62
|
+
["愒", ["hè", "qì"]],
|
|
61
63
|
["沕", ["hū"]],
|
|
62
64
|
["鳠", ["huò"]],
|
|
63
65
|
["鱯", ["huò"]],
|
|
@@ -79,6 +81,24 @@ const CHARACTER_READINGS = new Map([
|
|
|
79
81
|
["𥉳", ["liū"]],
|
|
80
82
|
["蹓", ["liù"]],
|
|
81
83
|
["碌", ["lū"]], // 骨碌碌
|
|
84
|
+
["掹", ["měng"]],
|
|
85
|
+
["䏚", ["miǎo"]], // a term in Chinese medicine
|
|
86
|
+
["玟", ["mín"]], // a stone like jade
|
|
87
|
+
["貉", ["mò"]], // the same as 貊
|
|
88
|
+
["媆", ["nèn"]], // the same as 嫩
|
|
89
|
+
["𫪘", ["óu", "ǒu", "òu"]], // an interjection
|
|
90
|
+
["蒡", ["páng"]], // 蒡葧
|
|
91
|
+
["㾦", ["pēi"]],
|
|
92
|
+
["𫔇", ["pī"]],
|
|
93
|
+
["芘", ["pí"]], // 芘芣
|
|
94
|
+
["𡏋", ["pǔ"]],
|
|
95
|
+
["呇", ["qǐ"]],
|
|
96
|
+
["跂", ["qǐ"]],
|
|
97
|
+
["倩", ["qìng"]], // to ask someone to do something, as in 倩人执笔
|
|
98
|
+
["桵", ["ruǐ"]], // a tree named in ancient texts
|
|
99
|
+
["埫", ["shǎng"]], // the same as 垧
|
|
100
|
+
["谌", ["shèn"]], // a surname
|
|
101
|
+
["諶", ["shèn"]],
|
|
82
102
|
["箵", ["xǐng"]],
|
|
83
103
|
]);
|
|
84
104
|
/**
|
|
@@ -101,6 +121,7 @@ const WORD_READINGS = new Map([
|
|
|
101
121
|
["疙里疙瘩", ["gē", "li", "gē", "dā"]],
|
|
102
122
|
["骨碌碌", ["gū", "lū", "lū"]],
|
|
103
123
|
["骨碌碌地", ["gū", "lū", "lū", "de"]],
|
|
124
|
+
["神神道道", ["shén", "shen", "dāo", "dāo"]],
|
|
104
125
|
]);
|
|
105
126
|
/**
|
|
106
127
|
* The readings the build adds to the sources.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-readings.js","sourceRoot":"","sources":["../../src/dictionary/reference-readings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH
|
|
1
|
+
{"version":3,"file":"reference-readings.js","sourceRoot":"","sources":["../../src/dictionary/reference-readings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH;;;;;;;;;;;;;;;GAeG;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,EAAE,KAAK,CAAC,CAAC;IACrB,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK;IACtB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACb,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK;IACvB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,YAAY;IAC/B,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY;IAC5B,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK;IACrB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACb,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK;IACpB,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,eAAe;IAChC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;IACf,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,yBAAyB;IACjD,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK;IACrB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC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