mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-27 15:40:32 +08:00
uniform the api
This commit is contained in:
@@ -161,7 +161,7 @@ func (t *TextRanker) TextRank(sentence string, topK int) wordWeights {
|
||||
// name in current directory. This function must be called before cut any
|
||||
// sentence.
|
||||
func NewTextRanker(dictFileName string) (*TextRanker, error) {
|
||||
p, err := posseg.NewPosseg(dictFileName)
|
||||
p, err := posseg.Open(dictFileName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user