Versions in this module Expand all Collapse all v0 v0.70.0 Jan 18, 2022 Changes in this version + var StopWordMap = map[string]bool + type Idf struct + func NewIdf() *Idf + func (i *Idf) AddToken(text string, freq float64, pos ...string) error + func (i *Idf) Freq(key string) (float64, string, bool) + func (i *Idf) LoadDict(files ...string) error + func (i *Idf) NumTokens() int + func (i *Idf) TotalFreq() float64 + type Segment struct + func (s Segment) Text() string + func (s Segment) Weight() float64 + type Segments []Segment + func (ss Segments) Len() int + func (ss Segments) Less(i, j int) bool + func (ss Segments) Swap(i, j int) + type StopWord struct + func NewStopWord() *StopWord + func (s *StopWord) AddStop(text string) + func (s *StopWord) IsStopWord(word string) bool + func (s *StopWord) LoadDict(files ...string) error + func (s *StopWord) RemoveStop(text string) + type TagExtracter struct + Idf *Idf + func (t *TagExtracter) ExtractTags(text string, topK int) (tags Segments) + func (t *TagExtracter) LoadDict(fileName ...string) error + func (t *TagExtracter) LoadIdf(fileName ...string) error + func (t *TagExtracter) LoadStopWords(fileName ...string) error + func (t *TagExtracter) WithGse(segs gse.Segmenter) + type TextRanker struct + HMM bool + func (t *TextRanker) LoadDict(fileName ...string) error + func (t *TextRanker) TextRank(text string, topK int) Segments + func (t *TextRanker) TextRankWithPOS(text string, topK int, allowPOS []string) Segments + func (t *TextRanker) WithGse(segs gse.Segmenter)