tfidf

package
v0.0.0-...-c9cb955 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vectorizer

type Vectorizer struct {
	// contains filtered or unexported fields
}

Vectorizer represents a TF-IDF vectorizer

func NewVectorizer

func NewVectorizer() *Vectorizer

NewVectorizer creates a new Vectorizer

func (*Vectorizer) Fit

func (v *Vectorizer) Fit(docs []string)

Fit fits the vectorizer to the input documents

func (*Vectorizer) FitTransform

func (v *Vectorizer) FitTransform(docs []string) [][]float64

FitTransform fits the vectorizer to the input documents and then transforms them

func (*Vectorizer) Transform

func (v *Vectorizer) Transform(docs []string) [][]float64

Transform transforms the input documents to TF-IDF vectors

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL