Versions in this module Expand all Collapse all v0 v0.5.1 Jan 7, 2024 Changes in this version + func CosineSimilarity(left, right *sparseRow) float64 + func EuclideanDistance(left, right *sparseRow) float64 + func PearsonCorrelation(left, right *sparseRow) float64 + type Classifier struct + func New(opts ...Option) *Classifier + func (c *Classifier) Classify(r io.Reader) (string, error) + func (c *Classifier) ClassifyString(doc string) (string, error) + func (c *Classifier) Train(r io.Reader, category string) error + func (c *Classifier) TrainString(doc string, category string) error + type Option func(c *Classifier) error + func K(k int) Option + func Similarity(s SimilarityScore) Option + func TermIndex(i *index.TermIndex) Option + func Tokenizer(t classifier.Tokenizer) Option + func WeightScheme(s classifier.WeightSchemeStrategy) Option + type Partitioning interface + Partition func(low, high int) int + type SimilarityScore func(left, right *sparseRow) float64 + type Stack []int