Go efficient text segmentation; support english, chinese, japanese and other.
Dictionary with double array trie (Double-Array Trie) to achieve, Sender algorithm is the shortest path
based on word frequency plus dynamic programming.
Support common and search engine two participle mode, support user dictionary, POS tagging, run JSON RPC service.
Text Segmentation speed single thread 9MB/s,goroutines concurrent 42MB/s (8 nuclear Macbook
Pro).
Install / update
1 | 复制代码`go get -u github.com/go-ego/gse` |
Build-tools
1 | 复制代码`go get -u github.com/go-ego/re` |
re gse
To create a new gse application
1 | 复制代码`$ re gse my-gse` |
re run
To run the application we just created, you can navigate to the application folder and execute:
1 | 复制代码`$ cd my-gse && re run` |
Use
1 | 复制代码package main |
License
Gse is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), base on sego
本文转载自: 掘金