Versions in this module Expand all Collapse all v0 v0.3.1 Sep 23, 2026 v0.3.0 Sep 11, 2026 v0.2.4 Sep 9, 2026 v0.2.3 Sep 9, 2026 v0.2.2 Sep 9, 2026 v0.2.1 Sep 9, 2026 v0.2.0 Sep 8, 2026 Changes in this version + func Estimate(s string) int + func Names() []string + func New(name string, o Options) (semantic.Splitter, error) + func Register(name string, build Build) + type Build func(Options) (semantic.Splitter, error) + type Chars struct + Overlap int + Size int + func (c Chars) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Code struct + Size int + func (c Code) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Embed func(ctx context.Context, texts []string) ([][]float32, error) + type Markdown struct + Size int + func (m Markdown) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Options struct + Count func(string) int + Embed Embed + Max int + Overlap int + Separators []string + Size int + Threshold float64 + type Or []semantic.Splitter + func (o Or) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Paragraphs struct + Overlap int + Size int + func (p Paragraphs) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Recursive struct + Overlap int + Separators []string + Size int + func (r Recursive) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Semantic struct + Embed Embed + Size int + Threshold float64 + func (s Semantic) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Sentences struct + Max int + Overlap int + Size int + func (s Sentences) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Tokens struct + Count func(string) int + Overlap int + Size int + func (t Tokens) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error) + type Words struct + Overlap int + Size int + func (w Words) Split(ctx context.Context, d semantic.Doc) ([]semantic.Chunk, error)