@kensio/pinyinjs 1.7.4 → 1.7.5

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 (695) hide show
  1. package/dist/accuracy/score-case.d.ts +23 -0
  2. package/dist/accuracy/score-case.d.ts.map +1 -0
  3. package/dist/accuracy/score-case.js +63 -0
  4. package/dist/accuracy/score-case.js.map +1 -0
  5. package/dist/accuracy/score.d.ts +1 -8
  6. package/dist/accuracy/score.d.ts.map +1 -1
  7. package/dist/accuracy/score.js +1 -55
  8. package/dist/accuracy/score.js.map +1 -1
  9. package/dist/cli/arguments.d.ts +4 -290
  10. package/dist/cli/arguments.d.ts.map +1 -1
  11. package/dist/cli/arguments.js +5 -357
  12. package/dist/cli/arguments.js.map +1 -1
  13. package/dist/cli/check-command.d.ts +9 -0
  14. package/dist/cli/check-command.d.ts.map +1 -0
  15. package/dist/cli/check-command.js +95 -0
  16. package/dist/cli/check-command.js.map +1 -0
  17. package/dist/cli/cli-input.d.ts +49 -0
  18. package/dist/cli/cli-input.d.ts.map +1 -0
  19. package/dist/cli/cli-input.js +31 -0
  20. package/dist/cli/cli-input.js.map +1 -0
  21. package/dist/cli/command.d.ts +97 -0
  22. package/dist/cli/command.d.ts.map +1 -0
  23. package/dist/cli/command.js +40 -0
  24. package/dist/cli/command.js.map +1 -0
  25. package/dist/cli/commands.d.ts +7 -110
  26. package/dist/cli/commands.d.ts.map +1 -1
  27. package/dist/cli/commands.js +14 -991
  28. package/dist/cli/commands.js.map +1 -1
  29. package/dist/cli/convert-command.d.ts +6 -0
  30. package/dist/cli/convert-command.d.ts.map +1 -0
  31. package/dist/cli/convert-command.js +52 -0
  32. package/dist/cli/convert-command.js.map +1 -0
  33. package/dist/cli/environment.d.ts +1 -1
  34. package/dist/cli/environment.d.ts.map +1 -1
  35. package/dist/cli/explain-command.d.ts +6 -0
  36. package/dist/cli/explain-command.d.ts.map +1 -0
  37. package/dist/cli/explain-command.js +40 -0
  38. package/dist/cli/explain-command.js.map +1 -0
  39. package/dist/cli/explain-syllable.d.ts +10 -0
  40. package/dist/cli/explain-syllable.d.ts.map +1 -0
  41. package/dist/cli/explain-syllable.js +70 -0
  42. package/dist/cli/explain-syllable.js.map +1 -0
  43. package/dist/cli/flag-help.d.ts +18 -0
  44. package/dist/cli/flag-help.d.ts.map +1 -0
  45. package/dist/cli/flag-help.js +78 -0
  46. package/dist/cli/flag-help.js.map +1 -0
  47. package/dist/cli/flag-lists.d.ts +49 -0
  48. package/dist/cli/flag-lists.d.ts.map +1 -0
  49. package/dist/cli/flag-lists.js +58 -0
  50. package/dist/cli/flag-lists.js.map +1 -0
  51. package/dist/cli/flag-values.d.ts +44 -0
  52. package/dist/cli/flag-values.d.ts.map +1 -0
  53. package/dist/cli/flag-values.js +56 -0
  54. package/dist/cli/flag-values.js.map +1 -0
  55. package/dist/cli/flags.d.ts +193 -0
  56. package/dist/cli/flags.d.ts.map +1 -0
  57. package/dist/cli/flags.js +133 -0
  58. package/dist/cli/flags.js.map +1 -0
  59. package/dist/cli/format-options.d.ts +29 -0
  60. package/dist/cli/format-options.d.ts.map +1 -0
  61. package/dist/cli/format-options.js +72 -0
  62. package/dist/cli/format-options.js.map +1 -0
  63. package/dist/cli/global-help.d.ts +23 -0
  64. package/dist/cli/global-help.d.ts.map +1 -0
  65. package/dist/cli/global-help.js +40 -0
  66. package/dist/cli/global-help.js.map +1 -0
  67. package/dist/cli/help.d.ts +1 -1
  68. package/dist/cli/help.d.ts.map +1 -1
  69. package/dist/cli/help.js +5 -99
  70. package/dist/cli/help.js.map +1 -1
  71. package/dist/cli/html-commands.d.ts +13 -0
  72. package/dist/cli/html-commands.d.ts.map +1 -0
  73. package/dist/cli/html-commands.js +49 -0
  74. package/dist/cli/html-commands.js.map +1 -0
  75. package/dist/cli/info-command.d.ts +7 -0
  76. package/dist/cli/info-command.d.ts.map +1 -0
  77. package/dist/cli/info-command.js +39 -0
  78. package/dist/cli/info-command.js.map +1 -0
  79. package/dist/cli/lookup-commands.d.ts +10 -0
  80. package/dist/cli/lookup-commands.d.ts.map +1 -0
  81. package/dist/cli/lookup-commands.js +101 -0
  82. package/dist/cli/lookup-commands.js.map +1 -0
  83. package/dist/cli/match-command.d.ts +11 -0
  84. package/dist/cli/match-command.d.ts.map +1 -0
  85. package/dist/cli/match-command.js +76 -0
  86. package/dist/cli/match-command.js.map +1 -0
  87. package/dist/cli/number-command.d.ts +12 -0
  88. package/dist/cli/number-command.d.ts.map +1 -0
  89. package/dist/cli/number-command.js +89 -0
  90. package/dist/cli/number-command.js.map +1 -0
  91. package/dist/cli/options.d.ts +30 -0
  92. package/dist/cli/options.d.ts.map +1 -0
  93. package/dist/cli/options.js +54 -0
  94. package/dist/cli/options.js.map +1 -0
  95. package/dist/cli/run-command.d.ts +24 -0
  96. package/dist/cli/run-command.d.ts.map +1 -0
  97. package/dist/cli/run-command.js +40 -0
  98. package/dist/cli/run-command.js.map +1 -0
  99. package/dist/cli/run.d.ts +4 -42
  100. package/dist/cli/run.d.ts.map +1 -1
  101. package/dist/cli/run.js +6 -61
  102. package/dist/cli/run.js.map +1 -1
  103. package/dist/cli/script-command.d.ts +10 -0
  104. package/dist/cli/script-command.d.ts.map +1 -0
  105. package/dist/cli/script-command.js +58 -0
  106. package/dist/cli/script-command.js.map +1 -0
  107. package/dist/cli/segment-command.d.ts +11 -0
  108. package/dist/cli/segment-command.d.ts.map +1 -0
  109. package/dist/cli/segment-command.js +53 -0
  110. package/dist/cli/segment-command.js.map +1 -0
  111. package/dist/cli/slug-command.d.ts +10 -0
  112. package/dist/cli/slug-command.d.ts.map +1 -0
  113. package/dist/cli/slug-command.js +28 -0
  114. package/dist/cli/slug-command.js.map +1 -0
  115. package/dist/cli/syllable-command.d.ts +14 -0
  116. package/dist/cli/syllable-command.d.ts.map +1 -0
  117. package/dist/cli/syllable-command.js +82 -0
  118. package/dist/cli/syllable-command.js.map +1 -0
  119. package/dist/cli/system-table.d.ts +12 -0
  120. package/dist/cli/system-table.d.ts.map +1 -0
  121. package/dist/cli/system-table.js +48 -0
  122. package/dist/cli/system-table.js.map +1 -0
  123. package/dist/cli/systems.d.ts +57 -0
  124. package/dist/cli/systems.d.ts.map +1 -0
  125. package/dist/cli/systems.js +27 -0
  126. package/dist/cli/systems.js.map +1 -0
  127. package/dist/cli/transcribe-command.d.ts +18 -0
  128. package/dist/cli/transcribe-command.d.ts.map +1 -0
  129. package/dist/cli/transcribe-command.js +86 -0
  130. package/dist/cli/transcribe-command.js.map +1 -0
  131. package/dist/cli/transcribe-reading.d.ts +15 -0
  132. package/dist/cli/transcribe-reading.d.ts.map +1 -0
  133. package/dist/cli/transcribe-reading.js +90 -0
  134. package/dist/cli/transcribe-reading.js.map +1 -0
  135. package/dist/cli/transcribe-rows.d.ts +26 -0
  136. package/dist/cli/transcribe-rows.d.ts.map +1 -0
  137. package/dist/cli/transcribe-rows.js +30 -0
  138. package/dist/cli/transcribe-rows.js.map +1 -0
  139. package/dist/cli/usage-error.d.ts +9 -0
  140. package/dist/cli/usage-error.d.ts.map +1 -0
  141. package/dist/cli/usage-error.js +9 -0
  142. package/dist/cli/usage-error.js.map +1 -0
  143. package/dist/decode/alternatives.d.ts +16 -0
  144. package/dist/decode/alternatives.d.ts.map +1 -0
  145. package/dist/decode/alternatives.js +31 -0
  146. package/dist/decode/alternatives.js.map +1 -0
  147. package/dist/decode/confidence.d.ts.map +1 -1
  148. package/dist/decode/confidence.js +3 -118
  149. package/dist/decode/confidence.js.map +1 -1
  150. package/dist/decode/convert-options.d.ts +116 -0
  151. package/dist/decode/convert-options.d.ts.map +1 -0
  152. package/dist/decode/convert-options.js +2 -0
  153. package/dist/decode/convert-options.js.map +1 -0
  154. package/dist/decode/convert-pipeline.d.ts +18 -0
  155. package/dist/decode/convert-pipeline.d.ts.map +1 -0
  156. package/dist/decode/convert-pipeline.js +66 -0
  157. package/dist/decode/convert-pipeline.js.map +1 -0
  158. package/dist/decode/convert.d.ts +9 -118
  159. package/dist/decode/convert.d.ts.map +1 -1
  160. package/dist/decode/convert.js +5 -453
  161. package/dist/decode/convert.js.map +1 -1
  162. package/dist/decode/decode.d.ts +2 -15
  163. package/dist/decode/decode.d.ts.map +1 -1
  164. package/dist/decode/decode.js +2 -121
  165. package/dist/decode/decode.js.map +1 -1
  166. package/dist/decode/decoders.d.ts +32 -0
  167. package/dist/decode/decoders.d.ts.map +1 -0
  168. package/dist/decode/decoders.js +29 -0
  169. package/dist/decode/decoders.js.map +1 -0
  170. package/dist/decode/edge-context.d.ts +38 -0
  171. package/dist/decode/edge-context.d.ts.map +1 -0
  172. package/dist/decode/edge-context.js +57 -0
  173. package/dist/decode/edge-context.js.map +1 -0
  174. package/dist/decode/hint-lattice.d.ts +45 -0
  175. package/dist/decode/hint-lattice.d.ts.map +1 -0
  176. package/dist/decode/hint-lattice.js +140 -0
  177. package/dist/decode/hint-lattice.js.map +1 -0
  178. package/dist/decode/hints.d.ts +2 -45
  179. package/dist/decode/hints.d.ts.map +1 -1
  180. package/dist/decode/hints.js +1 -139
  181. package/dist/decode/hints.js.map +1 -1
  182. package/dist/decode/jiao-rule.d.ts +58 -0
  183. package/dist/decode/jiao-rule.d.ts.map +1 -0
  184. package/dist/decode/jiao-rule.js +76 -0
  185. package/dist/decode/jiao-rule.js.map +1 -0
  186. package/dist/decode/lattice-costs.d.ts +55 -0
  187. package/dist/decode/lattice-costs.d.ts.map +1 -0
  188. package/dist/decode/lattice-costs.js +90 -0
  189. package/dist/decode/lattice-costs.js.map +1 -0
  190. package/dist/decode/lattice-edges.d.ts +29 -0
  191. package/dist/decode/lattice-edges.d.ts.map +1 -0
  192. package/dist/decode/lattice-edges.js +78 -0
  193. package/dist/decode/lattice-edges.js.map +1 -0
  194. package/dist/decode/lattice-slice.d.ts +37 -0
  195. package/dist/decode/lattice-slice.d.ts.map +1 -0
  196. package/dist/decode/lattice-slice.js +43 -0
  197. package/dist/decode/lattice-slice.js.map +1 -0
  198. package/dist/decode/lattice-types.d.ts +82 -0
  199. package/dist/decode/lattice-types.d.ts.map +1 -0
  200. package/dist/decode/lattice-types.js +44 -0
  201. package/dist/decode/lattice-types.js.map +1 -0
  202. package/dist/decode/lattice.d.ts +2 -59
  203. package/dist/decode/lattice.d.ts.map +1 -1
  204. package/dist/decode/lattice.js +2 -118
  205. package/dist/decode/lattice.js.map +1 -1
  206. package/dist/decode/number-pieces.d.ts +62 -0
  207. package/dist/decode/number-pieces.d.ts.map +1 -0
  208. package/dist/decode/number-pieces.js +106 -0
  209. package/dist/decode/number-pieces.js.map +1 -0
  210. package/dist/decode/numbers.d.ts +53 -0
  211. package/dist/decode/numbers.d.ts.map +1 -0
  212. package/dist/decode/numbers.js +69 -0
  213. package/dist/decode/numbers.js.map +1 -0
  214. package/dist/decode/pieces.d.ts +78 -0
  215. package/dist/decode/pieces.d.ts.map +1 -0
  216. package/dist/decode/pieces.js +136 -0
  217. package/dist/decode/pieces.js.map +1 -0
  218. package/dist/decode/polyphone-rules.d.ts +31 -0
  219. package/dist/decode/polyphone-rules.d.ts.map +1 -0
  220. package/dist/decode/polyphone-rules.js +159 -0
  221. package/dist/decode/polyphone-rules.js.map +1 -0
  222. package/dist/decode/reading-rules.d.ts +2 -97
  223. package/dist/decode/reading-rules.d.ts.map +1 -1
  224. package/dist/decode/reading-rules.js +4 -365
  225. package/dist/decode/reading-rules.js.map +1 -1
  226. package/dist/decode/rules.d.ts +1 -17
  227. package/dist/decode/rules.d.ts.map +1 -1
  228. package/dist/decode/rules.js +1 -43
  229. package/dist/decode/rules.js.map +1 -1
  230. package/dist/decode/run-lattice.d.ts +52 -0
  231. package/dist/decode/run-lattice.d.ts.map +1 -0
  232. package/dist/decode/run-lattice.js +91 -0
  233. package/dist/decode/run-lattice.js.map +1 -0
  234. package/dist/decode/sandhi-tones.d.ts +69 -0
  235. package/dist/decode/sandhi-tones.d.ts.map +1 -0
  236. package/dist/decode/sandhi-tones.js +88 -0
  237. package/dist/decode/sandhi-tones.js.map +1 -0
  238. package/dist/decode/sandhi.d.ts +1 -1
  239. package/dist/decode/sandhi.d.ts.map +1 -1
  240. package/dist/decode/sandhi.js +1 -81
  241. package/dist/decode/sandhi.js.map +1 -1
  242. package/dist/decode/script-types.d.ts +76 -0
  243. package/dist/decode/script-types.d.ts.map +1 -0
  244. package/dist/decode/script-types.js +35 -0
  245. package/dist/decode/script-types.js.map +1 -0
  246. package/dist/decode/script-words.d.ts +32 -0
  247. package/dist/decode/script-words.d.ts.map +1 -0
  248. package/dist/decode/script-words.js +77 -0
  249. package/dist/decode/script-words.js.map +1 -0
  250. package/dist/decode/script.d.ts +3 -73
  251. package/dist/decode/script.d.ts.map +1 -1
  252. package/dist/decode/script.js +3 -109
  253. package/dist/decode/script.js.map +1 -1
  254. package/dist/decode/tan-rule.d.ts +68 -0
  255. package/dist/decode/tan-rule.d.ts.map +1 -0
  256. package/dist/decode/tan-rule.js +131 -0
  257. package/dist/decode/tan-rule.js.map +1 -0
  258. package/dist/decode/write-run.d.ts +28 -0
  259. package/dist/decode/write-run.d.ts.map +1 -0
  260. package/dist/decode/write-run.js +77 -0
  261. package/dist/decode/write-run.js.map +1 -0
  262. package/dist/dictionary/artifact-claims.d.ts +25 -0
  263. package/dist/dictionary/artifact-claims.d.ts.map +1 -0
  264. package/dist/dictionary/artifact-claims.js +47 -0
  265. package/dist/dictionary/artifact-claims.js.map +1 -0
  266. package/dist/dictionary/artifact-format.d.ts +86 -0
  267. package/dist/dictionary/artifact-format.d.ts.map +1 -0
  268. package/dist/dictionary/artifact-format.js +91 -0
  269. package/dist/dictionary/artifact-format.js.map +1 -0
  270. package/dist/dictionary/artifact-read.d.ts +34 -0
  271. package/dist/dictionary/artifact-read.d.ts.map +1 -0
  272. package/dist/dictionary/artifact-read.js +114 -0
  273. package/dist/dictionary/artifact-read.js.map +1 -0
  274. package/dist/dictionary/artifact.d.ts +4 -63
  275. package/dist/dictionary/artifact.d.ts.map +1 -1
  276. package/dist/dictionary/artifact.js +12 -229
  277. package/dist/dictionary/artifact.js.map +1 -1
  278. package/dist/dictionary/assertions.d.ts +5 -57
  279. package/dist/dictionary/assertions.d.ts.map +1 -1
  280. package/dist/dictionary/assertions.js +4 -317
  281. package/dist/dictionary/assertions.js.map +1 -1
  282. package/dist/dictionary/build-assertions.d.ts +12 -0
  283. package/dist/dictionary/build-assertions.d.ts.map +1 -0
  284. package/dist/dictionary/build-assertions.js +13 -0
  285. package/dist/dictionary/build-assertions.js.map +1 -0
  286. package/dist/dictionary/built-dictionary.d.ts +46 -0
  287. package/dist/dictionary/built-dictionary.d.ts.map +1 -0
  288. package/dist/dictionary/built-dictionary.js +97 -0
  289. package/dist/dictionary/built-dictionary.js.map +1 -0
  290. package/dist/dictionary/cedict-senses.d.ts +80 -0
  291. package/dist/dictionary/cedict-senses.d.ts.map +1 -0
  292. package/dist/dictionary/cedict-senses.js +114 -0
  293. package/dist/dictionary/cedict-senses.js.map +1 -0
  294. package/dist/dictionary/character-defaults.d.ts +26 -0
  295. package/dist/dictionary/character-defaults.d.ts.map +1 -0
  296. package/dist/dictionary/character-defaults.js +67 -0
  297. package/dist/dictionary/character-defaults.js.map +1 -0
  298. package/dist/dictionary/character-readings.d.ts +10 -0
  299. package/dist/dictionary/character-readings.d.ts.map +1 -0
  300. package/dist/dictionary/character-readings.js +25 -0
  301. package/dist/dictionary/character-readings.js.map +1 -0
  302. package/dist/dictionary/dictionary-entry.d.ts +37 -0
  303. package/dist/dictionary/dictionary-entry.d.ts.map +1 -0
  304. package/dist/dictionary/dictionary-entry.js +41 -0
  305. package/dist/dictionary/dictionary-entry.js.map +1 -0
  306. package/dist/dictionary/dictionary-readings.d.ts +56 -0
  307. package/dist/dictionary/dictionary-readings.d.ts.map +1 -0
  308. package/dist/dictionary/dictionary-readings.js +93 -0
  309. package/dist/dictionary/dictionary-readings.js.map +1 -0
  310. package/dist/dictionary/dictionary.d.ts +6 -60
  311. package/dist/dictionary/dictionary.d.ts.map +1 -1
  312. package/dist/dictionary/dictionary.js +9 -169
  313. package/dist/dictionary/dictionary.js.map +1 -1
  314. package/dist/dictionary/entry-invariants.d.ts +3 -0
  315. package/dist/dictionary/entry-invariants.d.ts.map +1 -0
  316. package/dist/dictionary/entry-invariants.js +67 -0
  317. package/dist/dictionary/entry-invariants.js.map +1 -0
  318. package/dist/dictionary/entry-lines.d.ts +35 -0
  319. package/dist/dictionary/entry-lines.d.ts.map +1 -0
  320. package/dist/dictionary/entry-lines.js +70 -0
  321. package/dist/dictionary/entry-lines.js.map +1 -0
  322. package/dist/dictionary/erhua-repair.d.ts +26 -0
  323. package/dist/dictionary/erhua-repair.d.ts.map +1 -0
  324. package/dist/dictionary/erhua-repair.js +49 -0
  325. package/dist/dictionary/erhua-repair.js.map +1 -0
  326. package/dist/dictionary/frequency-tones.d.ts +74 -0
  327. package/dist/dictionary/frequency-tones.d.ts.map +1 -0
  328. package/dist/dictionary/frequency-tones.js +128 -0
  329. package/dist/dictionary/frequency-tones.js.map +1 -0
  330. package/dist/dictionary/inventory-invariants.d.ts +3 -0
  331. package/dist/dictionary/inventory-invariants.d.ts.map +1 -0
  332. package/dist/dictionary/inventory-invariants.js +54 -0
  333. package/dist/dictionary/inventory-invariants.js.map +1 -0
  334. package/dist/dictionary/locale-candidates.d.ts +40 -0
  335. package/dist/dictionary/locale-candidates.d.ts.map +1 -0
  336. package/dist/dictionary/locale-candidates.js +77 -0
  337. package/dist/dictionary/locale-candidates.js.map +1 -0
  338. package/dist/dictionary/locale-segments.d.ts +47 -0
  339. package/dist/dictionary/locale-segments.d.ts.map +1 -0
  340. package/dist/dictionary/locale-segments.js +141 -0
  341. package/dist/dictionary/locale-segments.js.map +1 -0
  342. package/dist/dictionary/locale.d.ts +1 -21
  343. package/dist/dictionary/locale.d.ts.map +1 -1
  344. package/dist/dictionary/locale.js +9 -198
  345. package/dist/dictionary/locale.js.map +1 -1
  346. package/dist/dictionary/merge-types.d.ts +121 -0
  347. package/dist/dictionary/merge-types.d.ts.map +1 -0
  348. package/dist/dictionary/merge-types.js +35 -0
  349. package/dist/dictionary/merge-types.js.map +1 -0
  350. package/dist/dictionary/merge-word.d.ts +7 -0
  351. package/dist/dictionary/merge-word.d.ts.map +1 -0
  352. package/dist/dictionary/merge-word.js +91 -0
  353. package/dist/dictionary/merge-word.js.map +1 -0
  354. package/dist/dictionary/merge.d.ts +5 -62
  355. package/dist/dictionary/merge.d.ts.map +1 -1
  356. package/dist/dictionary/merge.js +30 -713
  357. package/dist/dictionary/merge.js.map +1 -1
  358. package/dist/dictionary/proper-noun.d.ts +28 -0
  359. package/dist/dictionary/proper-noun.d.ts.map +1 -0
  360. package/dist/dictionary/proper-noun.js +43 -0
  361. package/dist/dictionary/proper-noun.js.map +1 -0
  362. package/dist/dictionary/reading-agreement.d.ts +71 -0
  363. package/dist/dictionary/reading-agreement.d.ts.map +1 -0
  364. package/dist/dictionary/reading-agreement.js +156 -0
  365. package/dist/dictionary/reading-agreement.js.map +1 -0
  366. package/dist/dictionary/script-conversion.d.ts +28 -0
  367. package/dist/dictionary/script-conversion.d.ts.map +1 -0
  368. package/dist/dictionary/script-conversion.js +58 -0
  369. package/dist/dictionary/script-conversion.js.map +1 -0
  370. package/dist/dictionary/script-pairings.d.ts +74 -0
  371. package/dist/dictionary/script-pairings.d.ts.map +1 -0
  372. package/dist/dictionary/script-pairings.js +120 -0
  373. package/dist/dictionary/script-pairings.js.map +1 -0
  374. package/dist/dictionary/script-tables.d.ts.map +1 -1
  375. package/dist/dictionary/script-tables.js +2 -165
  376. package/dist/dictionary/script-tables.js.map +1 -1
  377. package/dist/dictionary/taiwan-reading.d.ts +8 -0
  378. package/dist/dictionary/taiwan-reading.d.ts.map +1 -0
  379. package/dist/dictionary/taiwan-reading.js +38 -0
  380. package/dist/dictionary/taiwan-reading.js.map +1 -0
  381. package/dist/dictionary/tone-invariants.d.ts +3 -0
  382. package/dist/dictionary/tone-invariants.d.ts.map +1 -0
  383. package/dist/dictionary/tone-invariants.js +64 -0
  384. package/dist/dictionary/tone-invariants.js.map +1 -0
  385. package/dist/dictionary/traditional-form.d.ts +21 -0
  386. package/dist/dictionary/traditional-form.d.ts.map +1 -0
  387. package/dist/dictionary/traditional-form.js +59 -0
  388. package/dist/dictionary/traditional-form.js.map +1 -0
  389. package/dist/dictionary/traditional-ranking.d.ts +22 -0
  390. package/dist/dictionary/traditional-ranking.d.ts.map +1 -0
  391. package/dist/dictionary/traditional-ranking.js +74 -0
  392. package/dist/dictionary/traditional-ranking.js.map +1 -0
  393. package/dist/dictionary/traditional-table.d.ts +51 -0
  394. package/dist/dictionary/traditional-table.d.ts.map +1 -0
  395. package/dist/dictionary/traditional-table.js +98 -0
  396. package/dist/dictionary/traditional-table.js.map +1 -0
  397. package/dist/dictionary/traditional.d.ts +3 -56
  398. package/dist/dictionary/traditional.d.ts.map +1 -1
  399. package/dist/dictionary/traditional.js +3 -186
  400. package/dist/dictionary/traditional.js.map +1 -1
  401. package/dist/dictionary/variant-counts.d.ts +39 -0
  402. package/dist/dictionary/variant-counts.d.ts.map +1 -0
  403. package/dist/dictionary/variant-counts.js +38 -0
  404. package/dist/dictionary/variant-counts.js.map +1 -0
  405. package/dist/dictionary/word-reading.d.ts +26 -0
  406. package/dist/dictionary/word-reading.d.ts.map +1 -0
  407. package/dist/dictionary/word-reading.js +76 -0
  408. package/dist/dictionary/word-reading.js.map +1 -0
  409. package/dist/dictionary/word-readings.d.ts +15 -0
  410. package/dist/dictionary/word-readings.d.ts.map +1 -0
  411. package/dist/dictionary/word-readings.js +38 -0
  412. package/dist/dictionary/word-readings.js.map +1 -0
  413. package/dist/format/annotate.d.ts +90 -0
  414. package/dist/format/annotate.d.ts.map +1 -0
  415. package/dist/format/annotate.js +168 -0
  416. package/dist/format/annotate.js.map +1 -0
  417. package/dist/format/html.d.ts +15 -46
  418. package/dist/format/html.d.ts.map +1 -1
  419. package/dist/format/html.js +3 -162
  420. package/dist/format/html.js.map +1 -1
  421. package/dist/format/slug-hash.d.ts +51 -0
  422. package/dist/format/slug-hash.d.ts.map +1 -0
  423. package/dist/format/slug-hash.js +74 -0
  424. package/dist/format/slug-hash.js.map +1 -0
  425. package/dist/format/slug-options.d.ts +98 -0
  426. package/dist/format/slug-options.d.ts.map +1 -0
  427. package/dist/format/slug-options.js +2 -0
  428. package/dist/format/slug-options.js.map +1 -0
  429. package/dist/format/slug-words.d.ts +27 -0
  430. package/dist/format/slug-words.d.ts.map +1 -0
  431. package/dist/format/slug-words.js +0 -0
  432. package/dist/format/slug-words.js.map +1 -0
  433. package/dist/format/slug.d.ts +3 -128
  434. package/dist/format/slug.d.ts.map +1 -1
  435. package/dist/format/slug.js +0 -0
  436. package/dist/format/slug.js.map +1 -1
  437. package/dist/grade/check-readings.d.ts +41 -0
  438. package/dist/grade/check-readings.d.ts.map +1 -0
  439. package/dist/grade/check-readings.js +36 -0
  440. package/dist/grade/check-readings.js.map +1 -0
  441. package/dist/grade/check.d.ts +4 -4
  442. package/dist/grade/check.d.ts.map +1 -1
  443. package/dist/grade/check.js +5 -270
  444. package/dist/grade/check.js.map +1 -1
  445. package/dist/grade/pair-syllables.d.ts +48 -0
  446. package/dist/grade/pair-syllables.d.ts.map +1 -0
  447. package/dist/grade/pair-syllables.js +71 -0
  448. package/dist/grade/pair-syllables.js.map +1 -0
  449. package/dist/grade/reading-syllables.d.ts +62 -0
  450. package/dist/grade/reading-syllables.d.ts.map +1 -0
  451. package/dist/grade/reading-syllables.js +58 -0
  452. package/dist/grade/reading-syllables.js.map +1 -0
  453. package/dist/grade/reading-tolerance.d.ts +72 -0
  454. package/dist/grade/reading-tolerance.d.ts.map +1 -0
  455. package/dist/grade/reading-tolerance.js +107 -0
  456. package/dist/grade/reading-tolerance.js.map +1 -0
  457. package/dist/grade/typed-reading.d.ts +28 -0
  458. package/dist/grade/typed-reading.d.ts.map +1 -0
  459. package/dist/grade/typed-reading.js +36 -0
  460. package/dist/grade/typed-reading.js.map +1 -0
  461. package/dist/numerals/numeral-parse.d.ts +32 -0
  462. package/dist/numerals/numeral-parse.d.ts.map +1 -0
  463. package/dist/numerals/numeral-parse.js +44 -0
  464. package/dist/numerals/numeral-parse.js.map +1 -0
  465. package/dist/numerals/numeral-shapes.d.ts +89 -0
  466. package/dist/numerals/numeral-shapes.d.ts.map +1 -0
  467. package/dist/numerals/numeral-shapes.js +99 -0
  468. package/dist/numerals/numeral-shapes.js.map +1 -0
  469. package/dist/numerals/numerals.d.ts.map +1 -1
  470. package/dist/numerals/numerals.js +2 -36
  471. package/dist/numerals/numerals.js.map +1 -1
  472. package/dist/numerals/read-numeral.d.ts +76 -0
  473. package/dist/numerals/read-numeral.d.ts.map +1 -0
  474. package/dist/numerals/read-numeral.js +88 -0
  475. package/dist/numerals/read-numeral.js.map +1 -0
  476. package/dist/numerals/text.d.ts +3 -37
  477. package/dist/numerals/text.d.ts.map +1 -1
  478. package/dist/numerals/text.js +3 -254
  479. package/dist/numerals/text.js.map +1 -1
  480. package/dist/numerals/time.d.ts +34 -0
  481. package/dist/numerals/time.d.ts.map +1 -0
  482. package/dist/numerals/time.js +93 -0
  483. package/dist/numerals/time.js.map +1 -0
  484. package/dist/orthography/address-grouping.d.ts +34 -0
  485. package/dist/orthography/address-grouping.d.ts.map +1 -0
  486. package/dist/orthography/address-grouping.js +52 -0
  487. package/dist/orthography/address-grouping.js.map +1 -0
  488. package/dist/orthography/grouping.d.ts +3 -87
  489. package/dist/orthography/grouping.d.ts.map +1 -1
  490. package/dist/orthography/grouping.js +4 -270
  491. package/dist/orthography/grouping.js.map +1 -1
  492. package/dist/orthography/place-grouping.d.ts +39 -0
  493. package/dist/orthography/place-grouping.d.ts.map +1 -0
  494. package/dist/orthography/place-grouping.js +83 -0
  495. package/dist/orthography/place-grouping.js.map +1 -0
  496. package/dist/orthography/word-grouping.d.ts +48 -0
  497. package/dist/orthography/word-grouping.d.ts.map +1 -0
  498. package/dist/orthography/word-grouping.js +147 -0
  499. package/dist/orthography/word-grouping.js.map +1 -0
  500. package/dist/script/conversion-format.d.ts +22 -0
  501. package/dist/script/conversion-format.d.ts.map +1 -0
  502. package/dist/script/conversion-format.js +22 -0
  503. package/dist/script/conversion-format.js.map +1 -0
  504. package/dist/script/conversion-read.d.ts +9 -0
  505. package/dist/script/conversion-read.d.ts.map +1 -0
  506. package/dist/script/conversion-read.js +69 -0
  507. package/dist/script/conversion-read.js.map +1 -0
  508. package/dist/script/conversion-write.d.ts +14 -0
  509. package/dist/script/conversion-write.d.ts.map +1 -0
  510. package/dist/script/conversion-write.js +34 -0
  511. package/dist/script/conversion-write.js.map +1 -0
  512. package/dist/script/conversion.d.ts +10 -16
  513. package/dist/script/conversion.d.ts.map +1 -1
  514. package/dist/script/conversion.js +2 -115
  515. package/dist/script/conversion.js.map +1 -1
  516. package/dist/search/candidate-narrowing.d.ts +56 -0
  517. package/dist/search/candidate-narrowing.d.ts.map +1 -0
  518. package/dist/search/candidate-narrowing.js +55 -0
  519. package/dist/search/candidate-narrowing.js.map +1 -0
  520. package/dist/search/candidate-query.d.ts +25 -0
  521. package/dist/search/candidate-query.d.ts.map +1 -0
  522. package/dist/search/candidate-query.js +28 -0
  523. package/dist/search/candidate-query.js.map +1 -0
  524. package/dist/search/candidate-writings.d.ts +24 -0
  525. package/dist/search/candidate-writings.d.ts.map +1 -0
  526. package/dist/search/candidate-writings.js +114 -0
  527. package/dist/search/candidate-writings.js.map +1 -0
  528. package/dist/search/candidates.d.ts +7 -41
  529. package/dist/search/candidates.d.ts.map +1 -1
  530. package/dist/search/candidates.js +10 -164
  531. package/dist/search/candidates.js.map +1 -1
  532. package/dist/search/match-chunks.d.ts +19 -0
  533. package/dist/search/match-chunks.d.ts.map +1 -0
  534. package/dist/search/match-chunks.js +30 -0
  535. package/dist/search/match-chunks.js.map +1 -0
  536. package/dist/search/match-ranking.d.ts +39 -0
  537. package/dist/search/match-ranking.d.ts.map +1 -0
  538. package/dist/search/match-ranking.js +51 -0
  539. package/dist/search/match-ranking.js.map +1 -0
  540. package/dist/search/match-readings.d.ts +43 -0
  541. package/dist/search/match-readings.d.ts.map +1 -0
  542. package/dist/search/match-readings.js +83 -0
  543. package/dist/search/match-readings.js.map +1 -0
  544. package/dist/search/match-scoring.d.ts +146 -0
  545. package/dist/search/match-scoring.d.ts.map +1 -0
  546. package/dist/search/match-scoring.js +114 -0
  547. package/dist/search/match-scoring.js.map +1 -0
  548. package/dist/search/match-search.d.ts +28 -0
  549. package/dist/search/match-search.d.ts.map +1 -0
  550. package/dist/search/match-search.js +128 -0
  551. package/dist/search/match-search.js.map +1 -0
  552. package/dist/search/match.d.ts +5 -36
  553. package/dist/search/match.d.ts.map +1 -1
  554. package/dist/search/match.js +2 -379
  555. package/dist/search/match.js.map +1 -1
  556. package/dist/search/reverse-index-build.d.ts +30 -0
  557. package/dist/search/reverse-index-build.d.ts.map +1 -0
  558. package/dist/search/reverse-index-build.js +72 -0
  559. package/dist/search/reverse-index-build.js.map +1 -0
  560. package/dist/search/reverse-index-format.d.ts +60 -0
  561. package/dist/search/reverse-index-format.d.ts.map +1 -0
  562. package/dist/search/reverse-index-format.js +54 -0
  563. package/dist/search/reverse-index-format.js.map +1 -0
  564. package/dist/search/reverse-index-groups.d.ts +37 -0
  565. package/dist/search/reverse-index-groups.d.ts.map +1 -0
  566. package/dist/search/reverse-index-groups.js +71 -0
  567. package/dist/search/reverse-index-groups.js.map +1 -0
  568. package/dist/search/reverse-index-passes.d.ts +78 -0
  569. package/dist/search/reverse-index-passes.d.ts.map +1 -0
  570. package/dist/search/reverse-index-passes.js +59 -0
  571. package/dist/search/reverse-index-passes.js.map +1 -0
  572. package/dist/search/reverse-index-state.d.ts +36 -0
  573. package/dist/search/reverse-index-state.d.ts.map +1 -0
  574. package/dist/search/reverse-index-state.js +95 -0
  575. package/dist/search/reverse-index-state.js.map +1 -0
  576. package/dist/search/reverse-index.d.ts +8 -67
  577. package/dist/search/reverse-index.d.ts.map +1 -1
  578. package/dist/search/reverse-index.js +4 -255
  579. package/dist/search/reverse-index.js.map +1 -1
  580. package/dist/sources/unihan-readings.d.ts +58 -0
  581. package/dist/sources/unihan-readings.d.ts.map +1 -0
  582. package/dist/sources/unihan-readings.js +95 -0
  583. package/dist/sources/unihan-readings.js.map +1 -0
  584. package/dist/sources/unihan.d.ts +6 -9
  585. package/dist/sources/unihan.d.ts.map +1 -1
  586. package/dist/sources/unihan.js +2 -85
  587. package/dist/sources/unihan.js.map +1 -1
  588. package/dist/syllable/final-tables.d.ts +23 -0
  589. package/dist/syllable/final-tables.d.ts.map +1 -0
  590. package/dist/syllable/final-tables.js +50 -0
  591. package/dist/syllable/final-tables.js.map +1 -0
  592. package/dist/syllable/inventory.d.ts +8 -42
  593. package/dist/syllable/inventory.d.ts.map +1 -1
  594. package/dist/syllable/inventory.js +9 -918
  595. package/dist/syllable/inventory.js.map +1 -1
  596. package/dist/syllable/spellings.d.ts +40 -0
  597. package/dist/syllable/spellings.d.ts.map +1 -0
  598. package/dist/syllable/spellings.js +469 -0
  599. package/dist/syllable/spellings.js.map +1 -0
  600. package/dist/syllable/syllable-parts.d.ts +31 -0
  601. package/dist/syllable/syllable-parts.d.ts.map +1 -0
  602. package/dist/syllable/syllable-parts.js +105 -0
  603. package/dist/syllable/syllable-parts.js.map +1 -0
  604. package/dist/syllable/syllable.d.ts +1 -14
  605. package/dist/syllable/syllable.d.ts.map +1 -1
  606. package/dist/syllable/syllable.js +3 -144
  607. package/dist/syllable/syllable.js.map +1 -1
  608. package/dist/syllable/written-tones.d.ts +6 -0
  609. package/dist/syllable/written-tones.d.ts.map +1 -0
  610. package/dist/syllable/written-tones.js +453 -0
  611. package/dist/syllable/written-tones.js.map +1 -0
  612. package/dist/transcription/bopomofo-parse.d.ts +42 -0
  613. package/dist/transcription/bopomofo-parse.d.ts.map +1 -0
  614. package/dist/transcription/bopomofo-parse.js +92 -0
  615. package/dist/transcription/bopomofo-parse.js.map +1 -0
  616. package/dist/transcription/bopomofo-reverse.d.ts +31 -0
  617. package/dist/transcription/bopomofo-reverse.d.ts.map +1 -0
  618. package/dist/transcription/bopomofo-reverse.js +48 -0
  619. package/dist/transcription/bopomofo-reverse.js.map +1 -0
  620. package/dist/transcription/bopomofo-symbols.d.ts +36 -0
  621. package/dist/transcription/bopomofo-symbols.d.ts.map +1 -0
  622. package/dist/transcription/bopomofo-symbols.js +41 -0
  623. package/dist/transcription/bopomofo-symbols.js.map +1 -0
  624. package/dist/transcription/bopomofo-tables.d.ts +87 -0
  625. package/dist/transcription/bopomofo-tables.d.ts.map +1 -0
  626. package/dist/transcription/bopomofo-tables.js +180 -0
  627. package/dist/transcription/bopomofo-tables.js.map +1 -0
  628. package/dist/transcription/bopomofo.d.ts +14 -32
  629. package/dist/transcription/bopomofo.d.ts.map +1 -1
  630. package/dist/transcription/bopomofo.js +5 -343
  631. package/dist/transcription/bopomofo.js.map +1 -1
  632. package/dist/transcription/gwoyeu-first-second.d.ts +36 -0
  633. package/dist/transcription/gwoyeu-first-second.d.ts.map +1 -0
  634. package/dist/transcription/gwoyeu-first-second.js +75 -0
  635. package/dist/transcription/gwoyeu-first-second.js.map +1 -0
  636. package/dist/transcription/gwoyeu-spelling.d.ts +38 -0
  637. package/dist/transcription/gwoyeu-spelling.d.ts.map +1 -0
  638. package/dist/transcription/gwoyeu-spelling.js +124 -0
  639. package/dist/transcription/gwoyeu-spelling.js.map +1 -0
  640. package/dist/transcription/gwoyeu-tables.d.ts +93 -0
  641. package/dist/transcription/gwoyeu-tables.d.ts.map +1 -0
  642. package/dist/transcription/gwoyeu-tables.js +205 -0
  643. package/dist/transcription/gwoyeu-tables.js.map +1 -0
  644. package/dist/transcription/gwoyeu-tonal-forms.d.ts +49 -0
  645. package/dist/transcription/gwoyeu-tonal-forms.d.ts.map +1 -0
  646. package/dist/transcription/gwoyeu-tonal-forms.js +89 -0
  647. package/dist/transcription/gwoyeu-tonal-forms.js.map +1 -0
  648. package/dist/transcription/gwoyeu-vowels.d.ts +51 -0
  649. package/dist/transcription/gwoyeu-vowels.d.ts.map +1 -0
  650. package/dist/transcription/gwoyeu-vowels.js +58 -0
  651. package/dist/transcription/gwoyeu-vowels.js.map +1 -0
  652. package/dist/transcription/gwoyeu.d.ts +1 -26
  653. package/dist/transcription/gwoyeu.d.ts.map +1 -1
  654. package/dist/transcription/gwoyeu.js +2 -540
  655. package/dist/transcription/gwoyeu.js.map +1 -1
  656. package/dist/transcription/ipa-symbols.d.ts +67 -0
  657. package/dist/transcription/ipa-symbols.d.ts.map +1 -0
  658. package/dist/transcription/ipa-symbols.js +135 -0
  659. package/dist/transcription/ipa-symbols.js.map +1 -0
  660. package/dist/transcription/ipa.d.ts +2 -10
  661. package/dist/transcription/ipa.d.ts.map +1 -1
  662. package/dist/transcription/ipa.js +2 -134
  663. package/dist/transcription/ipa.js.map +1 -1
  664. package/dist/transcription/wade-giles-index.d.ts +35 -0
  665. package/dist/transcription/wade-giles-index.d.ts.map +1 -0
  666. package/dist/transcription/wade-giles-index.js +110 -0
  667. package/dist/transcription/wade-giles-index.js.map +1 -0
  668. package/dist/transcription/wade-giles-parse.d.ts +36 -0
  669. package/dist/transcription/wade-giles-parse.d.ts.map +1 -0
  670. package/dist/transcription/wade-giles-parse.js +84 -0
  671. package/dist/transcription/wade-giles-parse.js.map +1 -0
  672. package/dist/transcription/wade-giles-spelling.d.ts +61 -0
  673. package/dist/transcription/wade-giles-spelling.d.ts.map +1 -0
  674. package/dist/transcription/wade-giles-spelling.js +107 -0
  675. package/dist/transcription/wade-giles-spelling.js.map +1 -0
  676. package/dist/transcription/wade-giles-syllable.d.ts +29 -0
  677. package/dist/transcription/wade-giles-syllable.d.ts.map +1 -0
  678. package/dist/transcription/wade-giles-syllable.js +90 -0
  679. package/dist/transcription/wade-giles-syllable.js.map +1 -0
  680. package/dist/transcription/wade-giles-tables.d.ts +80 -0
  681. package/dist/transcription/wade-giles-tables.d.ts.map +1 -0
  682. package/dist/transcription/wade-giles-tables.js +178 -0
  683. package/dist/transcription/wade-giles-tables.js.map +1 -0
  684. package/dist/transcription/wade-giles.d.ts +9 -60
  685. package/dist/transcription/wade-giles.d.ts.map +1 -1
  686. package/dist/transcription/wade-giles.js +6 -543
  687. package/dist/transcription/wade-giles.js.map +1 -1
  688. package/dist/transcription/yale-tables.d.ts +54 -0
  689. package/dist/transcription/yale-tables.d.ts.map +1 -0
  690. package/dist/transcription/yale-tables.js +125 -0
  691. package/dist/transcription/yale-tables.js.map +1 -0
  692. package/dist/transcription/yale.d.ts.map +1 -1
  693. package/dist/transcription/yale.js +1 -124
  694. package/dist/transcription/yale.js.map +1 -1
  695. package/package.json +1 -1
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Reading CC-CEDICT: indexing its entries, and telling its senses apart.
3
+ *
4
+ * CC-CEDICT gives a word one entry per pronunciation and keys each under both
5
+ * scripts, so getting anything out of it means first deciding which entries
6
+ * describe the word in hand and which describe a different one written alike.
7
+ */
8
+ import { isSingleCharacter } from "../script/characters.js";
9
+ import { isSameReading } from "./entry.js";
10
+ import { readDictionaryReading } from "./reading.js";
11
+ /**
12
+ * Whether a phrase-corpus headword is really the 繁體 spelling of another word.
13
+ *
14
+ * `large_pinyin.txt` is a 简体 corpus, and where it carries a 繁體 headword
15
+ * anyway it has read it as though the characters were 简体: 特徵 is `tè zhǐ`
16
+ * there because 徵 alone is `zhǐ`, 沈溺 is `shěn nì` because 沈 alone is the
17
+ * surname, 蝨子 is `shī zǐ`, 纔然 is `shān rán`. Every one of those is a word
18
+ * whose 简体 form the corpus also carries, correctly.
19
+ *
20
+ * Left in, each becomes an entry of its own that outranks the 繁體 key the
21
+ * derivation would have hung on the 简体 entry, so the word reads one way in a
22
+ * tier holding the phrase tail and another way in a tier without it.
23
+ *
24
+ * So the corpus is held to its own contract: a headword CC-CEDICT knows only as
25
+ * the 繁體 spelling of a different 简体 word contributes no entry, and the word
26
+ * keeps the reading CC-CEDICT pairs it with. It is 72 headwords, 13 of which
27
+ * the corpus reads wrongly; the other 59 arrive at the same reading either way.
28
+ *
29
+ * Narrow on purpose. 2,854 corpus headwords contain a 繁體-only character and
30
+ * only these 72 are ones CC-CEDICT pairs — the rest are rare or mixed-script
31
+ * words whose characters do read them, and dropping those would lose coverage
32
+ * to fix nothing.
33
+ */
34
+ export function isSpeltTraditionally(word, byWord, byHant) {
35
+ if (byWord.has(word)) {
36
+ return false;
37
+ }
38
+ return (byHant.get(word) ?? []).some((entry) => entry.simplified !== entry.traditional);
39
+ }
40
+ /**
41
+ * CC-CEDICT's entries for a word, keyed by one of its two written forms.
42
+ */
43
+ export function indexCedict(cedict, formOf) {
44
+ const byWord = new Map();
45
+ for (const entry of cedict) {
46
+ const form = formOf(entry);
47
+ const existing = byWord.get(form);
48
+ if (existing === undefined) {
49
+ byWord.set(form, [entry]);
50
+ }
51
+ else {
52
+ existing.push(entry);
53
+ }
54
+ }
55
+ return byWord;
56
+ }
57
+ /**
58
+ * A word's readings as CC-CEDICT gives them, one per sense.
59
+ */
60
+ export function cedictReadingsOf(word, entries) {
61
+ return entries
62
+ .map((entry) => readDictionaryReading(word, entry.readings))
63
+ .filter((reading) => reading !== undefined);
64
+ }
65
+ /**
66
+ * Whether a proposed 國語 reading is really another 普通话 sense of the word.
67
+ *
68
+ * The test that separates a locale shift from a sense selection, which the
69
+ * sources write the same way and mean differently. 地 is offered `dì` against a
70
+ * 普通话 `de` — but CC-CEDICT lists 地[de5] and 地[di4] as two entries, so `dì`
71
+ * is what 地 reads in 普通话 when it means the ground, not what 國語 does to the
72
+ * particle. The adverbial 地 is `de` in Taipei too, and 4,240 entries end in it.
73
+ * 都 is the same shape, and so are 着, 应, 差, 称, 斗, 舍, 薄 and 万.
74
+ *
75
+ * A genuine delta leaves no such trace: nothing in 普通话 reads 和 as `hàn`, 期
76
+ * as `qí` or 垃 as `lè`, which is why those survive this and 71 characters and
77
+ * 3 words do not.
78
+ *
79
+ * Only CC-CEDICT is consulted. Unihan's reading fields carry rare and historical
80
+ * pronunciations alongside current ones — 驯 is listed `xún` somewhere in them —
81
+ * and a reading no one uses today is not evidence that a source meant a sense
82
+ * rather than a locale.
83
+ */
84
+ export function isOwnSense(taiwan, senseReadings) {
85
+ return senseReadings.some((sense) => isSameReading(sense, taiwan));
86
+ }
87
+ /**
88
+ * Whether a character's `Taiwan pr.` note describes one sense rather than the
89
+ * character.
90
+ *
91
+ * The other half of the sense test, and the one {@link isOwnSense} cannot do.
92
+ * That test asks whether the offered reading is a 普通话 sense of the word; this
93
+ * asks whether the note was ever about the whole word to begin with. 從's
94
+ * `Taiwan pr. [zong4]` sits on three of its eight senses — 侍從, 從兄弟, 從犯 —
95
+ * and 教育部's dictionary agrees with CC-CEDICT about which: 跟隨, 依順, 參與 and
96
+ * the preposition are `cóng` in Taipei exactly as they are in Beijing. Applying
97
+ * it to the headword made 我从北京来 read `wǒ zòng Běijīng lái`. 會 (`huǐ`, only
98
+ * 一會兒), 勞 (`lào`, only 慰勞) and 燥 (`sào`, only 肉燥) are the same shape.
99
+ *
100
+ * A note the entry leads with is kept, because the leading sense is what the
101
+ * character means with nothing to narrow it: 和's `hàn` is on the conjunction,
102
+ * which is what a bare 和 almost always is.
103
+ *
104
+ * **Only a character is tested this way.** Its entry is what every occurrence
105
+ * no longer word covers falls back to, so it has to carry the reading that
106
+ * survives out of context; a multi-character headword is reached only where
107
+ * that exact word is written. Four of them carry an inline note — 相親, 載具,
108
+ * 高挑 and 樂色 — and only 相親 has senses that differ, its dominant one being
109
+ * the matchmaking sense that really is `xiàngqīn`.
110
+ */
111
+ export function isSenseScopedNote(word, sense) {
112
+ return sense?.taiwanScope === "sense" && isSingleCharacter(word);
113
+ }
114
+ //# sourceMappingURL=cedict-senses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cedict-senses.js","sourceRoot":"","sources":["../../src/dictionary/cedict-senses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;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U,UAAU,CACxB,MAA2B,EAC3B,aAA+C;IAE/C,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAY,EACZ,KAA8B;IAE9B,OAAO,KAAK,EAAE,WAAW,KAAK,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { CedictEntry } from "../sources/cedict.js";
2
+ import type { Syllable } from "../syllable/syllable.js";
3
+ import { TraditionalTable } from "./traditional.js";
4
+ import type { MergeSources } from "./merge-types.js";
5
+ /**
6
+ * Parse a Unihan reading string for one character.
7
+ *
8
+ * Goes through the dictionary reader so that a Unihan reading gets the same
9
+ * treatment as any other source's: an unmarked tone means neutral, and 一 and
10
+ * 不 are restored to their underlying tones.
11
+ */
12
+ export declare function characterSyllable(character: string, reading: string): Syllable | undefined;
13
+ /**
14
+ * The 繁體 table and the character defaults, with the count of defaults a
15
+ * reduced 轻声 would otherwise have set.
16
+ */
17
+ export interface CharacterDefaults {
18
+ readonly traditional: TraditionalTable;
19
+ readonly defaults: ReadonlyMap<string, readonly Syllable[]>;
20
+ readonly reducedNeutrals: number;
21
+ }
22
+ /**
23
+ * Build both, from the sources and CC-CEDICT's two indexes.
24
+ */
25
+ export declare function buildCharacterDefaults(sources: MergeSources, cedictByWord: ReadonlyMap<string, readonly CedictEntry[]>, cedictByHant: ReadonlyMap<string, readonly CedictEntry[]>): CharacterDefaults;
26
+ //# sourceMappingURL=character-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character-defaults.d.ts","sourceRoot":"","sources":["../../src/dictionary/character-defaults.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAGL,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,QAAQ,GAAG,SAAS,CAEtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC,CAAC;IAC5D,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,YAAY,EACrB,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC,EACzD,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC,GACxD,iBAAiB,CAiDnB"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * What every later step of the merge leans on: the 繁體 pairing table and each
3
+ * character's default reading.
4
+ *
5
+ * Both come out of the sources alone, before a single word has been looked at,
6
+ * and the order matters — the corpus mass the defaults are ranked by reaches
7
+ * 繁體 characters only through the pairing table.
8
+ */
9
+ import { countCorpusMass, rankByCorpusMass } from "./corpus-mass.js";
10
+ import { demoteReducedNeutrals, isNeutralAlone, resolveFrequencyTones, } from "./frequency-tones.js";
11
+ import { readAlignedReading, readDictionaryReading } from "./reading.js";
12
+ import { pairScripts, TraditionalTable, } from "./traditional.js";
13
+ /**
14
+ * Parse a Unihan reading string for one character.
15
+ *
16
+ * Goes through the dictionary reader so that a Unihan reading gets the same
17
+ * treatment as any other source's: an unmarked tone means neutral, and 一 and
18
+ * 不 are restored to their underlying tones.
19
+ */
20
+ export function characterSyllable(character, reading) {
21
+ return readDictionaryReading(character, [reading])?.[0];
22
+ }
23
+ /**
24
+ * Build both, from the sources and CC-CEDICT's two indexes.
25
+ */
26
+ export function buildCharacterDefaults(sources, cedictByWord, cedictByHant) {
27
+ const { unihanReadings, unihanVariants, phrase, cedict, jieba } = sources;
28
+ // ── 繁體 evidence, mined from CC-CEDICT's own pairings ──────
29
+ // Before the character defaults, because the corpus mass those are ranked by
30
+ // has to reach 繁體 characters through this table: jieba's corpus and the
31
+ // phrase corpus are both 简体, so nothing else would count a vote for 髮.
32
+ const pairings = [];
33
+ for (const entry of cedict) {
34
+ const aligned = readAlignedReading(entry.simplified, entry.readings);
35
+ pairings.push(...pairScripts(entry.simplified, entry.traditional, aligned));
36
+ }
37
+ const traditional = TraditionalTable.build(pairings, unihanVariants, unihanReadings);
38
+ // ── Character defaults, which every later step leans on ────
39
+ // Unihan ranks the readings and the corpus re-ranks the ones it has seen: a
40
+ // character's default is whichever of its readings the dictionary's own words
41
+ // spend the most of jieba's corpus on, and Unihan's order decides the rest.
42
+ const mass = countCorpusMass({ phrase, cedict, jieba }, traditional);
43
+ const defaults = new Map();
44
+ let reducedNeutrals = 0;
45
+ for (const [character, readings] of unihanReadings) {
46
+ const resolved = resolveFrequencyTones(readings);
47
+ // A 轻声 the frequency field only ever counted inside words is not the
48
+ // character's reading — unless a source says the bare character is neutral.
49
+ const ranked = isNeutralAlone(character, [
50
+ ...(cedictByWord.get(character) ?? []),
51
+ ...(cedictByHant.get(character) ?? []),
52
+ ])
53
+ ? resolved
54
+ : demoteReducedNeutrals(readings, resolved);
55
+ if (ranked !== resolved && ranked[0] !== resolved[0]) {
56
+ reducedNeutrals++;
57
+ }
58
+ const parsed = ranked
59
+ .map((reading) => characterSyllable(character, reading))
60
+ .filter((syllable) => syllable !== undefined);
61
+ if (parsed.length > 0) {
62
+ defaults.set(character, rankByCorpusMass(character, parsed, readings.fields, mass));
63
+ }
64
+ }
65
+ return { traditional, defaults, reducedNeutrals };
66
+ }
67
+ //# sourceMappingURL=character-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character-defaults.js","sourceRoot":"","sources":["../../src/dictionary/character-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,WAAW,EAEX,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,SAAiB,EACjB,OAAe;IAEf,OAAO,qBAAqB,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAYD;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAqB,EACrB,YAAyD,EACzD,YAAyD;IAEzD,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAC1E,6DAA6D;IAC7D,6EAA6E;IAC7E,wEAAwE;IACxE,uEAAuE;IACvE,MAAM,QAAQ,GAAoB,EAAE,CAAC;IACrC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QACrE,QAAQ,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,MAAM,WAAW,GAAG,gBAAgB,CAAC,KAAK,CACxC,QAAQ,EACR,c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AE,IAAI,CAAC,CAC3D,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AACpD,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Single characters whose default reading a source would otherwise get wrong.
3
+ *
4
+ * Two source quirks between them: the 简体 phrase corpus carrying a 繁體
5
+ * headword and reading it as though the characters were 简体, and Unihan's
6
+ * frequency field counting a 轻声 that only occurs inside words.
7
+ */
8
+ import type { BuildAssertion } from "./built-dictionary.js";
9
+ export declare const CHARACTER_READINGS: readonly BuildAssertion[];
10
+ //# sourceMappingURL=character-readings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character-readings.d.ts","sourceRoot":"","sources":["../../src/dictionary/character-readings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAsBvD,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { reads } from "./word-readings.js";
2
+ export const CHARACTER_READINGS = [
3
+ // The 简体 phrase corpus carries a few 繁體 headwords and reads them as
4
+ // though the characters were 简体 — 徵 as `zhǐ` rather than as 征, 沈 as the
5
+ // surname rather than as 沉. Left as entries of their own they outrank the
6
+ // 繁體 key derived from the 简体 entry, and the word reads one way in a tier
7
+ // holding the phrase tail and another way in a tier without it.
8
+ reads("特徵", "tè zhēng", "not tè zhǐ, which is 徵 read as itself"),
9
+ reads("沈溺", "chén nì", "not shěn nì, which is 沈 read as the surname"),
10
+ reads("蝨子", "shī zi", "not shī zǐ, which is 子 read with its full tone"),
11
+ // kHanyuPinlu writes 李 as `li(36)`, with no tone mark. Read as 轻声 — which
12
+ // is what an unmarked reading means everywhere else in source data — 李华
13
+ // comes out `Li Huá`. The other Unihan fields all write `lǐ`, and that is
14
+ // what settles it. 们 is the control: genuinely neutral, and written bare by
15
+ // the other fields too, so it must not be "corrected".
16
+ reads("李", "lǐ", "a tone kHanyuPinlu left off is restored"),
17
+ reads("们", "men", "a genuine 轻声 is not given a tone it never had"),
18
+ reads("吧", "ba", "the 语气词, not the 酒吧 the corpus mass counts"),
19
+ reads("酒吧", "jiǔ bā", "and the word the character keeps its full tone in"),
20
+ reads("西", "xī", "a 轻声 counted only inside words does not lead"),
21
+ reads("子", "zǐ", "and a suffix sense is not a claim about the character"),
22
+ reads("夫", "fū", "nor is 大夫's and 丈夫's reduction"),
23
+ reads("吗", "ma", "but a 语气词 CC-CEDICT reads 轻声 alone keeps it"),
24
+ ];
25
+ //# sourceMappingURL=character-readings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character-readings.js","sourceRoot":"","sources":["../../src/dictionary/character-readings.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAA8B;IAC3D,oEAAoE;IACpE,wEAAwE;IACxE,0EAA0E;IAC1E,yEAAyE;IACzE,gEAAgE;IAChE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,uCAAuC,CAAC;IAChE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,6CAA6C,CAAC;IACrE,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,gDAAgD,CAAC;IACvE,0EAA0E;IAC1E,wEAAwE;IACxE,0EAA0E;IAC1E,4EAA4E;IAC5E,uDAAuD;IACvD,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,yCAAyC,CAAC;IAC3D,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,+CAA+C,CAAC;IAClE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,4CAA4C,CAAC;IAC9D,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,mDAAmD,CAAC;IAC1E,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,8CAA8C,CAAC;IAChE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,uDAAuD,CAAC;IACzE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,gCAAgC,CAAC;IAClD,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,6CAA6C,CAAC;CAChE,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { Syllable } from "../syllable/syllable.js";
2
+ /**
3
+ * What the dictionary knows about one word.
4
+ */
5
+ export interface WordEntry {
6
+ readonly word: string;
7
+ /** 普通话 reading. */
8
+ readonly reading: readonly Syllable[];
9
+ /** 國語 reading, absent when it does not differ. */
10
+ readonly taiwanReading?: readonly Syllable[];
11
+ readonly partOfSpeech: string;
12
+ readonly isProperNoun: boolean;
13
+ /**
14
+ * Where a proper name divides into its parts, in characters.
15
+ *
16
+ * Present only where CC-CEDICT's own capitalisation divides it: 齐白石 is
17
+ * `[Qi2 Bai2 shi2]`, 司马迁 `[Si1 ma3 Qian1]`, 上海交通大学
18
+ * `[Shang4 hai3 Jiao1 tong1 Da4 xue2]`. Absent for 马克思 `[Ma3 ke4 si1]`,
19
+ * which is why a transliteration stays one word.
20
+ */
21
+ readonly nameBoundaries?: readonly number[];
22
+ /**
23
+ * Decoding cost, where lower means more likely.
24
+ *
25
+ * Quantised from the corpus frequency; see
26
+ * {@link import("./frequency-table.js").FrequencyTable.costOf}.
27
+ */
28
+ readonly cost: number;
29
+ }
30
+ /**
31
+ * Decode one line's columns into an entry.
32
+ *
33
+ * `readingOf` is asked for a single character's stored reading, and is only
34
+ * reached where the line's own reading column is empty.
35
+ */
36
+ export declare function decodeEntry(word: string, columns: readonly string[], readingOf: (character: string) => string | undefined, cost: number): WordEntry;
37
+ //# sourceMappingURL=dictionary-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary-entry.d.ts","sourceRoot":"","sources":["../../src/dictionary/dictionary-entry.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,QAAQ,CAAC,OAAO,EAAE,SAAS,QAAQ,EAAE,CAAC;IACtC,kDAAkD;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;;OAOG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,EACpD,IAAI,EAAE,MAAM,GACX,SAAS,CAwBX"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * What one line of the entry blob means, once it is read as a word.
3
+ *
4
+ * The blob is columns of text and `Dictionary` is a store of words; this is
5
+ * where the one becomes the other. It is worth its own module because the
6
+ * decode is the only part of a lookup that knows the artifact's encoding — the
7
+ * flag letters, the boundary notation, the empty reading that means "derive it"
8
+ * — and none of that should be visible to the index and caching around it.
9
+ */
10
+ import { toCharacters } from "../script/characters.js";
11
+ import { decodeReading } from "./artifact.js";
12
+ import { nameBoundariesIn, PROPER_NOUN_FLAG } from "./artifact-format.js";
13
+ /**
14
+ * Decode one line's columns into an entry.
15
+ *
16
+ * `readingOf` is asked for a single character's stored reading, and is only
17
+ * reached where the line's own reading column is empty.
18
+ */
19
+ export function decodeEntry(word, columns, readingOf, cost) {
20
+ const [reading = "", taiwan = "", partOfSpeech = "", flags = ""] = columns;
21
+ // An empty reading means the word is read as its characters' defaults,
22
+ // which is how 87.8% of multi-character entries are stored.
23
+ const encoded = reading === ""
24
+ ? toCharacters(word)
25
+ .map((character) => readingOf(character) ?? "")
26
+ .join(" ")
27
+ : reading;
28
+ const decoded = decodeReading(encoded) ?? [];
29
+ const taiwanReading = decodeReading(taiwan);
30
+ const nameBoundaries = nameBoundariesIn(flags);
31
+ return {
32
+ word,
33
+ reading: decoded,
34
+ ...(taiwanReading !== undefined && { taiwanReading }),
35
+ partOfSpeech,
36
+ isProperNoun: flags.includes(PROPER_NOUN_FLAG),
37
+ ...(nameBoundaries.length > 0 && { nameBoundaries }),
38
+ cost,
39
+ };
40
+ }
41
+ //# sourceMappingURL=dictionary-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary-entry.js","sourceRoot":"","sources":["../../src/dictionary/dictionary-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA+B1E;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,IAAY,EACZ,OAA0B,EAC1B,SAAoD,EACpD,IAAY;IAEZ,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IAE3E,uEAAuE;IACvE,4DAA4D;IAC5D,MAAM,OAAO,GACX,OAAO,KAAK,EAAE;QACZ,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC;aACf,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;aAC9C,IAAI,CAAC,GAAG,CAAC;QACd,CAAC,CAAC,OAAO,CAAC;IACd,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAC7C,MAAM,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,cAAc,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,OAAO;QAChB,GAAG,CAAC,aAAa,KAAK,SAAS,IAAI,EAAE,aAAa,EAAE,CAAC;QACrD,YAAY;QACZ,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAC9C,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC;QACpD,IAAI;KACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The readings the entry blob holds, short of decoding a whole entry.
3
+ *
4
+ * Three questions that all stop at the reading columns: what one key is read
5
+ * as, what every key is read as, and what else a character can be read as. None
6
+ * of them wants the other four columns, and the first two never leave the
7
+ * string level at all — which is what makes a pass over all 723,147 keys
8
+ * affordable at load time, and what keeps the entry decoder out of this path.
9
+ */
10
+ import type { Syllable } from "../syllable/syllable.js";
11
+ import type { EntryLines } from "./entry-lines.js";
12
+ import type { KeyIndex } from "./key-index.js";
13
+ /**
14
+ * The stored reading of a key, or undefined when it is not a key.
15
+ *
16
+ * Read from the blob without decoding the rest of the line, since deriving a
17
+ * word's reading needs its characters' readings and nothing else about them.
18
+ */
19
+ export declare function storedReadingOf(index: KeyIndex, lines: EntryLines, word: string): string | undefined;
20
+ /**
21
+ * The other readings recorded on a line, after the one the entry names.
22
+ *
23
+ * The lattice needs these for its single-character fallback edges: 行 has to
24
+ * offer `xíng`, `háng` and `héng` at a position no word covers.
25
+ */
26
+ export declare function alternateReadings(lines: EntryLines, at: number): readonly (readonly Syllable[])[];
27
+ /**
28
+ * Every key's reading, in key order, at the string level.
29
+ *
30
+ * The seam a second index over the same artifact is built through.
31
+ *
32
+ * Handed out as a cursor rather than as an array because the array is 39 MB on
33
+ * the full tier. What the cursor holds instead is the character defaults a
34
+ * derived reading is assembled from, and dropping it releases them.
35
+ */
36
+ export interface DictionaryReadings {
37
+ /** How many positions there are, which is the dictionary's own size. */
38
+ readonly size: number;
39
+ /**
40
+ * The reading at a position, in the artifact's tone-numbered spelling.
41
+ *
42
+ * Empty where the position is out of range, or where a character the word is
43
+ * written with is not itself a key.
44
+ */
45
+ readonly readingAt: (at: number) => string;
46
+ }
47
+ /**
48
+ * A cursor over every key's reading, in key order.
49
+ *
50
+ * Two passes, mirroring `readArtifact`: the character defaults are gathered
51
+ * first, because 83.25% of the full tier's keys store no reading and mean "the
52
+ * characters' defaults, in order". Holding the cursor holds those defaults, so
53
+ * build what needs it, use it, and let it go.
54
+ */
55
+ export declare function readingsCursor(index: KeyIndex, lines: EntryLines): DictionaryReadings;
56
+ //# sourceMappingURL=dictionary-readings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary-readings.d.ts","sourceRoot":"","sources":["../../src/dictionary/dictionary-readings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAGpB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,EACjB,EAAE,EAAE,MAAM,GACT,SAAS,CAAC,SAAS,QAAQ,EAAE,CAAC,EAAE,CAKlC;AAmDD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,UAAU,GAChB,kBAAkB,CAiBpB"}
@@ -0,0 +1,93 @@
1
+ import { decodeReading } from "./artifact.js";
2
+ const ALTERNATE = ",";
3
+ /**
4
+ * The stored reading of a key, or undefined when it is not a key.
5
+ *
6
+ * Read from the blob without decoding the rest of the line, since deriving a
7
+ * word's reading needs its characters' readings and nothing else about them.
8
+ */
9
+ export function storedReadingOf(index, lines, word) {
10
+ const found = index.lookup(word);
11
+ return found.isKey ? (lines.columnsAt(found.index)[0] ?? "") : undefined;
12
+ }
13
+ /**
14
+ * The other readings recorded on a line, after the one the entry names.
15
+ *
16
+ * The lattice needs these for its single-character fallback edges: 行 has to
17
+ * offer `xíng`, `háng` and `héng` at a position no word covers.
18
+ */
19
+ export function alternateReadings(lines, at) {
20
+ return (lines.columnsAt(at)[4] ?? "")
21
+ .split(ALTERNATE)
22
+ .map((text) => decodeReading(text))
23
+ .filter((reading) => reading !== undefined);
24
+ }
25
+ /**
26
+ * The lowest code unit that begins a surrogate pair.
27
+ */
28
+ const HIGH_SURROGATE = 0x1_00_00;
29
+ /**
30
+ * Whether a key is written with exactly one character, without allocating.
31
+ *
32
+ * Asked of every key in the dictionary when {@link readingsCursor} gathers the
33
+ * character defaults, which is where splitting each key into characters would
34
+ * cost an array per key for an answer that is a length check.
35
+ */
36
+ function isOneCharacter(key) {
37
+ if (key.length === 1) {
38
+ return true;
39
+ }
40
+ return key.length === 2 && (key.codePointAt(0) ?? 0) >= HIGH_SURROGATE;
41
+ }
42
+ /**
43
+ * A word's reading, joined from its characters' default readings.
44
+ *
45
+ * Walked by code point rather than split into characters first, for the same
46
+ * reason as {@link isOneCharacter}: this runs over every key in the dictionary
47
+ * three times during a reverse index build, and the array `toCharacters`
48
+ * allocates per key is 20% of it.
49
+ *
50
+ * Returns the empty string where any character has no default, which is what a
51
+ * tier missing a character would look like. No tier does: `selectTier` never
52
+ * drops a character some word is written with.
53
+ */
54
+ function derivedReading(key, defaults) {
55
+ let joined = "";
56
+ let at = 0;
57
+ while (at < key.length) {
58
+ const width = (key.codePointAt(at) ?? 0) >= HIGH_SURROGATE ? 2 : 1;
59
+ const value = defaults.get(key.slice(at, at + width));
60
+ if (value === undefined) {
61
+ return "";
62
+ }
63
+ joined = joined === "" ? value : `${joined} ${value}`;
64
+ at += width;
65
+ }
66
+ return joined;
67
+ }
68
+ /**
69
+ * A cursor over every key's reading, in key order.
70
+ *
71
+ * Two passes, mirroring `readArtifact`: the character defaults are gathered
72
+ * first, because 83.25% of the full tier's keys store no reading and mean "the
73
+ * characters' defaults, in order". Holding the cursor holds those defaults, so
74
+ * build what needs it, use it, and let it go.
75
+ */
76
+ export function readingsCursor(index, lines) {
77
+ const defaults = new Map();
78
+ for (let at = 0; at < index.size; at++) {
79
+ const key = index.keyAt(at);
80
+ const reading = isOneCharacter(key) ? lines.readingColumnAt(at) : "";
81
+ if (reading !== "") {
82
+ defaults.set(key, reading);
83
+ }
84
+ }
85
+ return {
86
+ size: index.size,
87
+ readingAt: (at) => {
88
+ const stored = lines.readingColumnAt(at);
89
+ return stored === "" ? derivedReading(index.keyAt(at), defaults) : stored;
90
+ },
91
+ };
92
+ }
93
+ //# sourceMappingURL=dictionary-readings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary-readings.js","sourceRoot":"","sources":["../../src/dictionary/dictionary-readings.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI9C,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAe,EACf,KAAiB,EACjB,IAAY;IAEZ,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,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AC"}
@@ -1,55 +1,9 @@
1
1
  import type { Syllable } from "../syllable/syllable.js";
2
- import { type DictionaryArtifact } from "./artifact.js";
3
- /**
4
- * Every key's reading, in key order, at the string level.
5
- *
6
- * The seam a second index over the same artifact is built through. A reading is
7
- * `yin2 hang2` on the way in and on the way out, and no {@link Syllable} is
8
- * constructed anywhere along it — which is what makes a pass over all 723,147
9
- * keys affordable at load time rather than a decode of the whole dictionary.
10
- *
11
- * Handed out as a cursor rather than as an array because the array is 39 MB on
12
- * the full tier. What the cursor holds instead is the character defaults a
13
- * derived reading is assembled from, and dropping it releases them.
14
- */
15
- export interface DictionaryReadings {
16
- /** How many positions there are, which is the dictionary's own size. */
17
- readonly size: number;
18
- /**
19
- * The reading at a position, in the artifact's tone-numbered spelling.
20
- *
21
- * Empty where the position is out of range, or where a character the word is
22
- * written with is not itself a key.
23
- */
24
- readonly readingAt: (at: number) => string;
25
- }
26
- /**
27
- * What the dictionary knows about one word.
28
- */
29
- export interface WordEntry {
30
- readonly word: string;
31
- /** 普通话 reading. */
32
- readonly reading: readonly Syllable[];
33
- /** 國語 reading, absent when it does not differ. */
34
- readonly taiwanReading?: readonly Syllable[];
35
- readonly partOfSpeech: string;
36
- readonly isProperNoun: boolean;
37
- /**
38
- * Where a proper name divides into its parts, in characters.
39
- *
40
- * Present only where CC-CEDICT's own capitalisation divides it: 齐白石 is
41
- * `[Qi2 Bai2 shi2]`, 司马迁 `[Si1 ma3 Qian1]`, 上海交通大学
42
- * `[Shang4 hai3 Jiao1 tong1 Da4 xue2]`. Absent for 马克思 `[Ma3 ke4 si1]`,
43
- * which is why a transliteration stays one word.
44
- */
45
- readonly nameBoundaries?: readonly number[];
46
- /**
47
- * Decoding cost, where lower means more likely.
48
- *
49
- * Quantised from the corpus frequency; see {@link FrequencyTable.costOf}.
50
- */
51
- readonly cost: number;
52
- }
2
+ import type { DictionaryArtifact } from "./artifact.js";
3
+ import { type WordEntry } from "./dictionary-entry.js";
4
+ import { type DictionaryReadings } from "./dictionary-readings.js";
5
+ export type { WordEntry } from "./dictionary-entry.js";
6
+ export type { DictionaryReadings } from "./dictionary-readings.js";
53
7
  /**
54
8
  * A compiled dictionary, queried without being parsed.
55
9
  *
@@ -76,7 +30,7 @@ export declare class Dictionary {
76
30
  */
77
31
  static from(artifact: DictionaryArtifact): Dictionary;
78
32
  /**
79
- * Scan the entry blob for its line starts. Use {@link Dictionary.from}.
33
+ * Wrap an artifact's blobs. Use {@link Dictionary.from}.
80
34
  */
81
35
  private constructor();
82
36
  /**
@@ -103,11 +57,6 @@ export declare class Dictionary {
103
57
  frequencyAt(at: number): number;
104
58
  /**
105
59
  * A cursor over every key's reading, in key order.
106
- *
107
- * Two passes, mirroring `readArtifact`: the character defaults are gathered
108
- * first, because 83.25% of the full tier's keys store no reading and mean
109
- * "the characters' defaults, in order". Holding the cursor holds those
110
- * defaults, so build what needs it, use it, and let it go.
111
60
  */
112
61
  readingsInOrder(): DictionaryReadings;
113
62
  /**
@@ -129,9 +78,6 @@ export declare class Dictionary {
129
78
  /**
130
79
  * Every reading a single character is known to take, most likely first.
131
80
  *
132
- * The lattice needs these for its single-character fallback edges: 行 has to
133
- * offer `xíng`, `háng` and `héng` at a position no word covers.
134
- *
135
81
  * The alternates are read off the canonical form's line, the same form
136
82
  * {@link Dictionary.lookup} found the entry under. Searching the index for
137
83
  * the raw character instead would land on the insertion point for a Hong Kong
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../src/dictionary/dictionary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AA0EvE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,CAA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