mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-30 00:50:30 +08:00
removed unused method/property
This commit is contained in:
8
jieba.go
8
jieba.go
@@ -9,11 +9,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
)
|
)
|
||||||
|
|
||||||
const cacheNameFormat = "jieba.%x.cache"
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Word/Tag Map load from user dictionary
|
|
||||||
UserWordTagTab = make(map[string]string)
|
|
||||||
reEng = regexp.MustCompile(`[[:alnum:]]`)
|
reEng = regexp.MustCompile(`[[:alnum:]]`)
|
||||||
reHanCutAll = regexp.MustCompile(`\p{Han}+`)
|
reHanCutAll = regexp.MustCompile(`\p{Han}+`)
|
||||||
reSkipCutAll = regexp.MustCompile(`[^[:alnum:]+#\n]`)
|
reSkipCutAll = regexp.MustCompile(`[^[:alnum:]+#\n]`)
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user