fasttext.wasm.js
Advanced tools
Comparing version
@@ -14,2 +14,13 @@ import type { IdentifyLang, IdentifyLangVector } from './types'; | ||
identifyVerbose(text: string): Promise<IdentifyLangVector[]>; | ||
normalizeIdentifyLang(lang: IdentifyLang): { | ||
/** | ||
* Attentions: | ||
* | ||
* - `eml` is not standard ISO 639.2 and ISO 639.3 code | ||
* - `bih` and `nah` are not standard ISO 639.3 code | ||
*/ | ||
alpha3Code: string; | ||
/** refName: manually normalize rawLanguage fit https://iso639-3.sil.org/code_tables/download_tables */ | ||
refName: string; | ||
}; | ||
} |
{ | ||
"name": "fasttext.wasm.js", | ||
"description": "", | ||
"version": "0.0.1-next.2", | ||
"version": "0.0.1-next.3", | ||
"author": "Yuns <yuns.xie@qq.com>", | ||
@@ -56,2 +56,3 @@ "license": "MIT", | ||
"@types/node": "^18.6.2", | ||
"@types/papaparse": "^5.3.8", | ||
"@types/react": "^18.0.15", | ||
@@ -72,2 +73,3 @@ "@types/react-dom": "^18.0.6", | ||
"lint-staged": "^13.2.3", | ||
"papaparse": "^5.4.1", | ||
"postcss": "^8.4.28", | ||
@@ -121,4 +123,6 @@ "prettier": "^2.7.1", | ||
"test:ui": "vitest --config vite.lib.config.ts --ui", | ||
"coverage": "vitest run --config vite.lib.config.ts --coverage" | ||
"coverage": "vitest run --config vite.lib.config.ts --coverage", | ||
"extract-reference-names": "tsx ./scripts/languages/extract-reference-names.ts", | ||
"normalize-data": "tsx ./scripts/languages/normalize-data.ts" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # fasttext.wasm.js | ||
WebAssembly version of [fastText](https://github.com/facebookresearch/fastText/) with compressed `lid.176.ftz` model (~900KB) and a typescript wrapper This project focuses on cross-platform, zero-dependency and out-of-the-box. | ||
WebAssembly version of [fastText](https://github.com/facebookresearch/fastText/) with compressed `lid.176.ftz` model (~900KB) and a typescript wrapper. This project focuses on cross-platform, zero-dependency and out-of-the-box. | ||
@@ -54,2 +54,3 @@ ## Features | ||
- **10x Faster** and **very more accurate** than [languagedetect](https://github.com/FGRibreau/node-language-detect) | ||
- **~3x Faster** and **more accurate** than [franc](https://github.com/wooorm/franc) | ||
@@ -56,0 +57,0 @@ ## Related |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1937041
2.15%48
6.67%5260
103.09%82
1.23%48
4.35%