Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chunk ¶
Chunk represents a piece of text from a document
func ProcessFile ¶ added in v1.9.28
func ProcessFile(dp DocumentProcessor, path string) ([]Chunk, error)
ProcessFile reads a file and processes it using the given document processor
type DocumentProcessor ¶ added in v1.9.28
DocumentProcessor takes file content and returns chunks. Config (size, overlap, etc.) is set at construction time.
type TextDocumentProcessor ¶ added in v1.9.28
type TextDocumentProcessor struct {
// contains filtered or unexported fields
}
TextDocumentProcessor is the default text-based chunker
func NewTextDocumentProcessor ¶ added in v1.9.28
func NewTextDocumentProcessor(size, overlap int, respectWordBoundaries bool) *TextDocumentProcessor
NewTextDocumentProcessor creates a text-based document processor
Click to show internal directories.
Click to hide internal directories.