tok2vec

package
v0.63.8 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTokenNotFound  = errors.New("token not found")
	ErrVectorNotFound = errors.New("vector not found")
)

Functions

This section is empty.

Types

type Tok2Vec

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

Tok2Vec is designed to convert tokens to vectors for multiple documents so that tokens that exist in multiple documents will be assigned a single vector.

func NewTok2Vec

func NewTok2Vec() Tok2Vec

func (*Tok2Vec) Tok

func (t2v *Tok2Vec) Tok(vec int) (string, error)

func (*Tok2Vec) Toks2Vecs

func (t2v *Tok2Vec) Toks2Vecs(tokens []string, deduplicate bool) []int

func (*Tok2Vec) Toks2VecsFloat64

func (t2v *Tok2Vec) Toks2VecsFloat64(tokens []string, deduplicate bool) []float64

func (*Tok2Vec) Vec

func (t2v *Tok2Vec) Vec(tok string) (int, error)

Jump to

Keyboard shortcuts

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