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