lindera-wasm-web 3.0.6 → 4.0.0
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/lindera_wasm.d.ts +31 -34
- package/lindera_wasm.js +8 -21
- package/lindera_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/lindera_wasm.d.ts
CHANGED
|
@@ -66,6 +66,9 @@ export class LinderaError {
|
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Dictionary metadata configuration.
|
|
69
|
+
*
|
|
70
|
+
* A thin wasm-bindgen wrapper over [`lindera_binding_core::CoreMetadata`], which
|
|
71
|
+
* owns the default values and the schema wiring.
|
|
69
72
|
*/
|
|
70
73
|
export class Metadata {
|
|
71
74
|
free(): void;
|
|
@@ -112,6 +115,9 @@ export class Penalty {
|
|
|
112
115
|
|
|
113
116
|
/**
|
|
114
117
|
* Dictionary schema definition.
|
|
118
|
+
*
|
|
119
|
+
* A thin wasm-bindgen wrapper over [`lindera_binding_core::CoreSchema`], which
|
|
120
|
+
* owns the field storage, the name-to-index map, and the field lookups.
|
|
115
121
|
*/
|
|
116
122
|
export class Schema {
|
|
117
123
|
free(): void;
|
|
@@ -126,15 +132,6 @@ export class Schema {
|
|
|
126
132
|
constructor(fields: string[]);
|
|
127
133
|
}
|
|
128
134
|
|
|
129
|
-
/**
|
|
130
|
-
* Core segmenter for morphological analysis.
|
|
131
|
-
*/
|
|
132
|
-
export class Segmenter {
|
|
133
|
-
private constructor();
|
|
134
|
-
free(): void;
|
|
135
|
-
[Symbol.dispose](): void;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
135
|
/**
|
|
139
136
|
* Token object wrapping the Rust Token data.
|
|
140
137
|
*
|
|
@@ -215,7 +212,8 @@ export class Tokenizer {
|
|
|
215
212
|
*
|
|
216
213
|
* `TokenizerBuilder` provides a fluent API for configuring and building a tokenizer
|
|
217
214
|
* with various options such as dictionary selection, tokenization mode, character filters,
|
|
218
|
-
* and token filters.
|
|
215
|
+
* and token filters. The build-flow orchestration is delegated to
|
|
216
|
+
* [`lindera_binding_core::CoreTokenizerBuilder`].
|
|
219
217
|
*/
|
|
220
218
|
export class TokenizerBuilder {
|
|
221
219
|
free(): void;
|
|
@@ -377,15 +375,24 @@ export interface InitOutput {
|
|
|
377
375
|
readonly tokenizerbuilder_setUserDictionaryInstance: (a: number, b: number) => void;
|
|
378
376
|
readonly tokenizerbuilder_set_dictionary: (a: number, b: number, c: number) => [number, number];
|
|
379
377
|
readonly tokenizerbuilder_set_dictionary_instance: (a: number, b: number) => void;
|
|
380
|
-
readonly tokenizerbuilder_set_keep_whitespace: (a: number, b: number) => [number, number];
|
|
381
378
|
readonly tokenizerbuilder_set_mode: (a: number, b: number, c: number) => [number, number];
|
|
382
379
|
readonly tokenizerbuilder_set_user_dictionary: (a: number, b: number, c: number) => [number, number];
|
|
383
380
|
readonly tokenizerbuilder_set_user_dictionary_instance: (a: number, b: number) => void;
|
|
384
|
-
readonly
|
|
381
|
+
readonly __wbg_get_token_byte_end: (a: number) => number;
|
|
382
|
+
readonly __wbg_get_token_details: (a: number) => [number, number];
|
|
383
|
+
readonly __wbg_get_token_is_unknown: (a: number) => number;
|
|
384
|
+
readonly __wbg_get_token_position: (a: number) => number;
|
|
385
|
+
readonly __wbg_get_token_word_id: (a: number) => number;
|
|
385
386
|
readonly __wbg_metadata_free: (a: number, b: number) => void;
|
|
386
|
-
readonly
|
|
387
|
-
readonly
|
|
388
|
-
readonly
|
|
387
|
+
readonly __wbg_set_token_byte_end: (a: number, b: number) => void;
|
|
388
|
+
readonly __wbg_set_token_details: (a: number, b: number, c: number) => void;
|
|
389
|
+
readonly __wbg_set_token_is_unknown: (a: number, b: number) => void;
|
|
390
|
+
readonly __wbg_set_token_position: (a: number, b: number) => void;
|
|
391
|
+
readonly __wbg_set_token_word_id: (a: number, b: number) => void;
|
|
392
|
+
readonly __wbg_token_free: (a: number, b: number) => void;
|
|
393
|
+
readonly build_dictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
394
|
+
readonly build_user_dictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
395
|
+
readonly getVersion: () => [number, number];
|
|
389
396
|
readonly jsmetadata_createDefault: () => number;
|
|
390
397
|
readonly jsmetadata_dictionary_schema: (a: number) => number;
|
|
391
398
|
readonly jsmetadata_encoding: (a: number) => [number, number];
|
|
@@ -396,6 +403,11 @@ export interface InitOutput {
|
|
|
396
403
|
readonly jsmetadata_set_name: (a: number, b: number, c: number) => void;
|
|
397
404
|
readonly jsmetadata_set_user_dictionary_schema: (a: number, b: number) => void;
|
|
398
405
|
readonly jsmetadata_user_dictionary_schema: (a: number) => number;
|
|
406
|
+
readonly load_dictionary: (a: number, b: number) => [number, number, number];
|
|
407
|
+
readonly load_dictionary_from_bytes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => [number, number, number];
|
|
408
|
+
readonly load_user_dictionary: (a: number, b: number, c: number) => [number, number, number];
|
|
409
|
+
readonly token_getDetail: (a: number, b: number) => [number, number];
|
|
410
|
+
readonly token_toJSON: (a: number) => any;
|
|
399
411
|
readonly __wbg_dictionary_free: (a: number, b: number) => void;
|
|
400
412
|
readonly __wbg_userdictionary_free: (a: number, b: number) => void;
|
|
401
413
|
readonly buildDictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
@@ -410,31 +422,15 @@ export interface InitOutput {
|
|
|
410
422
|
readonly __wbg_get_penalty_kanji_penalty_length_threshold: (a: number) => number;
|
|
411
423
|
readonly __wbg_get_penalty_other_penalty_length_penalty: (a: number) => number;
|
|
412
424
|
readonly __wbg_get_penalty_other_penalty_length_threshold: (a: number) => number;
|
|
413
|
-
readonly
|
|
414
|
-
readonly __wbg_get_token_details: (a: number) => [number, number];
|
|
415
|
-
readonly __wbg_get_token_is_unknown: (a: number) => number;
|
|
416
|
-
readonly __wbg_get_token_position: (a: number) => number;
|
|
417
|
-
readonly __wbg_get_token_word_id: (a: number) => number;
|
|
425
|
+
readonly __wbg_linderaerror_free: (a: number, b: number) => void;
|
|
418
426
|
readonly __wbg_penalty_free: (a: number, b: number) => void;
|
|
419
427
|
readonly __wbg_set_penalty_kanji_penalty_length_penalty: (a: number, b: number) => void;
|
|
420
428
|
readonly __wbg_set_penalty_kanji_penalty_length_threshold: (a: number, b: number) => void;
|
|
421
429
|
readonly __wbg_set_penalty_other_penalty_length_penalty: (a: number, b: number) => void;
|
|
422
430
|
readonly __wbg_set_penalty_other_penalty_length_threshold: (a: number, b: number) => void;
|
|
423
|
-
readonly
|
|
424
|
-
readonly
|
|
425
|
-
readonly __wbg_set_token_is_unknown: (a: number, b: number) => void;
|
|
426
|
-
readonly __wbg_set_token_position: (a: number, b: number) => void;
|
|
427
|
-
readonly __wbg_set_token_word_id: (a: number, b: number) => void;
|
|
428
|
-
readonly __wbg_token_free: (a: number, b: number) => void;
|
|
431
|
+
readonly jslinderaerror_new: (a: number, b: number) => number;
|
|
432
|
+
readonly jslinderaerror_toString: (a: number) => [number, number];
|
|
429
433
|
readonly jspenalty_new: (a: number, b: number, c: number, d: number) => number;
|
|
430
|
-
readonly token_getDetail: (a: number, b: number) => [number, number];
|
|
431
|
-
readonly token_toJSON: (a: number) => any;
|
|
432
|
-
readonly build_dictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
433
|
-
readonly build_user_dictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
434
|
-
readonly getVersion: () => [number, number];
|
|
435
|
-
readonly load_dictionary: (a: number, b: number) => [number, number, number];
|
|
436
|
-
readonly load_dictionary_from_bytes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => [number, number, number];
|
|
437
|
-
readonly load_user_dictionary: (a: number, b: number, c: number) => [number, number, number];
|
|
438
434
|
readonly __wbg_fielddefinition_free: (a: number, b: number) => void;
|
|
439
435
|
readonly __wbg_get_fielddefinition_description: (a: number) => [number, number];
|
|
440
436
|
readonly __wbg_get_fielddefinition_field_type: (a: number) => number;
|
|
@@ -461,6 +457,7 @@ export interface InitOutput {
|
|
|
461
457
|
readonly __wbg_set_token_surface: (a: number, b: number, c: number) => void;
|
|
462
458
|
readonly __wbg_set_linderaerror_message: (a: number, b: number, c: number) => void;
|
|
463
459
|
readonly version: () => [number, number];
|
|
460
|
+
readonly tokenizerbuilder_set_keep_whitespace: (a: number, b: number) => [number, number];
|
|
464
461
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
465
462
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
466
463
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/lindera_wasm.js
CHANGED
|
@@ -265,6 +265,9 @@ if (Symbol.dispose) LinderaError.prototype[Symbol.dispose] = LinderaError.protot
|
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* Dictionary metadata configuration.
|
|
268
|
+
*
|
|
269
|
+
* A thin wasm-bindgen wrapper over [`lindera_binding_core::CoreMetadata`], which
|
|
270
|
+
* owns the default values and the schema wiring.
|
|
268
271
|
*/
|
|
269
272
|
export class Metadata {
|
|
270
273
|
static __wrap(ptr) {
|
|
@@ -487,6 +490,9 @@ if (Symbol.dispose) Penalty.prototype[Symbol.dispose] = Penalty.prototype.free;
|
|
|
487
490
|
|
|
488
491
|
/**
|
|
489
492
|
* Dictionary schema definition.
|
|
493
|
+
*
|
|
494
|
+
* A thin wasm-bindgen wrapper over [`lindera_binding_core::CoreSchema`], which
|
|
495
|
+
* owns the field storage, the name-to-index map, and the field lookups.
|
|
490
496
|
*/
|
|
491
497
|
export class Schema {
|
|
492
498
|
static __wrap(ptr) {
|
|
@@ -585,23 +591,6 @@ export class Schema {
|
|
|
585
591
|
}
|
|
586
592
|
if (Symbol.dispose) Schema.prototype[Symbol.dispose] = Schema.prototype.free;
|
|
587
593
|
|
|
588
|
-
/**
|
|
589
|
-
* Core segmenter for morphological analysis.
|
|
590
|
-
*/
|
|
591
|
-
export class Segmenter {
|
|
592
|
-
__destroy_into_raw() {
|
|
593
|
-
const ptr = this.__wbg_ptr;
|
|
594
|
-
this.__wbg_ptr = 0;
|
|
595
|
-
SegmenterFinalization.unregister(this);
|
|
596
|
-
return ptr;
|
|
597
|
-
}
|
|
598
|
-
free() {
|
|
599
|
-
const ptr = this.__destroy_into_raw();
|
|
600
|
-
wasm.__wbg_segmenter_free(ptr, 0);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
if (Symbol.dispose) Segmenter.prototype[Symbol.dispose] = Segmenter.prototype.free;
|
|
604
|
-
|
|
605
594
|
/**
|
|
606
595
|
* Token object wrapping the Rust Token data.
|
|
607
596
|
*
|
|
@@ -880,7 +869,8 @@ if (Symbol.dispose) Tokenizer.prototype[Symbol.dispose] = Tokenizer.prototype.fr
|
|
|
880
869
|
*
|
|
881
870
|
* `TokenizerBuilder` provides a fluent API for configuring and building a tokenizer
|
|
882
871
|
* with various options such as dictionary selection, tokenization mode, character filters,
|
|
883
|
-
* and token filters.
|
|
872
|
+
* and token filters. The build-flow orchestration is delegated to
|
|
873
|
+
* [`lindera_binding_core::CoreTokenizerBuilder`].
|
|
884
874
|
*/
|
|
885
875
|
export class TokenizerBuilder {
|
|
886
876
|
__destroy_into_raw() {
|
|
@@ -1642,9 +1632,6 @@ const PenaltyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1642
1632
|
const SchemaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1643
1633
|
? { register: () => {}, unregister: () => {} }
|
|
1644
1634
|
: new FinalizationRegistry(ptr => wasm.__wbg_schema_free(ptr >>> 0, 1));
|
|
1645
|
-
const SegmenterFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1646
|
-
? { register: () => {}, unregister: () => {} }
|
|
1647
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_segmenter_free(ptr >>> 0, 1));
|
|
1648
1635
|
const TokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1649
1636
|
? { register: () => {}, unregister: () => {} }
|
|
1650
1637
|
: new FinalizationRegistry(ptr => wasm.__wbg_token_free(ptr >>> 0, 1));
|
package/lindera_wasm_bg.wasm
CHANGED
|
Binary file
|