Documentation ¶
Index ¶
Constants ¶
View Source
const (
MinTokenFrequency = 2 // 仅从字典文件中读取大于等于此频率的分词
)
分词器接口
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChinaCut ¶
type ChinaCut struct {
// contains filtered or unexported fields
}
分词器结构体
func InitChinaCut ¶
func (*ChinaCut) LoadDictionary ¶
从文件中载入词典 可以载入多个词典文件,文件名用","分隔,排在前面的词典优先载入分词,比如
"用户词典.txt,通用词典.txt"
当一个分词既出现在用户词典也出现在通用词典中,则优先使用用户词典。 词典的格式为(每个分词一行):
分词文本 频率 词性
Click to show internal directories.
Click to hide internal directories.