@kensio/pinyinjs 1.7.5 → 1.7.6

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.
Files changed (89) hide show
  1. package/README.md +128 -123
  2. package/data/full.entries +2595 -2595
  3. package/data/manifest.json +5 -5
  4. package/data/script.map +66 -3
  5. package/dist/decode/chang-context.d.ts +27 -0
  6. package/dist/decode/chang-context.d.ts.map +1 -0
  7. package/dist/decode/chang-context.js +66 -0
  8. package/dist/decode/chang-context.js.map +1 -0
  9. package/dist/decode/chang-rule.d.ts +37 -0
  10. package/dist/decode/chang-rule.d.ts.map +1 -0
  11. package/dist/decode/chang-rule.js +169 -0
  12. package/dist/decode/chang-rule.js.map +1 -0
  13. package/dist/decode/confidence.d.ts +11 -3
  14. package/dist/decode/confidence.d.ts.map +1 -1
  15. package/dist/decode/confidence.js +11 -3
  16. package/dist/decode/confidence.js.map +1 -1
  17. package/dist/decode/convert-pipeline.d.ts.map +1 -1
  18. package/dist/decode/convert-pipeline.js +2 -1
  19. package/dist/decode/convert-pipeline.js.map +1 -1
  20. package/dist/decode/de-rule.d.ts +54 -0
  21. package/dist/decode/de-rule.d.ts.map +1 -0
  22. package/dist/decode/de-rule.js +113 -0
  23. package/dist/decode/de-rule.js.map +1 -0
  24. package/dist/decode/hint-lattice.d.ts.map +1 -1
  25. package/dist/decode/hint-lattice.js +17 -3
  26. package/dist/decode/hint-lattice.js.map +1 -1
  27. package/dist/decode/jiao-rule.d.ts +9 -3
  28. package/dist/decode/jiao-rule.d.ts.map +1 -1
  29. package/dist/decode/jiao-rule.js +44 -5
  30. package/dist/decode/jiao-rule.js.map +1 -1
  31. package/dist/decode/lattice-types.d.ts +27 -8
  32. package/dist/decode/lattice-types.d.ts.map +1 -1
  33. package/dist/decode/lattice-types.js +27 -8
  34. package/dist/decode/lattice-types.js.map +1 -1
  35. package/dist/decode/polyphone-rules.d.ts +7 -27
  36. package/dist/decode/polyphone-rules.d.ts.map +1 -1
  37. package/dist/decode/polyphone-rules.js +7 -155
  38. package/dist/decode/polyphone-rules.js.map +1 -1
  39. package/dist/decode/reading-rules.d.ts +1 -29
  40. package/dist/decode/reading-rules.d.ts.map +1 -1
  41. package/dist/decode/reading-rules.js +4 -69
  42. package/dist/decode/reading-rules.js.map +1 -1
  43. package/dist/decode/run-words.d.ts +17 -0
  44. package/dist/decode/run-words.d.ts.map +1 -0
  45. package/dist/decode/run-words.js +29 -0
  46. package/dist/decode/run-words.js.map +1 -0
  47. package/dist/decode/sandhi-input.d.ts +30 -0
  48. package/dist/decode/sandhi-input.d.ts.map +1 -0
  49. package/dist/decode/sandhi-input.js +35 -0
  50. package/dist/decode/sandhi-input.js.map +1 -0
  51. package/dist/decode/sandhi-tones.d.ts +33 -5
  52. package/dist/decode/sandhi-tones.d.ts.map +1 -1
  53. package/dist/decode/sandhi-tones.js +59 -8
  54. package/dist/decode/sandhi-tones.js.map +1 -1
  55. package/dist/decode/sandhi.d.ts +9 -6
  56. package/dist/decode/sandhi.d.ts.map +1 -1
  57. package/dist/decode/sandhi.js +10 -7
  58. package/dist/decode/sandhi.js.map +1 -1
  59. package/dist/decode/write-run.d.ts +0 -7
  60. package/dist/decode/write-run.d.ts.map +1 -1
  61. package/dist/decode/write-run.js +4 -39
  62. package/dist/decode/write-run.js.map +1 -1
  63. package/dist/dictionary/cedict-senses.d.ts +7 -0
  64. package/dist/dictionary/cedict-senses.d.ts.map +1 -1
  65. package/dist/dictionary/cedict-senses.js +12 -0
  66. package/dist/dictionary/cedict-senses.js.map +1 -1
  67. package/dist/dictionary/constituent-repair.d.ts +36 -0
  68. package/dist/dictionary/constituent-repair.d.ts.map +1 -0
  69. package/dist/dictionary/constituent-repair.js +117 -0
  70. package/dist/dictionary/constituent-repair.js.map +1 -0
  71. package/dist/dictionary/merge-types.d.ts +8 -2
  72. package/dist/dictionary/merge-types.d.ts.map +1 -1
  73. package/dist/dictionary/merge-types.js.map +1 -1
  74. package/dist/dictionary/merge-walk.d.ts +27 -0
  75. package/dist/dictionary/merge-walk.d.ts.map +1 -0
  76. package/dist/dictionary/merge-walk.js +49 -0
  77. package/dist/dictionary/merge-walk.js.map +1 -0
  78. package/dist/dictionary/merge.d.ts +3 -3
  79. package/dist/dictionary/merge.d.ts.map +1 -1
  80. package/dist/dictionary/merge.js +18 -28
  81. package/dist/dictionary/merge.js.map +1 -1
  82. package/dist/dictionary/word-readings.d.ts.map +1 -1
  83. package/dist/dictionary/word-readings.js +3 -0
  84. package/dist/dictionary/word-readings.js.map +1 -1
  85. package/dist/index.d.ts +1 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +1 -1
  88. package/dist/index.js.map +1 -1
  89. package/package.json +2 -2
@@ -21,20 +21,20 @@
21
21
  "keys": "full.keys",
22
22
  "readings": "full.entries",
23
23
  "frequencies": "full.freq",
24
- "bytes": 9113585,
25
- "compressedBytes": 2396367
24
+ "bytes": 9140884,
25
+ "compressedBytes": 2401549
26
26
  }
27
27
  },
28
28
  "script": {
29
29
  "file": "script.map",
30
30
  "toTraditional": 5944,
31
31
  "toSimplified": 6117,
32
- "traditionalWords": 2327,
32
+ "traditionalWords": 2390,
33
33
  "simplifiedWords": 849,
34
34
  "hansOnly": 5785,
35
35
  "hantOnly": 5497,
36
- "bytes": 291502,
37
- "compressedBytes": 100003
36
+ "bytes": 292980,
37
+ "compressedBytes": 100301
38
38
  },
39
39
  "sources": [
40
40
  "https://www.unicode.org/Public/UCD/latest/ucd/Unihan.zip",
package/data/script.map CHANGED
@@ -273,7 +273,7 @@ t 艺 藝
273
273
  t 担 擔
274
274
  t 卧 臥
275
275
  t 卷 卷 捲
276
- t 历 歷 li5=曆
276
+ t 历 歷 曆
277
277
  t 厢 廂
278
278
  t 愿 願
279
279
  t 踪 蹤
@@ -521,7 +521,7 @@ t 篑 簣
521
521
  t 类 類
522
522
  t 护 護
523
523
  t 坏 壞
524
- t 系 系 xi5=係,ji4=繫
524
+ t 系 系 ji4=繫 係
525
525
  t 纠 糾
526
526
  t 纯 純
527
527
  t 络 絡
@@ -643,7 +643,7 @@ t 裤 褲
643
643
  t 钢 鋼
644
644
  t 镐 鎬
645
645
  t 宁 寧
646
- t 辟 闢 bi4=辟
646
+ t 辟 闢 辟
647
647
  t 栎 櫟
648
648
  t 珰 璫
649
649
  t 税 稅
@@ -12071,6 +12071,7 @@ w 一箭双雕 一箭雙鵰
12071
12071
  w 一见钟情 一見鍾情
12072
12072
  w 丁丁炒面 丁丁炒麵
12073
12073
  w 丁丑 丁丑
12074
+ w 丁巳复辟 丁巳復辟
12074
12075
  w 丁零当啷 丁零噹啷
12075
12076
  w 万事俱备,只欠东风 萬事俱備,只欠東風
12076
12077
  w 万历 萬曆
@@ -12102,12 +12103,14 @@ w 不法分子 不法份子
12102
12103
  w 不相干 不相干
12103
12104
  w 不知就里 不知就裡
12104
12105
  w 不知所云 不知所云
12106
+ w 不辟斧钺 不辟斧鉞
12105
12107
  w 不锈钢 不銹鋼
12106
12108
  w 丑时 丑時
12107
12109
  w 丑牛 丑牛
12108
12110
  w 丑角 丑角
12109
12111
  w 丑鸭 丑鴨
12110
12112
  w 世上无难事,只怕有心人 世上無難事,只怕有心人
12113
+ w 世辟 世辟
12111
12114
  w 丛冢 叢冢
12112
12115
  w 东台 東台
12113
12116
  w 东台市 東台市
@@ -12258,8 +12261,12 @@ w 公布栏 公佈欄
12258
12261
  w 共轭复数 共軛複數
12259
12262
  w 关云长 關云長
12260
12263
  w 关征 關征
12264
+ w 关系 關係
12265
+ w 关系代名词 關係代名詞
12261
12266
  w 关系到 關係到
12262
12267
  w 关系式 關係式
12268
+ w 关系户 關係戶
12269
+ w 关系网 關係網
12263
12270
  w 兴冲冲 興沖沖
12264
12271
  w 兴高采烈 興高采烈
12265
12272
  w 兼并 兼併
@@ -12369,6 +12376,9 @@ w 划痕 劃痕
12369
12376
  w 划破 劃破
12370
12377
  w 划过 劃過
12371
12378
  w 列别杰夫 列別傑夫
12379
+ w 利害关系 利害關係
12380
+ w 利害关系人 利害關係人
12381
+ w 利害关系方 利害關係方
12372
12382
  w 利欲 利慾
12373
12383
  w 利欲心 利慾心
12374
12384
  w 利欲熏心 利慾薰心
@@ -12417,6 +12427,9 @@ w 制陶工人 製陶工人
12417
12427
  w 制鞋匠 製鞋匠
12418
12428
  w 制鞋工人 製鞋工人
12419
12429
  w 前车之鉴 前車之鑑
12430
+ w 割舍了 割舍了
12431
+ w 割舍得 割舍得
12432
+ w 割舍的 割舍的
12420
12433
  w 力争上游 力爭上游
12421
12434
  w 力征 力征
12422
12435
  w 动荡 動盪
@@ -12518,6 +12531,7 @@ w 发夹 髮夾
12518
12531
  w 发小儿 髮小兒
12519
12532
  w 发布 發佈
12520
12533
  w 发布会 發佈會
12534
+ w 发生关系 發生關係
12521
12535
  w 发面 發麵
12522
12536
  w 受托 受託
12523
12537
  w 受托人 受託人
@@ -12533,6 +12547,7 @@ w 只要功夫深,铁杵磨成针 只要功夫深,鐵杵磨成針
12533
12547
  w 只见树木,不见森林 只見樹木,不見森林
12534
12548
  w 只言片语 只言片語
12535
12549
  w 只许州官放火,不许百姓点灯 只許州官放火,不許百姓點燈
12550
+ w 只读存储器 隻讀存儲器
12536
12551
  w 叮叮当当 叮叮噹噹
12537
12552
  w 叮当 叮噹
12538
12553
  w 叮当响 叮噹響
@@ -12796,6 +12811,7 @@ w 复合母音 複合母音
12796
12811
  w 复合肥 複合肥
12797
12812
  w 复合词 複合詞
12798
12813
  w 复听 複聽
12814
+ w 复子明辟 復子明辟
12799
12815
  w 复平面 複平面
12800
12816
  w 复式 複式
12801
12817
  w 复数 複數
@@ -12820,6 +12836,7 @@ w 复词 複詞
12820
12836
  w 复试 複試
12821
12837
  w 复购 複購
12822
12838
  w 复赛 複賽
12839
+ w 复辟 復辟
12823
12840
  w 复迭 複迭
12824
12841
  w 复述 複述
12825
12842
  w 复选框 複選框
@@ -12949,6 +12966,7 @@ w 尸罗 尸羅
12949
12966
  w 尼采 尼采
12950
12967
  w 尼龙搭扣 尼龍搭釦
12951
12968
  w 尾注 尾註
12969
+ w 尾随不舍 尾隨不舍
12952
12970
  w 局促 侷促
12953
12971
  w 局限 侷限
12954
12972
  w 层岩 層巖
@@ -13054,6 +13072,7 @@ w 开杆 開杆
13054
13072
  w 开炮 開砲
13055
13073
  w 开诚布公 開誠佈公
13056
13074
  w 引以为鉴 引以為鑑
13075
+ w 张勋复辟 張勳復辟
13057
13076
  w 弥漫星云 瀰漫星雲
13058
13077
  w 弩炮 弩砲
13059
13078
  w 弯管面 彎管麵
@@ -13094,6 +13113,7 @@ w 征程 征程
13094
13113
  w 征衣 征衣
13095
13114
  w 征衫 征衫
13096
13115
  w 征讨 征討
13116
+ w 征辟 徵辟
13097
13117
  w 征途 征途
13098
13118
  w 征马 征馬
13099
13119
  w 征驾 征駕
@@ -13127,6 +13147,7 @@ w 怀里 懷裡
13127
13147
  w 怒冲冲 怒沖沖
13128
13148
  w 怒气冲冲 怒氣沖沖
13129
13149
  w 性伙伴 性夥伴
13150
+ w 性关系 性關係
13130
13151
  w 性欲 性慾
13131
13152
  w 性欲高潮 性慾高潮
13132
13153
  w 怨气冲天 怨氣沖天
@@ -13270,9 +13291,11 @@ w 撒马尔干 撒馬爾干
13270
13291
  w 撤并 撤併
13271
13292
  w 擀面杖 擀麵杖
13272
13293
  w 操作台 操作台
13294
+ w 攘辟 攘辟
13273
13295
  w 支努干 支努干
13274
13296
  w 收获节 收穫節
13275
13297
  w 收银台 收銀台
13298
+ w 改善关系 改善關係
13276
13299
  w 攻占 攻占
13277
13300
  w 放在眼里 放在眼裡
13278
13301
  w 放松 放鬆
@@ -13312,12 +13335,14 @@ w 无干 無干
13312
13335
  w 无筋面粉 無筋麵粉
13313
13336
  w 无精打采 無精打采
13314
13337
  w 无须 無須
13338
+ w 日佣人 日佣人
13315
13339
  w 日历 日曆
13316
13340
  w 日志 日誌
13317
13341
  w 日本国志 日本國誌
13318
13342
  w 日里 日裡
13319
13343
  w 旧历 舊曆
13320
13344
  w 旧历年 舊曆年
13345
+ w 旧皇历 舊皇曆
13321
13346
  w 昆仑 崑崙
13322
13347
  w 昆仑山 崑崙山
13323
13348
  w 昆仑山脉 崑崙山脈
@@ -13328,6 +13353,7 @@ w 昆山市 崑山市
13328
13353
  w 昆曲 崑曲
13329
13354
  w 昆腔 崑腔
13330
13355
  w 明窗净几 明窗淨几
13356
+ w 明辟 明辟
13331
13357
  w 明里暗里 明裡暗裡
13332
13358
  w 星历 星曆
13333
13359
  w 春光乍泄 春光乍泄
@@ -13478,6 +13504,8 @@ w 沉淀 沈澱
13478
13504
  w 沉溺 沈溺
13479
13505
  w 沉鱼落雁 沈魚落雁
13480
13506
  w 沙坪坝 沙坪垻
13507
+ w 没关系 沒關係
13508
+ w 没有关系 沒有關係
13481
13509
  w 没精打采 沒精打采
13482
13510
  w 河涌 河涌
13483
13511
  w 油泼扯面 油潑扯麵
@@ -13521,9 +13549,11 @@ w 流里流气 流裡流氣
13521
13549
  w 测杆 測杆
13522
13550
  w 浑仪注 渾儀註
13523
13551
  w 浓郁 濃郁
13552
+ w 浙江天台县 浙江天臺縣
13524
13553
  w 浮游 浮游
13525
13554
  w 浮游生物 浮游生物
13526
13555
  w 海于格松 海于格松
13556
+ w 海峡两岸关系协会 海峽兩岸關係協會
13527
13557
  w 海淀 海淀
13528
13558
  w 海淀区 海淀區
13529
13559
  w 海淀图书城 海淀圖書城
@@ -13657,6 +13687,7 @@ w 生态环境游 生態環境游
13657
13687
  w 生物制剂 生物製劑
13658
13688
  w 生物制品 生物製品
13659
13689
  w 生面团 生麵糰
13690
+ w 用尽地 用儘地
13660
13691
  w 由表及里 由表及裡
13661
13692
  w 电子表 電子錶
13662
13693
  w 电影制作 電影製作
@@ -13686,7 +13717,9 @@ w 白腹隼雕 白腹隼鵰
13686
13717
  w 白面 白麵
13687
13718
  w 白面儿 白麵兒
13688
13719
  w 百谷 百穀
13720
+ w 百辟 百辟
13689
13721
  w 百里挑一 百裡挑一
13722
+ w 皇历 皇曆
13690
13723
  w 皇后 皇后
13691
13724
  w 皇后区 皇后區
13692
13725
  w 皇后镇 皇后鎮
@@ -13719,6 +13752,7 @@ w 瞈蒙 瞈矇
13719
13752
  w 矢志 矢誌
13720
13753
  w 知识分子 知識份子
13721
13754
  w 矬子里拔将军 矬子裡拔將軍
13755
+ w 短发地 短發地
13722
13756
  w 短趾雕 短趾鵰
13723
13757
  w 矮子里拔将军 矮子裡拔將軍
13724
13758
  w 石台 石台
@@ -13730,6 +13764,7 @@ w 砚台 硯臺
13730
13764
  w 砷制剂 砷製劑
13731
13765
  w 碑志 碑誌
13732
13766
  w 碱水面包 鹼水麵包
13767
+ w 磁流体发电 磁流體髮電
13733
13768
  w 磁轨炮 磁軌砲
13734
13769
  w 磨制石器 磨製石器
13735
13770
  w 示复 示覆
@@ -13754,6 +13789,10 @@ w 禾谷 禾穀
13754
13789
  w 秃发 禿發
13755
13790
  w 秋千 鞦韆
13756
13791
  w 秋征 秋征
13792
+ w 科斗书 科鬥書
13793
+ w 科斗字 科鬥字
13794
+ w 科斗筯 科鬥筯
13795
+ w 科斗籍 科鬥籍
13757
13796
  w 秕谷 秕穀
13758
13797
  w 秘传 祕傳
13759
13798
  w 秘制 秘製
@@ -13810,6 +13849,7 @@ w 系囚 繫囚
13810
13849
  w 系放 繫放
13811
13850
  w 系数 係數
13812
13851
  w 素朴 素樸
13852
+ w 紧跟不舍 緊跟不舍
13813
13853
  w 紫云苗族布依族自治县 紫云苗族布依族自治縣
13814
13854
  w 紫金山天文台 紫金山天文台
13815
13855
  w 繁复 繁複
@@ -13845,6 +13885,7 @@ w 美中台 美中台
13845
13885
  w 美体小铺 美體小舖
13846
13886
  w 美制 美製
13847
13887
  w 美国存托凭证 美國存託憑證
13888
+ w 群辟 群辟
13848
13889
  w 羽状复叶 羽狀複葉
13849
13890
  w 翻老皇历 翻老皇曆
13850
13891
  w 老家伙 老傢伙
@@ -13871,6 +13912,7 @@ w 肉汤面 肉湯麵
13871
13912
  w 肉烂在锅里 肉爛在鍋裡
13872
13913
  w 肌肉松弛剂 肌肉鬆弛劑
13873
13914
  w 股栗 股慄
13915
+ w 肮脏气 骯臟氣
13874
13916
  w 肺炎霉浆菌 肺炎黴漿菌
13875
13917
  w 背债 揹債
13876
13918
  w 背地里 背地裡
@@ -13883,6 +13925,7 @@ w 胡茬 鬍茬
13883
13925
  w 胡须 鬍鬚
13884
13926
  w 胡髭 鬍髭
13885
13927
  w 脆谷乐 脆穀樂
13928
+ w 脏躁症 髒躁症
13886
13929
  w 脑力激荡 腦力激盪
13887
13930
  w 脑震荡 腦震盪
13888
13931
  w 脱肛 脫疘
@@ -13900,6 +13943,7 @@ w 臭熏熏 臭燻燻
13900
13943
  w 致密 緻密
13901
13944
  w 臾须 臾須
13902
13945
  w 舍得一身剐,敢把皇帝拉下马 捨得一身剮,敢把皇帝拉下馬
13946
+ w 舍身饲虎 舍身飼虎
13903
13947
  w 舍车保帅 捨車保帥
13904
13948
  w 舒卷 舒捲
13905
13949
  w 舞娘 舞孃
@@ -13996,6 +14040,7 @@ w 表针 錶針
13996
14040
  w 衬里 襯裡
13997
14041
  w 袁于令 袁于令
13998
14042
  w 裁制 裁製
14043
+ w 裙带关系 裙帶關係
13999
14044
  w 褟绦子 褟縧子
14000
14045
  w 西历 西曆
14001
14046
  w 西岳 西嶽
@@ -14078,6 +14123,8 @@ w 赞誉 讚譽
14078
14123
  w 赞许 讚許
14079
14124
  w 赞赏 讚賞
14080
14125
  w 赞颂 讚頌
14126
+ w 起根发脚 起根發腳
14127
+ w 超友谊关系 超友誼關係
14081
14128
  w 趋吉避凶 趨吉避凶
14082
14129
  w 跋杯 跋桮
14083
14130
  w 跑表 跑錶
@@ -14086,6 +14133,7 @@ w 跳梁小丑 跳梁小丑
14086
14133
  w 躲清闲 躲清閑
14087
14134
  w 车厘子 車厘子
14088
14135
  w 轧制 軋製
14136
+ w 转关系 轉關係
14089
14137
  w 转制 轉製
14090
14138
  w 转台 轉台
14091
14139
  w 转车台 轉車台
@@ -14097,7 +14145,16 @@ w 轮奸 輪姦
14097
14145
  w 轻松 輕鬆
14098
14146
  w 辛丑 辛丑
14099
14147
  w 辛丑条约 辛丑條約
14148
+ w 辟举 辟舉
14149
+ w 辟书 辟書
14150
+ w 辟召 辟召
14151
+ w 辟吏 辟吏
14152
+ w 辟引 辟引
14153
+ w 辟纑 辟纑
14154
+ w 辟言 辟言
14100
14155
  w 辟谷 辟穀
14156
+ w 辟邪 辟邪
14157
+ w 辟雍 辟雍
14101
14158
  w 辟雍砚 辟雍硯
14102
14159
  w 边反卷地 邊反捲地
14103
14160
  w 辽沈战役 遼瀋戰役
@@ -14110,6 +14167,7 @@ w 连三并四 連三併四
14110
14167
  w 连珠炮 連珠砲
14111
14168
  w 连系 連繫
14112
14169
  w 连系词 連繫詞
14170
+ w 连辟公府不就 連辟公府不就
14113
14171
  w 迷奸 迷姦
14114
14172
  w 迷蒙 迷濛
14115
14173
  w 选美皇后 選美皇后
@@ -14318,7 +14376,10 @@ w 面馆 麵館
14318
14376
  w 革制品 革製品
14319
14377
  w 靴隼雕 靴隼鵰
14320
14378
  w 鞣制 鞣製
14379
+ w 鞭辟 鞭辟
14321
14380
  w 鞭辟入里 鞭闢入裡
14381
+ w 鞭辟向里 鞭辟向里
14382
+ w 鞭辟着里 鞭辟著里
14322
14383
  w 韬戈卷甲 韜戈捲甲
14323
14384
  w 韵致 韻緻
14324
14385
  w 页签 頁籤
@@ -14360,6 +14421,7 @@ w 骨坛 骨罈
14360
14421
  w 骨子里 骨子裡
14361
14422
  w 骨质疏松 骨質疏鬆
14362
14423
  w 骨质疏松症 骨質疏鬆症
14424
+ w 骯脏气 骯臟氣
14363
14425
  w 骰钟 骰鍾
14364
14426
  w 高台 高台
14365
14427
  w 高台县 高台縣
@@ -14374,6 +14436,7 @@ w 鸡蛋里挑骨头 雞蛋裡挑骨頭
14374
14436
  w 鹊巢鸠占 鵲巢鳩占
14375
14437
  w 麸皮面包 麩皮麵包
14376
14438
  w 麻雀虽小,五脏俱全 麻雀雖小,五臟俱全
14439
+ w 黄历 黃曆
14377
14440
  w 黄金周 黃金週
14378
14441
  w 黄钟毁弃瓦釜雷鸣 黃鐘譭棄瓦釜雷鳴
14379
14442
  w 黑嘴松鸡 黑嘴鬆雞
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The two 长 contexts a degree adverb does not cover.
3
+ *
4
+ * 很 or 太 in front of a 长 settles it on its own, and `chang-rule.ts` says why.
5
+ * These two do not: each names a near side that a verb 长 shares, so each has
6
+ * to check the far side as well.
7
+ */
8
+ import { type EdgeContext } from "./rules.js";
9
+ /**
10
+ * Whether a 长 is the whole of what an adverb is scoping.
11
+ *
12
+ * 那座桥不长, 生得又瘦又长, 距离还长. The adverb is the near side and the end of
13
+ * the clause is the far side, and it takes both: 不长 alone is 不长在耳朵外面
14
+ * as readily as it is 不长.
15
+ */
16
+ export declare function isPredicated(context: EdgeContext): boolean;
17
+ /**
18
+ * Whether a 长 is an adjective in front of the noun it modifies.
19
+ *
20
+ * 长头发, 长耳朵, 长胡子, 长裙子. The noun after it says nothing on its own,
21
+ * since 长毛 and 长知识 are a verb and its object wearing the same shape, so the
22
+ * near side has to say the rest. A 量词 or 有 in front of a 长 leaves it nothing
23
+ * to be the verb of: 一个长头发的女生 and 兔子有长耳朵 have their subject
24
+ * already spoken for, and 他长毛了 and 树长叶子 do not.
25
+ */
26
+ export declare function isAttributive(context: EdgeContext): boolean;
27
+ //# sourceMappingURL=chang-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chang-context.d.ts","sourceRoot":"","sources":["../../src/decode/chang-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,KAAK,WAAW,EAIjB,MAAM,YAAY,CAAC;AAqBpB;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAO1D;AAYD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAO3D"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The two 长 contexts a degree adverb does not cover.
3
+ *
4
+ * 很 or 太 in front of a 长 settles it on its own, and `chang-rule.ts` says why.
5
+ * These two do not: each names a near side that a verb 长 shares, so each has
6
+ * to check the far side as well.
7
+ */
8
+ import { tagOf, wordEndingAt, wordStartingAt, } from "./rules.js";
9
+ /**
10
+ * The adverbs {@link DEGREE} leaves out, because they scope a verb just as well.
11
+ *
12
+ * 那座桥不长 and 距离还长 are both `cháng`, and the degree set says why it will
13
+ * not have them: 胡子不长在前额上 and 还长有毛 put the
14
+ * same two characters around the verb. What tells the two apart is the other
15
+ * side. A growing 长 governs something — 在前额上, 有毛, 一个包 — while the
16
+ * adjective has nothing left to say, so the clause ends.
17
+ */
18
+ const SCOPING = new Set(["不", "还", "還", "又", "已经", "已經"]);
19
+ /**
20
+ * What may stand between a predicative 长 and the end of its clause.
21
+ *
22
+ * Only the particles that close one. Everything a verb could govern is
23
+ * therefore excluded by construction, which is the whole of the test.
24
+ */
25
+ const CLOSING = new Set(["了", "的", "呢", "吗", "嗎", "啊", "呀"]);
26
+ /**
27
+ * Whether a 长 is the whole of what an adverb is scoping.
28
+ *
29
+ * 那座桥不长, 生得又瘦又长, 距离还长. The adverb is the near side and the end of
30
+ * the clause is the far side, and it takes both: 不长 alone is 不长在耳朵外面
31
+ * as readily as it is 不长.
32
+ */
33
+ export function isPredicated(context) {
34
+ const { characters, edge } = context;
35
+ if (!SCOPING.has(characters[edge.from - 1] ?? "")) {
36
+ return false;
37
+ }
38
+ const after = characters[edge.to];
39
+ return after === undefined || CLOSING.has(after);
40
+ }
41
+ /**
42
+ * The tag jieba gives a 量词.
43
+ */
44
+ const MEASURE = "q";
45
+ /**
46
+ * The tag prefix a noun carries, which is what an attributive 长 modifies.
47
+ */
48
+ const NOUN_TAG = "n";
49
+ /**
50
+ * Whether a 长 is an adjective in front of the noun it modifies.
51
+ *
52
+ * 长头发, 长耳朵, 长胡子, 长裙子. The noun after it says nothing on its own,
53
+ * since 长毛 and 长知识 are a verb and its object wearing the same shape, so the
54
+ * near side has to say the rest. A 量词 or 有 in front of a 长 leaves it nothing
55
+ * to be the verb of: 一个长头发的女生 and 兔子有长耳朵 have their subject
56
+ * already spoken for, and 他长毛了 and 树长叶子 do not.
57
+ */
58
+ export function isAttributive(context) {
59
+ const { edge } = context;
60
+ if (!tagOf(context, wordStartingAt(context, edge.to)).startsWith(NOUN_TAG)) {
61
+ return false;
62
+ }
63
+ const before = wordEndingAt(context, edge.from);
64
+ return before === "有" || tagOf(context, before) === MEASURE;
65
+ }
66
+ //# sourceMappingURL=chang-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chang-context.js","sourceRoot":"","sources":["../../src/decode/chang-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAEL,KAAK,EACL,YAAY,EACZ,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB;;;;;;;;GAQG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,OAAoB;IAC/C,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACrC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QAClD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClC,OAAO,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,GAAG,GAAG,CAAC;AAEpB;;GAEG;AACH,MAAM,QAAQ,GAAG,GAAG,CAAC;AAErB;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,OAAoB;IAChD,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACzB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3E,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,OAAO,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { type EdgeRule } from "./rules.js";
2
+ /**
3
+ * 长 read as `cháng` where an adverb of degree measures it.
4
+ *
5
+ * The character is stored `zhǎng` with `cháng` as an alternate, and the data
6
+ * says so about the character in isolation: Unihan ranks the readings
7
+ * `zhǎng(1879) cháng(1179)` by corpus count and names `zhǎng` in `kMandarin`.
8
+ * That ranking is doing real work — 署长, 团长, 公安局长, 总会长, 审理长 and
9
+ * the rest reach a bare 长 at the end of a title and read it correctly — so the
10
+ * default is not the thing to change. What is left over is the 长 that is an
11
+ * adjective, and nothing in the cost model can prefer an alternate at a
12
+ * position no word covers: 这篇文章不太长 came out `bú tài zhǎng`.
13
+ *
14
+ * Three contexts settle it, and the first of them needs only one side. A 长
15
+ * that is *growing* is a verb, and a degree adverb cannot modify one — there is
16
+ * no 很长 meaning it grew a lot — so 很, 太, 最, 多 and their kin in front of a
17
+ * bare 长 make it the adjective whatever follows. {@link DEGREE} is that set.
18
+ *
19
+ * The other two need both sides, and they are in `chang-context.ts`:
20
+ * {@link isPredicated} for 那座桥不长, {@link isAttributive} for 他有长头发.
21
+ * What they have in common is that the near side alone would be wrong. 不长 is
22
+ * 不长在耳朵外面 as readily as it is 不长, and a noun after a 长 is 长知识 as
23
+ * readily as 长头发.
24
+ *
25
+ * Measured over the same 88,866 lines of Tatoeba and zh.wikipedia the other
26
+ * rules were sized against, 260 长 decode as a word of their own. The degree
27
+ * adverbs move 75 of them to `cháng`, all 75 correctly; the two contexts added
28
+ * since move 8 more, also all correct — 那座桥不长, 生命不长, 射程不长, 还长,
29
+ * 生得又瘦又长, 他有长头发, 兔子有长耳朵 and 那位长胡子德国人. On CPP's 40
30
+ * hand-labelled 长 the character stands at 90.00%, against 85.00% with no rule
31
+ * and 87.50% with the degree adverbs alone.
32
+ *
33
+ * The last piece is {@link GROWN_INTO}, which pushes the opposite way on the one
34
+ * shape the sources get wrong.
35
+ */
36
+ export declare const ADJECTIVAL_CHANG: EdgeRule;
37
+ //# sourceMappingURL=chang-rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chang-rule.d.ts","sourceRoot":"","sources":["../../src/decode/chang-rule.ts"],"names":[],"mappings":"AASA,OAAO,EAAoB,KAAK,QAAQ,EAAgB,MAAM,YAAY,CAAC;AA2H3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAmB9B,CAAC"}
@@ -0,0 +1,169 @@
1
+ import { isAttributive, isPredicated } from "./chang-context.js";
2
+ import { wordEndingAt } from "./rules.js";
3
+ /**
4
+ * Whether a syllable is `cháng`, the stative reading of 长.
5
+ */
6
+ function isChang(syllable) {
7
+ return (syllable?.initial === "ch" &&
8
+ syllable.final === "ang" &&
9
+ syllable.tone === 2);
10
+ }
11
+ /**
12
+ * Adverbs that measure a quality rather than modify an action.
13
+ *
14
+ * The discriminating side of the 长 context, and the reason the set is written
15
+ * out rather than taken from a tag: jieba calls 很 `zg` and 多 `m`, so the two
16
+ * commonest members are not adverbs as far as the dictionary is concerned,
17
+ * while 已经, 也, 却 and 就 — which sit in front of the *verb* 长 — are `d`
18
+ * along with the ones wanted here. The tag names the wrong set in both
19
+ * directions, so the set is named directly.
20
+ *
21
+ * Everything here is degree or comparison. 还 and 不 are deliberately absent
22
+ * even though 距离还长 and 那座桥不长 are both `cháng`: they modify verbs as
23
+ * readily as qualities, and 还长有毛 and 胡子不长在前额上 are the same two
24
+ * characters around the verb.
25
+ */
26
+ const DEGREE = new Set([
27
+ "一样",
28
+ "十分",
29
+ "多",
30
+ "多么",
31
+ "好",
32
+ "如此",
33
+ "尽量",
34
+ "很",
35
+ "格外",
36
+ "极",
37
+ "极其",
38
+ "比较",
39
+ "略",
40
+ "相当",
41
+ "真",
42
+ "稍",
43
+ "稍微",
44
+ "越",
45
+ "越来越",
46
+ "这么",
47
+ "这样",
48
+ "那么",
49
+ "那样",
50
+ "更",
51
+ "最",
52
+ "有多",
53
+ "特别",
54
+ "老",
55
+ "够",
56
+ "挺",
57
+ "太",
58
+ "非常",
59
+ ]);
60
+ /**
61
+ * What shows a 长 to be growing even with a degree word in front of it.
62
+ *
63
+ * {@link DEGREE} already excludes nearly everything that precedes the verb, so
64
+ * this only has to settle the three shapes reachable from both sets: 真长得很快
65
+ * and 越长得快, where 得 marks the complement; 长着, where the aspect does; and
66
+ * 越长越高, where the correlative makes the 长 the thing that increases.
67
+ *
68
+ * 了 and 的 are pointedly *not* here, and that is the whole use of conditioning
69
+ * on the adverb first. Following a bare 长 either would suggest the verb — 长了
70
+ * 一个大包, 长的很像 — but following an adverb and a 长 they are the sentence
71
+ * particle and the attributive: 时间太长了 and 很长的道路 are both `cháng`, and
72
+ * an earlier draft of this rule that guarded on them read both as `zhǎng`.
73
+ */
74
+ const GROWING = new Set(["得", "着", "越"]);
75
+ /**
76
+ * What growing produces, as the far half of 越长越X.
77
+ *
78
+ * 越长越高, 越长越大, 越长越胖: each names a dimension that increases *because*
79
+ * something grew, so the 长 in front of it is the verb. The adjectives that go
80
+ * with a length or a duration are pointedly absent — 时间越长越好, 队伍越长越慢
81
+ * — because those are the cases the sources already read correctly.
82
+ */
83
+ const GROWN_INTO = new Set(["高", "大", "胖", "壮", "结实"]);
84
+ /**
85
+ * Whether an edge is the 越长 of a 越长越X saying something grew.
86
+ *
87
+ * This exists because of a defect in the sources rather than a gap in them.
88
+ * 越长 is a key, read `yuè cháng`, and it is the *only* one of its shape: 越大,
89
+ * 越高, 越好, 越快 and 越多 are all absent, so 越高越好 decodes as two words and
90
+ * 越长越高 reaches for a word nothing else in the paradigm has. It carries no
91
+ * part of speech, which is how the dictionary holds a reading somebody asserted
92
+ * rather than a word anybody counted — the same category {@link TEACHING_JIAO}
93
+ * declines to trust — and it comes from one source, `large_pinyin.txt`, with
94
+ * CC-CEDICT holding no such entry.
95
+ *
96
+ * Taking the edge away leaves the character's own default, which is `zhǎng`,
97
+ * and leaves `cháng` standing as a rival about one bucket dearer. That last
98
+ * part is the point of forbidding rather than forcing: 越长越X is genuinely
99
+ * ambiguous — 孩子越长越漂亮 grows and 头发越长越漂亮 lengthens, and only the
100
+ * subject says which — so the decode should answer with the likelier reading
101
+ * and still report itself as guessing. A forced edge could not.
102
+ *
103
+ * Unlike the rest of this file the shape has no corpus behind it: 越长 occurs
104
+ * three times in the 88,866 lines, and all three are 越来越长 or 说的越长. The
105
+ * word list is therefore small on purpose, and everything outside it is left as
106
+ * the sources have it.
107
+ */
108
+ function isGrowthCorrelative(context) {
109
+ const { characters, edge } = context;
110
+ return (edge.text === "越长" &&
111
+ edge.partOfSpeech === "" &&
112
+ characters[edge.to] === "越" &&
113
+ GROWN_INTO.has(characters[edge.to + 1] ?? ""));
114
+ }
115
+ /**
116
+ * 长 read as `cháng` where an adverb of degree measures it.
117
+ *
118
+ * The character is stored `zhǎng` with `cháng` as an alternate, and the data
119
+ * says so about the character in isolation: Unihan ranks the readings
120
+ * `zhǎng(1879) cháng(1179)` by corpus count and names `zhǎng` in `kMandarin`.
121
+ * That ranking is doing real work — 署长, 团长, 公安局长, 总会长, 审理长 and
122
+ * the rest reach a bare 长 at the end of a title and read it correctly — so the
123
+ * default is not the thing to change. What is left over is the 长 that is an
124
+ * adjective, and nothing in the cost model can prefer an alternate at a
125
+ * position no word covers: 这篇文章不太长 came out `bú tài zhǎng`.
126
+ *
127
+ * Three contexts settle it, and the first of them needs only one side. A 长
128
+ * that is *growing* is a verb, and a degree adverb cannot modify one — there is
129
+ * no 很长 meaning it grew a lot — so 很, 太, 最, 多 and their kin in front of a
130
+ * bare 长 make it the adjective whatever follows. {@link DEGREE} is that set.
131
+ *
132
+ * The other two need both sides, and they are in `chang-context.ts`:
133
+ * {@link isPredicated} for 那座桥不长, {@link isAttributive} for 他有长头发.
134
+ * What they have in common is that the near side alone would be wrong. 不长 is
135
+ * 不长在耳朵外面 as readily as it is 不长, and a noun after a 长 is 长知识 as
136
+ * readily as 长头发.
137
+ *
138
+ * Measured over the same 88,866 lines of Tatoeba and zh.wikipedia the other
139
+ * rules were sized against, 260 长 decode as a word of their own. The degree
140
+ * adverbs move 75 of them to `cháng`, all 75 correctly; the two contexts added
141
+ * since move 8 more, also all correct — 那座桥不长, 生命不长, 射程不长, 还长,
142
+ * 生得又瘦又长, 他有长头发, 兔子有长耳朵 and 那位长胡子德国人. On CPP's 40
143
+ * hand-labelled 长 the character stands at 90.00%, against 85.00% with no rule
144
+ * and 87.50% with the degree adverbs alone.
145
+ *
146
+ * The last piece is {@link GROWN_INTO}, which pushes the opposite way on the one
147
+ * shape the sources get wrong.
148
+ */
149
+ export const ADJECTIVAL_CHANG = {
150
+ name: "adjectival-chang",
151
+ verdictFor: (context) => {
152
+ const { characters, edge } = context;
153
+ if (isGrowthCorrelative(context)) {
154
+ return "forbid";
155
+ }
156
+ if (edge.text !== "长" || !isChang(edge.reading[0])) {
157
+ return "keep";
158
+ }
159
+ if (GROWING.has(characters[edge.to] ?? "")) {
160
+ return "keep";
161
+ }
162
+ if (isPredicated(context) || isAttributive(context)) {
163
+ return "force";
164
+ }
165
+ const before = wordEndingAt(context, edge.from);
166
+ return before !== undefined && DEGREE.has(before) ? "force" : "keep";
167
+ },
168
+ };
169
+ //# sourceMappingURL=chang-rule.js.map