chunkText
chunkText(
text:string,options?:ChunkingOptions):TextChunk[]
Defined in: src/lib/memoryRetrieval/chunking.ts:68Â
Split text into overlapping chunks using sentence boundaries.
Algorithm:
- Split text into sentences
- Accumulate sentences until chunk size is reached
- Create chunk with overlap from previous chunk
- Handle edge cases (very long sentences, short texts)
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Last updated on