mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-05 00:32:51 +08:00
small refactor, replace WordTagFreq with Entry
This commit is contained in:
@@ -5,11 +5,16 @@ type Pair struct {
|
||||
Flag string
|
||||
}
|
||||
|
||||
type Token struct {
|
||||
type Entry struct {
|
||||
*Pair
|
||||
Freq float64
|
||||
}
|
||||
|
||||
type DictLoader interface {
|
||||
Add(*Token)
|
||||
func NewEntry() *Entry {
|
||||
return &Entry{new(Pair), 0.0}
|
||||
}
|
||||
|
||||
type Loader interface {
|
||||
AddEntry(Entry)
|
||||
CachePath(string) string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user