1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-28 08:02:45 +08:00

added simple implemention of textrank, corresponding to jieba commit #4030d8ed86dd3ff54e215ebe88c141b2a8345eda

This commit is contained in:
Wang Bin
2015-02-04 18:23:47 +08:00
parent 70a8da2687
commit 74dbb7d525
3 changed files with 166 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
package analyse
import (
// "fmt"
"fmt"
"github.com/wangbin/jiebago"
"sort"
"strings"
@@ -13,9 +13,9 @@ type TfIdf struct {
Freq float64
}
//func (t TfIdf) String() string {
// return fmt.Sprintf("{%s: %f}", t.Word, t.Freq)
//}
func (t TfIdf) String() string {
return fmt.Sprintf("{%s: %f}", t.Word, t.Freq)
}
type TfIdfs []TfIdf