1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-09 02:50:24 +08:00

removed unused method/property

This commit is contained in:
Wang Bin
2015-03-30 14:31:41 +08:00
parent 328310cfbb
commit 556b96b137

View File

@@ -9,16 +9,12 @@ import (
"sort"
)
const cacheNameFormat = "jieba.%x.cache"
var (
// Word/Tag Map load from user dictionary
UserWordTagTab = make(map[string]string)
reEng = regexp.MustCompile(`[[:alnum:]]`)
reHanCutAll = regexp.MustCompile(`\p{Han}+`)
reSkipCutAll = regexp.MustCompile(`[^[:alnum:]+#\n]`)
reHanDefault = regexp.MustCompile(`([\p{Han}+[:alnum:]+#&\._]+)`)
reSkipDefault = regexp.MustCompile(`(\r\n|\s)`)
reEng = regexp.MustCompile(`[[:alnum:]]`)
reHanCutAll = regexp.MustCompile(`\p{Han}+`)
reSkipCutAll = regexp.MustCompile(`[^[:alnum:]+#\n]`)
reHanDefault = regexp.MustCompile(`([\p{Han}+[:alnum:]+#&\._]+)`)
reSkipDefault = regexp.MustCompile(`(\r\n|\s)`)
)
type route struct {
@@ -59,10 +55,6 @@ func (j *Jieba) AddEntry(entry Entry) {
j.Add(entry.Word, entry.Freq)
}
func (j *Jieba) CacheNameFormat() string {
return cacheNameFormat
}
func (j *Jieba) Add(word string, freq float64) {
j.Freq[word] = freq
j.Total += freq