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:
18
jieba.go
18
jieba.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user