mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-22 12:10:30 +08:00
refactor to generalize set dictionary function, not finished yet
This commit is contained in:
2
trie.go
2
trie.go
@@ -107,6 +107,6 @@ func (j *Jieba) LoadUserDict(dictFilePath string) error {
|
||||
// sentence.
|
||||
func NewJieba(dictFileName string) (*Jieba, error) {
|
||||
j := &Jieba{Total: 0.0, Freq: make(map[string]float64)}
|
||||
err := j.load(dictFileName)
|
||||
err := SetDict(j, dictFileName, false)
|
||||
return j, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user