go-wordseg

所属分类:自然语言处理
开发工具:GO
文件大小:337KB
下载次数:0
上传日期:2017-02-27 08:59:42
上 传 者sh-1993
说明:  果朗语中的泰语分词
(Thai word segmentation in Golang)

文件列表:
.envrc (60, 2017-02-27)
dict (0, 2017-02-27)
dict\demo.dict (808950, 2017-02-27)
dict\full.dict (808432, 2017-02-27)
glide.yaml (210, 2017-02-27)
wordseg (0, 2017-02-27)
wordseg\seg.go (5156, 2017-02-27)
wordseg\seg_test.go (2229, 2017-02-27)

# Go-Wordseg Thai word segmentation with Golang. ## Algorithm in use Dictionary-based longest matching ## Dictionary Dictionary ```dict/full.dict``` contains all words listed in official Thai dictionary. ## Example ``` package main import ( "fmt" "strings" "./wordseg" ) func main() { s := wordseg.NewSeg(nil) s.UseDictFile("./dict/full.dict") t := s.SegmentText("") fmt.Println(strings.Join(t, "-")) t = s.SegmentText("test") fmt.Println(strings.Join(t, "-")) t = s.SegmentText("") fmt.Println(strings.Join(t, "-")) t = s.SegmentText("this is a working software. normal AB.123") fmt.Println(strings.Join(t, "-")) } ```

近期下载者

相关文件


收藏者