@gukhanmun/types 0.2.0-dev.96 → 0.3.0-dev.153
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 +12 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ type Preset = "ko-kr" | "ko-kp";
|
|
|
50
50
|
* `RenderMode::Original`.
|
|
51
51
|
*/
|
|
52
52
|
type RenderMode = "hangul-only" | "hangul-hanja-parens" | "hanja-hangul-parens" | "ruby-on-hangul" | "ruby-on-hanja" | "original";
|
|
53
|
+
/** The hanja variant set applied after dictionary recognition. */
|
|
54
|
+
type HanjaVariantSet = "as-dictionary" | "shinjitai" | "kanxi" | "simplified" | "asahimoji";
|
|
53
55
|
/**
|
|
54
56
|
* Selects how glosses are rendered when {@link RenderMode} is `"original"`.
|
|
55
57
|
*
|
|
@@ -99,11 +101,13 @@ type Segmentation = "lattice" | "eager";
|
|
|
99
101
|
* (`十百千萬億兆京`) using stack-based accumulation and produce Arabic,
|
|
100
102
|
* respecting the Korean convention that bare `十` means 10 not `一十`.
|
|
101
103
|
* Corresponds to Rust `NumeralStrategy::AdditiveArabic`.
|
|
102
|
-
* - `"smart"` — Uses `"additive-arabic"`
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
104
|
+
* - `"smart"` — Uses `"additive-arabic"` for additive numerals that
|
|
105
|
+
* begin with a digit, and for small-place-marker starts (`十`, `百`,
|
|
106
|
+
* `千`) unless the next character is an ambiguous non-unit hanja word
|
|
107
|
+
* character; uses `"positional-arabic"` for pure-digit runs of four or
|
|
108
|
+
* more characters (year convention) or when a unit hanja follows the
|
|
109
|
+
* digit run (`年月日時分秒號世紀` and others); otherwise falls back to
|
|
110
|
+
* `"hangul-phonetic"`. Corresponds to Rust `NumeralStrategy::Smart`.
|
|
107
111
|
*/
|
|
108
112
|
type NumeralStrategy = "hangul-phonetic" | "positional-arabic" | "additive-arabic" | "smart";
|
|
109
113
|
/**
|
|
@@ -312,6 +316,8 @@ interface GukhanmunOptions {
|
|
|
312
316
|
* @see {@link OriginalGloss}
|
|
313
317
|
*/
|
|
314
318
|
readonly originalGloss?: OriginalGloss;
|
|
319
|
+
/** The hanja variant set. Defaults to `"as-dictionary"`. */
|
|
320
|
+
readonly hanjaVariantSet?: HanjaVariantSet;
|
|
315
321
|
/**
|
|
316
322
|
* Hanja-span segmentation algorithm. Defaults to `"lattice"`.
|
|
317
323
|
*
|
|
@@ -570,4 +576,4 @@ declare class GukhanmunError extends Error {
|
|
|
570
576
|
}[];
|
|
571
577
|
}
|
|
572
578
|
//#endregion
|
|
573
|
-
export { ContextWindow, DictionaryEntry, DictionarySource, Directives, ErrorCode, FileDictionarySource, Format, Gukhanmun, GukhanmunError, GukhanmunFactory, GukhanmunOptions, HomophoneDetection, HtmlOptions, NumeralStrategy, OriginalGloss, Preset, Recovery, RenderMode, Segmentation, load };
|
|
579
|
+
export { ContextWindow, DictionaryEntry, DictionarySource, Directives, ErrorCode, FileDictionarySource, Format, Gukhanmun, GukhanmunError, GukhanmunFactory, GukhanmunOptions, HanjaVariantSet, HomophoneDetection, HtmlOptions, NumeralStrategy, OriginalGloss, Preset, Recovery, RenderMode, Segmentation, load };
|