0.2.0 • Published 5 years ago

gse-wasm v0.2.0

Weekly downloads
1
License
MIT AND Apache-2....
Repository
github
Last release
5 years ago

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.