1
0
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:
Wang Bin
2015-03-30 17:52:09 +08:00
parent 7a7f8af517
commit c397cafe8a
4 changed files with 50 additions and 28 deletions

View File

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