Documentation
¶
Overview ¶
Package processing implements SyncBase's document-processing module.
Package processing coordinates the fenced document-processing pipeline.
Index ¶
- func ChunkPages(pages []knowledge.PageText) []knowledge.Chunk
- func ChunkPagesWithCounter(pages []knowledge.PageText, counter TokenCounter) ([]knowledge.Chunk, error)
- func ChunkPagesWithProfile(pages []knowledge.PageText, counter TokenCounter, profile knowledge.Profile) ([]knowledge.Chunk, error)
- type Processor
- type TokenCounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChunkPages ¶
ChunkPages creates deterministic page-bounded chunks.
func ChunkPagesWithCounter ¶
func ChunkPagesWithCounter(pages []knowledge.PageText, counter TokenCounter) ([]knowledge.Chunk, error)
ChunkPagesWithCounter applies the default production token contract while preserving page boundaries. New processing code should pass its immutable profile to ChunkPagesWithProfile instead.
func ChunkPagesWithProfile ¶
func ChunkPagesWithProfile( pages []knowledge.PageText, counter TokenCounter, profile knowledge.Profile, ) ([]knowledge.Chunk, error)
ChunkPagesWithProfile applies the profile's token sizing contract while preserving page boundaries. Forced splits retain exactly the profile's configured overlap, so the persisted profile and generated chunks cannot silently diverge.
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor advances one claimed run from parsing through active-version publication.
type TokenCounter ¶
TokenCounter returns the number of tokens produced by the pinned processing tokenizer for one passage.