Versions in this module Expand all Collapse all v0 v0.0.3 Nov 11, 2025 Changes in this version + func NewTagger(open, close string, r io.Reader) *bufio.Scanner + type Tagger struct + func (t Tagger) Split(data []byte, atEOF bool) (advance int, token []byte, err error) v0.0.2 Sep 7, 2025 Changes in this version + func CosineSimilarity(f func(float32) bool) func(a, b []float32) bool + func Dissimilar(a, b []float32) bool + func HighSimilarity(a, b []float32) bool + func MediumSimilarity(a, b []float32) bool + func RangeSimilarity(lo, hi float32) func(a, b []float32) bool + func WeakSimilarity(a, b []float32) bool + type Embedder interface + Embedding func(ctx context.Context, text string) ([]float32, int, error) + type Semantic struct + func NewSemantic(embed Embedder, r Scanner) *Semantic + func (s *Semantic) Err() error + func (s *Semantic) Scan() bool + func (s *Semantic) Similarity(f func([]float32, []float32) bool) + func (s *Semantic) SimilarityWith(x SimilarityWith) + func (s *Semantic) Text() []string + func (s *Semantic) Window(n int) + type SimilarityWith int + const SIMILARITY_WITH_HEAD + const SIMILARITY_WITH_TAIL + type Sorter struct + func NewSorter[T any](embed Embedder, lens optics.Lens[T, string], seq seq.Seq[T]) *Sorter[T] + func (s *Sorter[T]) Err() error + func (s *Sorter[T]) Next() bool + func (s *Sorter[T]) Similarity(f func([]float32, []float32) bool) + func (s *Sorter[T]) SimilarityWith(x SimilarityWith) + func (s *Sorter[T]) Value() []T + func (s *Sorter[T]) Window(n int) v0.0.1 May 2, 2025 Changes in this version + const EndOfSentence + func NewSentencer(eos string, r io.Reader) *bufio.Scanner + func NewSlicer(delim string, r io.Reader) *bufio.Scanner + type Chunker struct + func NewChunker(size int, s Scanner) *Chunker + func (s *Chunker) Scan() bool + func (s *Chunker) Text() string + type Identity struct + func NewIdentity(r io.Reader) *Identity + func (r *Identity) Err() error + func (r *Identity) Scan() bool + func (r *Identity) Text() string + type Scanner interface + Err func() error + Scan func() bool + Text func() string + type Sentencer []byte + func (s Sentencer) Split(data []byte, atEOF bool) (advance int, token []byte, err error) + type Slicer []byte + func (s Slicer) Split(data []byte, atEOF bool) (advance int, token []byte, err error)