chunker

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	ID         string
	Text       string
	Index      int
	TokenCount int
}

Chunk represents a single chunk of text with metadata

type Chunker

type Chunker struct {
	MaxTokens int // Maximum tokens per chunk (default: 512)
	Overlap   int // Token overlap between chunks (default: 50)
}

Chunker splits text into overlapping chunks with sentence boundary awareness

func (*Chunker) Chunk

func (c *Chunker) Chunk(text string) []Chunk

Chunk splits the input text into chunks

Jump to

Keyboard shortcuts

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