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

栏目: 软件资讯 · 发布时间: 7年前

内容简介:Go 语言高效分词, 支持英文、中文、日文等 词典用双数组 trie(Double-Array Trie)实现, 分词器算法为基于词频的最短路径加动态规划。v0.30.0 版本主要新增了 DAG 和 HMM (Viterbi) 算法分词, 新增 API 基本和结...

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.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

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

Writing Windows VxDs and Device Drivers, Second Edition

Writing Windows VxDs and Device Drivers, Second Edition

Karen Hazzah / CMP / 1996-01-12 / USD 54.95

Software developer and author Karen Hazzah expands her original treatise on device drivers in the second edition of "Writing Windows VxDs and Device Drivers." The book and companion disk include the a......一起来看看 《Writing Windows VxDs and Device Drivers, Second Edition》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具