1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-26 23:20:31 +08:00

small refactor the interface, use contructors instead of pointers for entry

This commit is contained in:
Wang Bin
2015-03-30 13:00:56 +08:00
parent 48a0bd390b
commit 51c63cb9ad
7 changed files with 274 additions and 283 deletions

View File

@@ -1,21 +1,13 @@
package jiebago
type Pair struct {
type Entry struct {
Word string
Flag string
}
type Entry struct {
*Pair
Freq float64
}
func NewEntry() *Entry {
return &Entry{new(Pair), 0.0}
}
type DictLoader interface {
AddEntry(*Entry)
AddEntry(Entry)
}
type Cacher interface {