1
0
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:
Wang Bin
2015-03-25 17:53:25 +08:00
parent 800ecaa8c9
commit 7fe5e7d4c4
4 changed files with 41 additions and 38 deletions

View File

@@ -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
}