lindera-wasm-web 2.3.4 → 3.0.1
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/README.md +25 -136
- package/lindera_wasm.d.ts +109 -71
- package/lindera_wasm.js +189 -74
- package/lindera_wasm_bg.wasm +0 -0
- package/opfs.d.ts +84 -0
- package/opfs.js +358 -0
- package/package.json +16 -4
package/README.md
CHANGED
|
@@ -10,100 +10,42 @@ WebAssembly of Lindera
|
|
|
10
10
|
|
|
11
11
|
## npm
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- <https://www.npmjs.com/package/lindera-wasm-web> — Lindera WASM for Web
|
|
14
|
+
- <https://www.npmjs.com/package/lindera-wasm-bundler> — Lindera WASM for Bundler
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
Lindera WASM without a dictionary for Web
|
|
16
|
+
## Dictionary
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- <https://www.npmjs.com/package/lindera-wasm-ipadic-web>
|
|
22
|
-
Lindera WASM with Japanese dictionary (IPADIC) for Web
|
|
23
|
-
|
|
24
|
-
- <https://www.npmjs.com/package/lindera-wasm-unidic-web>
|
|
25
|
-
Lindera WASM with Japanese dictionary (UniDic) for Web
|
|
26
|
-
|
|
27
|
-
- <https://www.npmjs.com/package/lindera-wasm-ko-dic-web>
|
|
28
|
-
Lindera WASM with Korean dictionary (ko-dic) for Web
|
|
29
|
-
|
|
30
|
-
- <https://www.npmjs.com/package/lindera-wasm-cc-cedict-web>
|
|
31
|
-
Lindera WASM with Chinese dictionary (CC-CEDICT) for Web
|
|
32
|
-
|
|
33
|
-
### For Node.js
|
|
34
|
-
|
|
35
|
-
- <https://www.npmjs.com/package/lindera-wasm-nodejs>
|
|
36
|
-
Lindera WASM without a dictionary for Node.js
|
|
37
|
-
|
|
38
|
-
- <https://www.npmjs.com/package/lindera-wasm-cjk-nodejs>
|
|
39
|
-
Lindera WASM with CJK dictionaries (IPADIC, ko-dic, CC-CEDICT) for Node.js
|
|
40
|
-
|
|
41
|
-
- <https://www.npmjs.com/package/lindera-wasm-ipadic-nodejs>
|
|
42
|
-
Lindera WASM with Japanese dictionary (IPADIC) for Node.js
|
|
43
|
-
|
|
44
|
-
- <https://www.npmjs.com/package/lindera-wasm-unidic-nodejs>
|
|
45
|
-
Lindera WASM with Japanese dictionary (UniDic) for Node.js
|
|
46
|
-
|
|
47
|
-
- <https://www.npmjs.com/package/lindera-wasm-ko-dic-nodejs>
|
|
48
|
-
Lindera WASM with Korean dictionary (ko-dic) for Node.js
|
|
49
|
-
|
|
50
|
-
- <https://www.npmjs.com/package/lindera-wasm-cc-cedict-nodejs>
|
|
51
|
-
Lindera WASM with Chinese dictionary (CC-CEDICT) for Node.js
|
|
52
|
-
|
|
53
|
-
### For bundler
|
|
54
|
-
|
|
55
|
-
- <https://www.npmjs.com/package/lindera-wasm-bundler>
|
|
56
|
-
Lindera WASM without a dictionary for Bundler
|
|
57
|
-
|
|
58
|
-
- <https://www.npmjs.com/package/lindera-wasm-cjk-bundler>
|
|
59
|
-
Lindera WASM with CJK dictionaries (IPADIC, ko-dic, CC-CEDICT) for Bundler
|
|
60
|
-
|
|
61
|
-
- <https://www.npmjs.com/package/lindera-wasm-ipadic-bundler>
|
|
62
|
-
Lindera WASM with Japanese dictionary (IPADIC) for Bundler
|
|
63
|
-
|
|
64
|
-
- <https://www.npmjs.com/package/lindera-wasm-unidic-bundler>
|
|
65
|
-
Lindera WASM with Japanese dictionary (UniDic) for Bundler
|
|
66
|
-
|
|
67
|
-
- <https://www.npmjs.com/package/lindera-wasm-ko-dic-bundler>
|
|
68
|
-
Lindera WASM with Korean dictionary (ko-dic) for Bundler
|
|
69
|
-
|
|
70
|
-
- <https://www.npmjs.com/package/lindera-wasm-cc-cedict-bundler>
|
|
71
|
-
Lindera WASM with Chinese dictionary (CC-CEDICT) for Bundler
|
|
18
|
+
Pre-built dictionaries are available from [GitHub Releases](https://github.com/lindera/lindera/releases).
|
|
19
|
+
Download a dictionary archive (e.g. `lindera-ipadic-*.zip`) and load it at runtime using the OPFS API.
|
|
20
|
+
See the [example application](example/) for a working demo of downloading and loading dictionaries.
|
|
72
21
|
|
|
73
22
|
## Usage
|
|
74
23
|
|
|
75
24
|
### Web Usage
|
|
76
25
|
|
|
77
|
-
Use the
|
|
78
|
-
|
|
79
|
-
```html
|
|
80
|
-
<script type="module">
|
|
81
|
-
import __wbg_init, { TokenizerBuilder } from 'https://cdn.jsdelivr.net/npm/lindera-wasm-ipadic-web/lindera_wasm.js';
|
|
82
|
-
|
|
83
|
-
__wbg_init().then(() => {
|
|
84
|
-
const builder = new TokenizerBuilder();
|
|
85
|
-
builder.setDictionary("embedded://ipadic");
|
|
86
|
-
builder.setMode("normal");
|
|
87
|
-
const tokenizer = builder.build();
|
|
88
|
-
|
|
89
|
-
const tokens = tokenizer.tokenize("すもももももももものうち");
|
|
90
|
-
tokens.forEach(token => {
|
|
91
|
-
console.log(`${token.surface}: ${token.details.join(", ")}`);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
</script>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Or with a bundler:
|
|
26
|
+
Use the `lindera-wasm-web` package for browser environments.
|
|
27
|
+
Dictionaries are loaded at runtime from a local path or downloaded from [GitHub Releases](https://github.com/lindera/lindera/releases) using the OPFS API.
|
|
98
28
|
|
|
99
29
|
```js
|
|
100
|
-
import __wbg_init, { TokenizerBuilder } from 'lindera-wasm-
|
|
30
|
+
import __wbg_init, { TokenizerBuilder, loadDictionaryFromBytes } from 'lindera-wasm-web';
|
|
31
|
+
import { downloadDictionary, loadDictionaryFiles } from 'lindera-wasm-web/opfs';
|
|
101
32
|
|
|
102
33
|
async function main() {
|
|
103
34
|
await __wbg_init();
|
|
104
35
|
|
|
36
|
+
// Download dictionary from GitHub Releases (first time only)
|
|
37
|
+
await downloadDictionary("https://github.com/lindera/lindera/releases/download/v3.0.0/lindera-ipadic-3.0.0.zip", "ipadic");
|
|
38
|
+
|
|
39
|
+
// Load dictionary from OPFS
|
|
40
|
+
const files = await loadDictionaryFiles("ipadic");
|
|
41
|
+
const dict = loadDictionaryFromBytes(
|
|
42
|
+
files.metadata, files.dictDa, files.dictVals,
|
|
43
|
+
files.dictWordsIdx, files.dictWords, files.matrixMtx,
|
|
44
|
+
files.charDef, files.unk
|
|
45
|
+
);
|
|
46
|
+
|
|
105
47
|
const builder = new TokenizerBuilder();
|
|
106
|
-
builder.
|
|
48
|
+
builder.setDictionaryInstance(dict);
|
|
107
49
|
builder.setMode("normal");
|
|
108
50
|
const tokenizer = builder.build();
|
|
109
51
|
|
|
@@ -116,63 +58,10 @@ async function main() {
|
|
|
116
58
|
main();
|
|
117
59
|
```
|
|
118
60
|
|
|
119
|
-
### Node.js Usage
|
|
120
|
-
|
|
121
|
-
Use the `-nodejs` packages for Node.js environments:
|
|
122
|
-
|
|
123
|
-
```js
|
|
124
|
-
const { TokenizerBuilder } = require('lindera-wasm-ipadic-nodejs');
|
|
125
|
-
|
|
126
|
-
const builder = new TokenizerBuilder();
|
|
127
|
-
builder.setDictionary("embedded://ipadic");
|
|
128
|
-
builder.setMode("normal");
|
|
129
|
-
const tokenizer = builder.build();
|
|
130
|
-
|
|
131
|
-
const tokens = tokenizer.tokenize("すもももももももものうち");
|
|
132
|
-
tokens.forEach(token => {
|
|
133
|
-
console.log(`${token.surface}: ${token.details.join(", ")}`);
|
|
134
|
-
});
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Or with ESM:
|
|
138
|
-
|
|
139
|
-
```js
|
|
140
|
-
import { TokenizerBuilder } from 'lindera-wasm-ipadic-nodejs';
|
|
141
|
-
|
|
142
|
-
const builder = new TokenizerBuilder();
|
|
143
|
-
builder.setDictionary("embedded://ipadic");
|
|
144
|
-
builder.setMode("normal");
|
|
145
|
-
const tokenizer = builder.build();
|
|
146
|
-
|
|
147
|
-
const tokens = tokenizer.tokenize("すもももももももものうち");
|
|
148
|
-
tokens.forEach(token => {
|
|
149
|
-
console.log(`${token.surface}: ${token.details.join(", ")}`);
|
|
150
|
-
});
|
|
151
|
-
```
|
|
152
|
-
|
|
153
61
|
### Bundler Usage (Webpack, Rollup, etc.)
|
|
154
62
|
|
|
155
|
-
Use the
|
|
156
|
-
|
|
157
|
-
```js
|
|
158
|
-
import __wbg_init, { TokenizerBuilder } from 'lindera-wasm-ipadic-bundler';
|
|
159
|
-
|
|
160
|
-
async function main() {
|
|
161
|
-
await __wbg_init();
|
|
162
|
-
|
|
163
|
-
const builder = new TokenizerBuilder();
|
|
164
|
-
builder.setDictionary("embedded://ipadic");
|
|
165
|
-
builder.setMode("normal");
|
|
166
|
-
const tokenizer = builder.build();
|
|
167
|
-
|
|
168
|
-
const tokens = tokenizer.tokenize("すもももももももものうち");
|
|
169
|
-
tokens.forEach(token => {
|
|
170
|
-
console.log(`${token.surface}: ${token.details.join(", ")}`);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
main();
|
|
175
|
-
```
|
|
63
|
+
Use the `lindera-wasm-bundler` package for bundler environments.
|
|
64
|
+
The dictionary loading approach is the same as the web usage above.
|
|
176
65
|
|
|
177
66
|
### Token Properties
|
|
178
67
|
|
|
@@ -203,7 +92,7 @@ import { defineConfig } from 'vite'
|
|
|
203
92
|
export default defineConfig({
|
|
204
93
|
optimizeDeps: {
|
|
205
94
|
exclude: [
|
|
206
|
-
"lindera-wasm-
|
|
95
|
+
"lindera-wasm-web"
|
|
207
96
|
]
|
|
208
97
|
},
|
|
209
98
|
})
|
package/lindera_wasm.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Compression algorithm for dictionary data.
|
|
6
|
-
*/
|
|
7
|
-
export enum CompressionAlgorithm {
|
|
8
|
-
Deflate = 0,
|
|
9
|
-
Zlib = 1,
|
|
10
|
-
Gzip = 2,
|
|
11
|
-
Raw = 3,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
4
|
/**
|
|
15
5
|
* A morphological analysis dictionary.
|
|
16
6
|
*/
|
|
@@ -81,8 +71,7 @@ export class Metadata {
|
|
|
81
71
|
free(): void;
|
|
82
72
|
[Symbol.dispose](): void;
|
|
83
73
|
static createDefault(): Metadata;
|
|
84
|
-
constructor(name?: string | null, encoding?: string | null
|
|
85
|
-
compress_algorithm: CompressionAlgorithm;
|
|
74
|
+
constructor(name?: string | null, encoding?: string | null);
|
|
86
75
|
dictionary_schema: Schema;
|
|
87
76
|
encoding: string;
|
|
88
77
|
name: string;
|
|
@@ -243,6 +232,9 @@ export class TokenizerBuilder {
|
|
|
243
232
|
append_token_filter(name: string, args: any): void;
|
|
244
233
|
/**
|
|
245
234
|
* Builds and returns a configured [`Tokenizer`] instance.
|
|
235
|
+
*
|
|
236
|
+
* If a dictionary instance was set via `setDictionaryInstance()`,
|
|
237
|
+
* it will be used directly instead of loading from a URI.
|
|
246
238
|
*/
|
|
247
239
|
build(): Tokenizer;
|
|
248
240
|
/**
|
|
@@ -250,9 +242,16 @@ export class TokenizerBuilder {
|
|
|
250
242
|
*/
|
|
251
243
|
constructor();
|
|
252
244
|
/**
|
|
253
|
-
* Sets the dictionary to use for tokenization.
|
|
245
|
+
* Sets the dictionary to use for tokenization by URI.
|
|
254
246
|
*/
|
|
255
247
|
setDictionary(uri: string): void;
|
|
248
|
+
/**
|
|
249
|
+
* Sets a pre-loaded dictionary instance for tokenization.
|
|
250
|
+
*
|
|
251
|
+
* Use this method when the dictionary has been loaded from bytes
|
|
252
|
+
* (e.g., via `loadDictionaryFromBytes()`) instead of from a URI.
|
|
253
|
+
*/
|
|
254
|
+
setDictionaryInstance(dictionary: Dictionary): void;
|
|
256
255
|
/**
|
|
257
256
|
* Sets whether to keep whitespace tokens in the output.
|
|
258
257
|
*/
|
|
@@ -262,13 +261,22 @@ export class TokenizerBuilder {
|
|
|
262
261
|
*/
|
|
263
262
|
setMode(mode: string): void;
|
|
264
263
|
/**
|
|
265
|
-
* Sets a user-defined dictionary.
|
|
264
|
+
* Sets a user-defined dictionary by URI.
|
|
266
265
|
*/
|
|
267
266
|
setUserDictionary(uri: string): void;
|
|
267
|
+
/**
|
|
268
|
+
* Sets a pre-loaded user dictionary instance.
|
|
269
|
+
*
|
|
270
|
+
* Use this method when the user dictionary has been loaded from bytes
|
|
271
|
+
* instead of from a URI.
|
|
272
|
+
*/
|
|
273
|
+
setUserDictionaryInstance(user_dictionary: UserDictionary): void;
|
|
268
274
|
set_dictionary(uri: string): void;
|
|
275
|
+
set_dictionary_instance(dictionary: Dictionary): void;
|
|
269
276
|
set_keep_whitespace(keep: boolean): void;
|
|
270
277
|
set_mode(mode: string): void;
|
|
271
278
|
set_user_dictionary(uri: string): void;
|
|
279
|
+
set_user_dictionary_instance(user_dictionary: UserDictionary): void;
|
|
272
280
|
}
|
|
273
281
|
|
|
274
282
|
/**
|
|
@@ -305,6 +313,30 @@ export function getVersion(): string;
|
|
|
305
313
|
*/
|
|
306
314
|
export function loadDictionary(uri: string): Dictionary;
|
|
307
315
|
|
|
316
|
+
/**
|
|
317
|
+
* Loads a dictionary from raw byte arrays.
|
|
318
|
+
*
|
|
319
|
+
* This function constructs a `Dictionary` directly from the binary data
|
|
320
|
+
* of each dictionary component file, without requiring filesystem access.
|
|
321
|
+
* This is useful for loading dictionaries from OPFS or other browser storage.
|
|
322
|
+
*
|
|
323
|
+
* # Arguments
|
|
324
|
+
*
|
|
325
|
+
* * `metadata` - The contents of `metadata.json`
|
|
326
|
+
* * `dict_da` - The contents of `dict.da` (Double-Array Trie)
|
|
327
|
+
* * `dict_vals` - The contents of `dict.vals` (word value data)
|
|
328
|
+
* * `dict_words_idx` - The contents of `dict.wordsidx` (word details index)
|
|
329
|
+
* * `dict_words` - The contents of `dict.words` (word details)
|
|
330
|
+
* * `matrix_mtx` - The contents of `matrix.mtx` (connection cost matrix)
|
|
331
|
+
* * `char_def` - The contents of `char_def.bin` (character definitions)
|
|
332
|
+
* * `unk` - The contents of `unk.bin` (unknown word dictionary)
|
|
333
|
+
*
|
|
334
|
+
* # Returns
|
|
335
|
+
*
|
|
336
|
+
* A `Dictionary` instance constructed from the provided byte data.
|
|
337
|
+
*/
|
|
338
|
+
export function loadDictionaryFromBytes(metadata: Uint8Array, dict_da: Uint8Array, dict_vals: Uint8Array, dict_words_idx: Uint8Array, dict_words: Uint8Array, matrix_mtx: Uint8Array, char_def: Uint8Array, unk: Uint8Array): Dictionary;
|
|
339
|
+
|
|
308
340
|
/**
|
|
309
341
|
* Loads a user dictionary from the specified URI.
|
|
310
342
|
*/
|
|
@@ -312,6 +344,8 @@ export function loadUserDictionary(uri: string, metadata: Metadata): UserDiction
|
|
|
312
344
|
|
|
313
345
|
export function load_dictionary(uri: string): Dictionary;
|
|
314
346
|
|
|
347
|
+
export function load_dictionary_from_bytes(metadata: Uint8Array, dict_da: Uint8Array, dict_vals: Uint8Array, dict_words_idx: Uint8Array, dict_words: Uint8Array, matrix_mtx: Uint8Array, char_def: Uint8Array, unk: Uint8Array): Dictionary;
|
|
348
|
+
|
|
315
349
|
export function load_user_dictionary(uri: string, metadata: Metadata): UserDictionary;
|
|
316
350
|
|
|
317
351
|
/**
|
|
@@ -323,34 +357,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
323
357
|
|
|
324
358
|
export interface InitOutput {
|
|
325
359
|
readonly memory: WebAssembly.Memory;
|
|
326
|
-
readonly __wbg_dictionary_free: (a: number, b: number) => void;
|
|
327
|
-
readonly __wbg_fielddefinition_free: (a: number, b: number) => void;
|
|
328
|
-
readonly __wbg_get_fielddefinition_description: (a: number) => [number, number];
|
|
329
|
-
readonly __wbg_get_fielddefinition_field_type: (a: number) => number;
|
|
330
|
-
readonly __wbg_get_fielddefinition_index: (a: number) => number;
|
|
331
|
-
readonly __wbg_get_fielddefinition_name: (a: number) => [number, number];
|
|
332
|
-
readonly __wbg_schema_free: (a: number, b: number) => void;
|
|
333
|
-
readonly __wbg_set_fielddefinition_description: (a: number, b: number, c: number) => void;
|
|
334
|
-
readonly __wbg_set_fielddefinition_field_type: (a: number, b: number) => void;
|
|
335
|
-
readonly __wbg_set_fielddefinition_index: (a: number, b: number) => void;
|
|
336
|
-
readonly __wbg_set_fielddefinition_name: (a: number, b: number, c: number) => void;
|
|
337
|
-
readonly __wbg_userdictionary_free: (a: number, b: number) => void;
|
|
338
|
-
readonly buildDictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
339
|
-
readonly buildUserDictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
340
|
-
readonly jsdictionary_encoding: (a: number) => [number, number];
|
|
341
|
-
readonly jsdictionary_metadata: (a: number) => number;
|
|
342
|
-
readonly jsdictionary_name: (a: number) => [number, number];
|
|
343
|
-
readonly jsfielddefinition_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
344
|
-
readonly jsschema_create_default: () => number;
|
|
345
|
-
readonly jsschema_field_count: (a: number) => number;
|
|
346
|
-
readonly jsschema_get_all_fields: (a: number) => [number, number];
|
|
347
|
-
readonly jsschema_get_custom_fields: (a: number) => [number, number];
|
|
348
|
-
readonly jsschema_get_field_by_name: (a: number, b: number, c: number) => number;
|
|
349
|
-
readonly jsschema_get_field_index: (a: number, b: number, c: number) => number;
|
|
350
|
-
readonly jsschema_get_field_name: (a: number, b: number) => [number, number];
|
|
351
|
-
readonly jsschema_new: (a: number, b: number) => number;
|
|
352
|
-
readonly loadDictionary: (a: number, b: number) => [number, number, number];
|
|
353
|
-
readonly loadUserDictionary: (a: number, b: number, c: number) => [number, number, number];
|
|
354
360
|
readonly __wbg_tokenizer_free: (a: number, b: number) => void;
|
|
355
361
|
readonly __wbg_tokenizerbuilder_free: (a: number, b: number) => void;
|
|
356
362
|
readonly tokenizer_new: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
@@ -364,64 +370,96 @@ export interface InitOutput {
|
|
|
364
370
|
readonly tokenizerbuilder_build: (a: number) => [number, number, number];
|
|
365
371
|
readonly tokenizerbuilder_new: () => [number, number, number];
|
|
366
372
|
readonly tokenizerbuilder_setDictionary: (a: number, b: number, c: number) => [number, number];
|
|
373
|
+
readonly tokenizerbuilder_setDictionaryInstance: (a: number, b: number) => void;
|
|
367
374
|
readonly tokenizerbuilder_setKeepWhitespace: (a: number, b: number) => [number, number];
|
|
368
375
|
readonly tokenizerbuilder_setMode: (a: number, b: number, c: number) => [number, number];
|
|
369
376
|
readonly tokenizerbuilder_setUserDictionary: (a: number, b: number, c: number) => [number, number];
|
|
377
|
+
readonly tokenizerbuilder_setUserDictionaryInstance: (a: number, b: number) => void;
|
|
370
378
|
readonly tokenizerbuilder_set_dictionary: (a: number, b: number, c: number) => [number, number];
|
|
379
|
+
readonly tokenizerbuilder_set_dictionary_instance: (a: number, b: number) => void;
|
|
371
380
|
readonly tokenizerbuilder_set_keep_whitespace: (a: number, b: number) => [number, number];
|
|
372
381
|
readonly tokenizerbuilder_set_mode: (a: number, b: number, c: number) => [number, number];
|
|
373
382
|
readonly tokenizerbuilder_set_user_dictionary: (a: number, b: number, c: number) => [number, number];
|
|
374
|
-
readonly
|
|
383
|
+
readonly tokenizerbuilder_set_user_dictionary_instance: (a: number, b: number) => void;
|
|
384
|
+
readonly __wbg_dictionary_free: (a: number, b: number) => void;
|
|
385
|
+
readonly __wbg_userdictionary_free: (a: number, b: number) => void;
|
|
386
|
+
readonly buildDictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
387
|
+
readonly buildUserDictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
388
|
+
readonly jsdictionary_encoding: (a: number) => [number, number];
|
|
389
|
+
readonly jsdictionary_metadata: (a: number) => number;
|
|
390
|
+
readonly jsdictionary_name: (a: number) => [number, number];
|
|
391
|
+
readonly loadDictionary: (a: number, b: number) => [number, number, number];
|
|
392
|
+
readonly loadDictionaryFromBytes: (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];
|
|
393
|
+
readonly loadUserDictionary: (a: number, b: number, c: number) => [number, number, number];
|
|
394
|
+
readonly __wbg_fielddefinition_free: (a: number, b: number) => void;
|
|
395
|
+
readonly __wbg_get_fielddefinition_description: (a: number) => [number, number];
|
|
396
|
+
readonly __wbg_get_fielddefinition_field_type: (a: number) => number;
|
|
397
|
+
readonly __wbg_get_fielddefinition_index: (a: number) => number;
|
|
398
|
+
readonly __wbg_get_fielddefinition_name: (a: number) => [number, number];
|
|
399
|
+
readonly __wbg_schema_free: (a: number, b: number) => void;
|
|
400
|
+
readonly __wbg_set_fielddefinition_description: (a: number, b: number, c: number) => void;
|
|
401
|
+
readonly __wbg_set_fielddefinition_field_type: (a: number, b: number) => void;
|
|
402
|
+
readonly __wbg_set_fielddefinition_index: (a: number, b: number) => void;
|
|
403
|
+
readonly __wbg_set_fielddefinition_name: (a: number, b: number, c: number) => void;
|
|
404
|
+
readonly jsfielddefinition_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
405
|
+
readonly jsschema_create_default: () => number;
|
|
406
|
+
readonly jsschema_field_count: (a: number) => number;
|
|
407
|
+
readonly jsschema_get_all_fields: (a: number) => [number, number];
|
|
408
|
+
readonly jsschema_get_custom_fields: (a: number) => [number, number];
|
|
409
|
+
readonly jsschema_get_field_by_name: (a: number, b: number, c: number) => number;
|
|
410
|
+
readonly jsschema_get_field_index: (a: number, b: number, c: number) => number;
|
|
411
|
+
readonly jsschema_get_field_name: (a: number, b: number) => [number, number];
|
|
412
|
+
readonly jsschema_new: (a: number, b: number) => number;
|
|
375
413
|
readonly __wbg_segmenter_free: (a: number, b: number) => void;
|
|
376
|
-
readonly
|
|
377
|
-
readonly
|
|
378
|
-
readonly
|
|
379
|
-
readonly
|
|
380
|
-
readonly
|
|
381
|
-
readonly
|
|
382
|
-
readonly
|
|
383
|
-
readonly
|
|
384
|
-
readonly
|
|
385
|
-
readonly
|
|
386
|
-
readonly
|
|
387
|
-
readonly
|
|
414
|
+
readonly __wbg_get_penalty_kanji_penalty_length_penalty: (a: number) => number;
|
|
415
|
+
readonly __wbg_get_penalty_kanji_penalty_length_threshold: (a: number) => number;
|
|
416
|
+
readonly __wbg_get_penalty_other_penalty_length_penalty: (a: number) => number;
|
|
417
|
+
readonly __wbg_get_penalty_other_penalty_length_threshold: (a: number) => number;
|
|
418
|
+
readonly __wbg_linderaerror_free: (a: number, b: number) => void;
|
|
419
|
+
readonly __wbg_penalty_free: (a: number, b: number) => void;
|
|
420
|
+
readonly __wbg_set_linderaerror_message: (a: number, b: number, c: number) => void;
|
|
421
|
+
readonly __wbg_set_penalty_kanji_penalty_length_penalty: (a: number, b: number) => void;
|
|
422
|
+
readonly __wbg_set_penalty_kanji_penalty_length_threshold: (a: number, b: number) => void;
|
|
423
|
+
readonly __wbg_set_penalty_other_penalty_length_penalty: (a: number, b: number) => void;
|
|
424
|
+
readonly __wbg_set_penalty_other_penalty_length_threshold: (a: number, b: number) => void;
|
|
425
|
+
readonly jslinderaerror_new: (a: number, b: number) => number;
|
|
426
|
+
readonly jslinderaerror_toString: (a: number) => [number, number];
|
|
427
|
+
readonly jspenalty_new: (a: number, b: number, c: number, d: number) => number;
|
|
388
428
|
readonly __wbg_get_token_byte_end: (a: number) => number;
|
|
389
429
|
readonly __wbg_get_token_details: (a: number) => [number, number];
|
|
390
430
|
readonly __wbg_get_token_is_unknown: (a: number) => number;
|
|
391
431
|
readonly __wbg_get_token_position: (a: number) => number;
|
|
392
432
|
readonly __wbg_get_token_word_id: (a: number) => number;
|
|
393
|
-
readonly __wbg_linderaerror_free: (a: number, b: number) => void;
|
|
394
433
|
readonly __wbg_set_token_byte_end: (a: number, b: number) => void;
|
|
395
434
|
readonly __wbg_set_token_details: (a: number, b: number, c: number) => void;
|
|
396
435
|
readonly __wbg_set_token_is_unknown: (a: number, b: number) => void;
|
|
397
436
|
readonly __wbg_set_token_position: (a: number, b: number) => void;
|
|
398
437
|
readonly __wbg_set_token_word_id: (a: number, b: number) => void;
|
|
399
438
|
readonly __wbg_token_free: (a: number, b: number) => void;
|
|
439
|
+
readonly token_getDetail: (a: number, b: number) => [number, number];
|
|
440
|
+
readonly token_toJSON: (a: number) => any;
|
|
441
|
+
readonly __wbg_metadata_free: (a: number, b: number) => void;
|
|
400
442
|
readonly build_dictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
401
443
|
readonly build_user_dictionary: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
402
444
|
readonly getVersion: () => [number, number];
|
|
403
|
-
readonly
|
|
404
|
-
readonly
|
|
445
|
+
readonly jsmetadata_createDefault: () => number;
|
|
446
|
+
readonly jsmetadata_dictionary_schema: (a: number) => number;
|
|
447
|
+
readonly jsmetadata_encoding: (a: number) => [number, number];
|
|
448
|
+
readonly jsmetadata_name: (a: number) => [number, number];
|
|
449
|
+
readonly jsmetadata_new: (a: number, b: number, c: number, d: number) => number;
|
|
450
|
+
readonly jsmetadata_set_dictionary_schema: (a: number, b: number) => void;
|
|
451
|
+
readonly jsmetadata_set_encoding: (a: number, b: number, c: number) => void;
|
|
452
|
+
readonly jsmetadata_set_name: (a: number, b: number, c: number) => void;
|
|
453
|
+
readonly jsmetadata_set_user_dictionary_schema: (a: number, b: number) => void;
|
|
454
|
+
readonly jsmetadata_user_dictionary_schema: (a: number) => number;
|
|
405
455
|
readonly load_dictionary: (a: number, b: number) => [number, number, number];
|
|
456
|
+
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];
|
|
406
457
|
readonly load_user_dictionary: (a: number, b: number, c: number) => [number, number, number];
|
|
407
|
-
readonly token_getDetail: (a: number, b: number) => [number, number];
|
|
408
|
-
readonly token_toJSON: (a: number) => any;
|
|
409
|
-
readonly __wbg_get_penalty_kanji_penalty_length_penalty: (a: number) => number;
|
|
410
|
-
readonly __wbg_get_penalty_kanji_penalty_length_threshold: (a: number) => number;
|
|
411
|
-
readonly __wbg_get_penalty_other_penalty_length_penalty: (a: number) => number;
|
|
412
|
-
readonly __wbg_get_penalty_other_penalty_length_threshold: (a: number) => number;
|
|
413
|
-
readonly __wbg_penalty_free: (a: number, b: number) => void;
|
|
414
|
-
readonly __wbg_set_penalty_kanji_penalty_length_penalty: (a: number, b: number) => void;
|
|
415
|
-
readonly __wbg_set_penalty_kanji_penalty_length_threshold: (a: number, b: number) => void;
|
|
416
|
-
readonly __wbg_set_penalty_other_penalty_length_penalty: (a: number, b: number) => void;
|
|
417
|
-
readonly __wbg_set_penalty_other_penalty_length_threshold: (a: number, b: number) => void;
|
|
418
|
-
readonly jspenalty_new: (a: number, b: number, c: number, d: number) => number;
|
|
419
458
|
readonly __wbg_set_token_byte_start: (a: number, b: number) => void;
|
|
420
459
|
readonly __wbg_get_linderaerror_message: (a: number) => [number, number];
|
|
421
460
|
readonly __wbg_get_token_surface: (a: number) => [number, number];
|
|
422
461
|
readonly __wbg_get_token_byte_start: (a: number) => number;
|
|
423
462
|
readonly version: () => [number, number];
|
|
424
|
-
readonly __wbg_set_linderaerror_message: (a: number, b: number, c: number) => void;
|
|
425
463
|
readonly __wbg_set_token_surface: (a: number, b: number, c: number) => void;
|
|
426
464
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
427
465
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|