gse-wasm
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

gse-wasm

WebAssembly efficient text segmentation; support english, chinese, japanese and other.

Go Report Card GoDoc npm downloads version

简体中文

Based on go-ego/gse

Dictionary with double array trie (Double-Array Trie) to achieve, Sender algorithm is the shortest path based on word frequency plus dynamic programming, and DAG and HMM algorithm word segmentation.

Support common, search engine, full mode, precise mode and HMM mode multiple word segmentation modes, support user dictionary, POS tagging.

Support HMM cut text use Viterbi algorithm.

Install

npm install gse-wasm

Usage

example.js

Chinese Text Segmentation Demo

Japanese Text Segmentation Demo

Build

(Go 1.13 or above should be installed)

npm run build:all

Authors

License

Gse Wasm is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), thanks to sego and jieba.

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i gse-wasm

    Weekly Downloads

    8

    Version

    0.2.0

    License

    MIT AND Apache-2.0

    Unpacked Size

    53.8 MB

    Total Files

    8

    Last publish

    Collaborators

    • xmader