@gukhanmun/wasm 0.1.2-dev.31 → 0.2.0-dev.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +21 -6
- package/dist/index.js +2 -0
- package/dist/wasm/deno/README.md +1 -1
- package/dist/wasm/deno/gukhanmun_wasm_bg.wasm +0 -0
- package/dist/wasm/nodejs/README.md +1 -1
- package/dist/wasm/nodejs/gukhanmun_wasm_bg.wasm +0 -0
- package/dist/wasm/nodejs/package.json +1 -1
- package/dist/wasm/web/README.md +1 -1
- package/dist/wasm/web/gukhanmun_wasm_bg.wasm +0 -0
- package/dist/wasm/web/package.json +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* disambiguation, and the bundled *Standard Korean Language Dictionary*
|
|
19
19
|
* (標準國語大辭典). Corresponds to Rust `Preset::KoKr`.
|
|
20
20
|
* - `"ko-kp"` — North Korean orthography: no initial sound law (래일,
|
|
21
|
-
* 류행, 녀자), no bundled dictionary. Corresponds to Rust `Preset::KoKp`.
|
|
21
|
+
* 류행, 녀자), no bundled dictionary data. Corresponds to Rust `Preset::KoKp`.
|
|
22
22
|
*
|
|
23
23
|
* Both presets default `rendering` to `"hangul-only"` and `segmentation` to
|
|
24
24
|
* `"lattice"`. Individual options passed to {@link GukhanmunOptions} override
|
|
@@ -363,6 +363,19 @@ interface GukhanmunOptions {
|
|
|
363
363
|
* @see {@link ContextWindow}
|
|
364
364
|
*/
|
|
365
365
|
readonly firstOccurrenceWindow?: ContextWindow;
|
|
366
|
+
/**
|
|
367
|
+
* Whether to collapse redundant parenthetical reading annotations. Defaults
|
|
368
|
+
* to `true`.
|
|
369
|
+
*
|
|
370
|
+
* When enabled, an explicit gloss such as `庫間(곳간)` or `곳간(庫間)` is
|
|
371
|
+
* recognised, the redundant parenthetical is removed, and the annotation is
|
|
372
|
+
* shown in both scripts in every render mode. A parenthetical that pins an
|
|
373
|
+
* alternative reading (for example `數字(수자)`) overrides the dictionary
|
|
374
|
+
* reading for that occurrence. A parenthetical that is a definition rather
|
|
375
|
+
* than a reading (for example `庫間(물건을 간직하여 두는 곳)`) is left
|
|
376
|
+
* untouched.
|
|
377
|
+
*/
|
|
378
|
+
readonly collapseRedundantParens?: boolean;
|
|
366
379
|
/**
|
|
367
380
|
* Error recovery policy for HTML scanning. Defaults to `"strict"`.
|
|
368
381
|
* Ignored for non-HTML input formats.
|
|
@@ -373,12 +386,14 @@ interface GukhanmunOptions {
|
|
|
373
386
|
/**
|
|
374
387
|
* Ordered list of dictionary sources. Sources are queried in order;
|
|
375
388
|
* earlier entries take precedence. When omitted (or empty), only the
|
|
376
|
-
* fallback Unihan character map is used (no
|
|
389
|
+
* fallback Unihan character map is used (no bundled dictionaries).
|
|
377
390
|
*
|
|
378
|
-
*
|
|
379
|
-
* automatically include
|
|
380
|
-
* Language Dictionary*, add `@gukhanmun/stdict-fst` or
|
|
381
|
-
* `@gukhanmun/stdict-cdb` explicitly.
|
|
391
|
+
* JavaScript presets do **not**
|
|
392
|
+
* automatically include bundled dictionary data. To use the *Standard
|
|
393
|
+
* Korean Language Dictionary*, add `@gukhanmun/stdict-fst` or
|
|
394
|
+
* `@gukhanmun/stdict-cdb` explicitly. To use Open Korean Dictionary
|
|
395
|
+
* categories, add `@gukhanmun/opendict-fst` or
|
|
396
|
+
* `@gukhanmun/opendict-cdb` explicitly.
|
|
382
397
|
*
|
|
383
398
|
* @see {@link DictionarySource}
|
|
384
399
|
*/
|
package/dist/index.js
CHANGED
|
@@ -208,6 +208,7 @@ function resolveOptions(opts = {}) {
|
|
|
208
208
|
homophoneWindow: opts.homophoneWindow ?? (koKp ? "off" : "per-block"),
|
|
209
209
|
homophoneDetection: opts.homophoneDetection ?? "context-local",
|
|
210
210
|
firstOccurrenceWindow: opts.firstOccurrenceWindow ?? "off",
|
|
211
|
+
collapseRedundantParens: opts.collapseRedundantParens ?? true,
|
|
211
212
|
recovery: opts.recovery ?? "strict"
|
|
212
213
|
};
|
|
213
214
|
}
|
|
@@ -252,6 +253,7 @@ function buildRawOptions(opts, resolved) {
|
|
|
252
253
|
homophoneWindow: resolved.homophoneWindow,
|
|
253
254
|
homophoneDetection: resolved.homophoneDetection,
|
|
254
255
|
firstOccurrenceWindow: resolved.firstOccurrenceWindow,
|
|
256
|
+
collapseRedundantParens: resolved.collapseRedundantParens,
|
|
255
257
|
recovery: resolved.recovery
|
|
256
258
|
};
|
|
257
259
|
if (resolved.rendering === "original" && opts.originalGloss != null) raw["originalGloss"] = opts.originalGloss;
|
package/dist/wasm/deno/README.md
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/wasm/web/README.md
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gukhanmun/wasm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-dev.115",
|
|
4
4
|
"description": "WebAssembly implementation of the Gukhanmun hanja-to-hangul converter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@gukhanmun/types": "*"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@gukhanmun/types": "0.
|
|
48
|
+
"@gukhanmun/types": "0.2.0-dev.115+7e9dc967239aee2ac70b52d2149d745fa2a18545"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsdown && node -e \"const fs=require('node:fs'),p=require('node:path');fs.cpSync('wasm','dist/wasm',{recursive:true,force:true,filter:(s)=>p.basename(s)!=='.gitignore'})\""
|