Gse v0.30.0 发布, Go 高性能分词, 增加 hmm 支持

栏目: Go · 发布时间: 6年前

内容简介:Go 语言高效分词, 支持英文、中文、日文等词典用双数组 trie(Double-Array Trie)实现, 分词器算法为基于词频的最短路径加动态规划。v0.30.0 版本主要新增了 DAG 和 HMM (Viterbi) 算法分词, 新增 API 基本和结巴分词保持一致.支持普通、搜索引擎、全模式、精确模式和 HMM模式多种分词模式,支持用户词典、词性标注,可运行JSON RPC服务。

Go 语言高效分词, 支持英文、中文、日文等

词典用双数组 trie(Double-Array Trie)实现, 分词器算法为基于词频的最短路径加动态规划。v0.30.0 版本主要新增了 DAG 和 HMM (Viterbi) 算法分词, 新增 API 基本和结巴分词保持一致.

支持普通、搜索引擎、全模式、精确模式和 HMM模式多种分词模式,支持用户词典、词性标注,可运行JSON RPC服务。

更新详情和项目地址: gse

package mainimport (    "fmt"

    "github.com/go-ego/gse")

func main() {
    var seg gse.Segmenter
    seg.LoadDict()

    text1 := "你好世界, Hello world"
    fmt.Println(seg.Cut(text1, true))
}

Rhine River

Add

  • [NEW] Add HMM cut support

  • [NEW] Add go mod support and remove dep files

  • [NEW] Add find word in dictionary func

  • [NEW] Add Cut(), CutAll(), CutSearch(), LoadModel(), HMMCut() func

  • [NEW] Add hmm cut test code

  • [NEW] Add hmm cut example code

Update

  • [NEW] Cutting the dict method, move load dictionary to dict_util.go

  • [NEW] Update example and Add more test

  • [NEW] Update and clean utils code

  • [NEW] Simplify test code, add equal benchmark code

  • [NEW] Update pkg cedar code

  • [NEW] Update code style

  • [NEW] Update README.md [ Format README.mdand Update example ]

Fix

  • [FIX] Fixed and clean issue template

  • [FIX] Update README.md [ update and fixed example ]

See Commits for more details, after Oct 9.


以上所述就是小编给大家介绍的《Gse v0.30.0 发布, Go 高性能分词, 增加 hmm 支持》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Impractical Python Projects

Impractical Python Projects

Lee Vaughan / No Starch Press / 2018-11 / USD 29.95

Impractical Python Projects picks up where the complete beginner books leave off, expanding on existing concepts and introducing new tools that you’ll use every day. And to keep things interesting, ea......一起来看看 《Impractical Python Projects》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具