Versions in this module Expand all Collapse all v0 v0.5.1 Jan 7, 2024 Changes in this version + func Filter(vs chan string, filters ...Predicate) chan string + func IsNotStopWord(v string) bool + func IsStopWord(v string) bool + func IsWord(v string) bool + func LoadStopWords(filename string) error + func Map(vs chan string, f ...Mapper) chan string + func ScanAlphaWords(data []byte, atEOF bool) (advance int, token []byte, err error) + func WordCounts(r io.Reader) (map[string]int, error) + type Classifier interface + Classify func(io.Reader) (string, error) + ClassifyString func(string) (string, error) + Train func(io.Reader, string) error + TrainString func(string, string) error + type Mapper func(string) string + type Predicate func(string) bool + type StdOption func(*StdTokenizer) + func BufferSize(size int) StdOption + func Filters(f ...Predicate) StdOption + func SplitFunc(fn bufio.SplitFunc) StdOption + func Transforms(m ...Mapper) StdOption + type StdTokenizer struct + func NewTokenizer(opts ...StdOption) *StdTokenizer + func (t *StdTokenizer) Tokenize(r io.Reader) chan string + type Tokenizer interface + Tokenize func(io.Reader) chan string + type WeightScheme func(term string) float64 + func BagOfWords(doc map[string]float64) WeightScheme + func Binary(doc map[string]float64) WeightScheme + func LogNorm(doc map[string]float64) WeightScheme + func TermFrequency(doc map[string]float64) WeightScheme + type WeightSchemeStrategy func(doc map[string]float64) WeightScheme