fr-spell 1.0.1 → 1.0.3
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.cn.md +33 -46
- package/README.fr.md +33 -46
- package/README.md +33 -46
- package/frspell.browser.js +10936 -0
- package/models/community/derive_form_model.int8.onnx +0 -0
- package/models/community/lemma_type_model.int8.onnx +0 -0
- package/{src/module → module}/Predictor.js +5 -5
- package/package.json +19 -13
- package/benchmark/checklist_adje_100.json +0 -702
- package/benchmark/checklist_lemma_verb_100.json +0 -402
- package/benchmark/checklist_noun_100.json +0 -702
- package/benchmark/checklist_verb_100.json +0 -702
- package/benchmark/generate-checklists.js +0 -192
- package/benchmark/run-benchmark.js +0 -123
- package/models/small/derive_form_model.int8.onnx +0 -0
- package/models/small/lemma_type_model.int8.onnx +0 -0
- package/test/test.js +0 -21
- /package/{src/frspell.js → index.js} +0 -0
- /package/models/{small → community}/derive_form_vocab.json +0 -0
- /package/models/{small → community}/lemma_type_labels.json +0 -0
- /package/models/{small → community}/lemma_type_vocab.json +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -83,11 +83,11 @@ const MODULE_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
|
83
83
|
const PACKAGE_ROOT = path.resolve(MODULE_DIR, '..', '..');
|
|
84
84
|
|
|
85
85
|
const DEFAULT_MODEL_PATHS = {
|
|
86
|
-
lemmaModelPath: path.resolve(PACKAGE_ROOT, 'models/
|
|
87
|
-
lemmaVocabPath: path.resolve(PACKAGE_ROOT, 'models/
|
|
88
|
-
lemmaLabelsPath: path.resolve(PACKAGE_ROOT, 'models/
|
|
89
|
-
derivativeModelPath: path.resolve(PACKAGE_ROOT, 'models/
|
|
90
|
-
derivativeVocabPath: path.resolve(PACKAGE_ROOT, 'models/
|
|
86
|
+
lemmaModelPath: path.resolve(PACKAGE_ROOT, 'models/community/lemma_type_model.int8.onnx'),
|
|
87
|
+
lemmaVocabPath: path.resolve(PACKAGE_ROOT, 'models/community/lemma_type_vocab.json'),
|
|
88
|
+
lemmaLabelsPath: path.resolve(PACKAGE_ROOT, 'models/community/lemma_type_labels.json'),
|
|
89
|
+
derivativeModelPath: path.resolve(PACKAGE_ROOT, 'models/community/derive_form_model.int8.onnx'),
|
|
90
|
+
derivativeVocabPath: path.resolve(PACKAGE_ROOT, 'models/community/derive_form_vocab.json'),
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
export async function createLemmaTypePredictor({
|
package/package.json
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fr-spell",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Lightweight French lemmatization and conjugation. Convert between nouns, verbs, and adjectives using fast, quantized INT8 ONNX models under 2MB.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
6
|
+
"main": "./index.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".": "./
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./browser": "./frspell.browser.js"
|
|
9
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"index.js",
|
|
13
|
+
"frspell.browser.js",
|
|
14
|
+
"module",
|
|
15
|
+
"models",
|
|
16
|
+
"scripts/help.js",
|
|
17
|
+
"README.md",
|
|
18
|
+
"README.cn.md",
|
|
19
|
+
"README.fr.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
10
22
|
"scripts": {
|
|
11
|
-
"help": "node scripts/help.js"
|
|
12
|
-
"test": "node test/test.js",
|
|
13
|
-
"benchmark:prepare": "node benchmark/generate-checklists.js",
|
|
14
|
-
"benchmark": "node benchmark/run-benchmark.js",
|
|
15
|
-
"benchmark:lemma": "node benchmark/run-benchmark.js lemma",
|
|
16
|
-
"benchmark:noun": "node benchmark/run-benchmark.js noun",
|
|
17
|
-
"benchmark:verb": "node benchmark/run-benchmark.js verb",
|
|
18
|
-
"benchmark:adje": "node benchmark/run-benchmark.js adje"
|
|
23
|
+
"help": "node scripts/help.js"
|
|
19
24
|
},
|
|
20
25
|
"repository": {
|
|
21
26
|
"type": "git",
|
|
@@ -45,6 +50,7 @@
|
|
|
45
50
|
"url": "https://www.linkedin.com/in/davychxn/"
|
|
46
51
|
},
|
|
47
52
|
"dependencies": {
|
|
48
|
-
"onnxruntime-node": "^1.24.3"
|
|
53
|
+
"onnxruntime-node": "^1.24.3",
|
|
54
|
+
"onnxruntime-web": "^1.24.3"
|
|
49
55
|
}
|
|
50
56
|
}
|