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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user