embedtest

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

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

Fake is a deterministic bag-of-words embedder: texts that share tokens land near each other in vector space, which is enough to test ranking.

func New

func New(dims int) *Fake

New returns a Fake embedder of the given dimensionality.

func (*Fake) Dims

func (f *Fake) Dims() int

Dims returns the embedding dimensionality.

func (*Fake) Embed

func (f *Fake) Embed(_ context.Context, texts []string) ([][]float32, error)

Embed produces one normalized vector per text.

Jump to

Keyboard shortcuts

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