@gukhanmun/wasm 0.2.0-dev.42 → 0.2.0-dev.59
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
CHANGED
|
@@ -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.
|
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;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gukhanmun/wasm",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.59",
|
|
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.2.0-dev.
|
|
48
|
+
"@gukhanmun/types": "0.2.0-dev.59+4dabd6074014de7775a4080848fd6b2e69282d63"
|
|
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'})\""
|