- 授权协议: Apache
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://github.com/huichen/sego
- 软件文档: https://github.com/huichen/sego
软件介绍
词典用双数组trie(Double-Array Trie)实现, 分词器算法为基于词频的最短路径加动态规划。
支持普通和搜索引擎两种分词模式,支持用户词典、词性标注,可运行JSON RPC服务。
分词速度单线程9MB/s,goroutines并发42MB/s(8核Macbook Pro)。
示例代码:
package main
import (
"fmt"
"github.com/huichen/sego"
)
func main() {
// 载入词典
var segmenter sego.Segmenter
segmenter.LoadDictionary("github.com/huichen/sego/data/dictionary.txt")
// 分词
text := []byte("中华人民共和国中央人民政府")
segments := segmenter.Segment(text)
// 处理分词结果
// 支持普通模式和搜索模式两种分词,见代码中SegmentsToString函数的注释。
fmt.Println(sego.SegmentsToString(segments, false))
}
Building Web Reputation Systems
Randy Farmer、Bryce Glass / Yahoo Press / 2010 / GBP 31.99
What do Amazon's product reviews, eBay's feedback score system, Slashdot's Karma System, and Xbox Live's Achievements have in common? They're all examples of successful reputation systems that enable ......一起来看看 《Building Web Reputation Systems》 这本书的介绍吧!
Markdown 在线编辑器
Markdown 在线编辑器
UNIX 时间戳转换
UNIX 时间戳转换
