1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-30 09:00:30 +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" "sort"
) )
const cacheNameFormat = "jieba.%x.cache"
var ( var (
// Word/Tag Map load from user dictionary reEng = regexp.MustCompile(`[[:alnum:]]`)
UserWordTagTab = make(map[string]string) reHanCutAll = regexp.MustCompile(`\p{Han}+`)
reEng = regexp.MustCompile(`[[:alnum:]]`) reSkipCutAll = regexp.MustCompile(`[^[:alnum:]+#\n]`)
reHanCutAll = regexp.MustCompile(`\p{Han}+`) reHanDefault = regexp.MustCompile(`([\p{Han}+[:alnum:]+#&\._]+)`)
reSkipCutAll = regexp.MustCompile(`[^[:alnum:]+#\n]`) reSkipDefault = regexp.MustCompile(`(\r\n|\s)`)
reHanDefault = regexp.MustCompile(`([\p{Han}+[:alnum:]+#&\._]+)`)
reSkipDefault = regexp.MustCompile(`(\r\n|\s)`)
) )
type route struct { type route struct {
@@ -59,10 +55,6 @@ func (j *Jieba) AddEntry(entry Entry) {
j.Add(entry.Word, entry.Freq) j.Add(entry.Word, entry.Freq)
} }
func (j *Jieba) CacheNameFormat() string {
return cacheNameFormat
}
func (j *Jieba) Add(word string, freq float64) { func (j *Jieba) Add(word string, freq float64) {
j.Freq[word] = freq j.Freq[word] = freq
j.Total += freq j.Total += freq