Project Files
dist / strategies / length.d.ts
/**
* @file length.ts
* @description Length-based sampling strategy.
* Splits text into fixed-size chunks with optional overlap between consecutive chunks.
* Returns chunks in document order.
*/
import type { Chunk, SamplingConfig } from "../types";
/**
* Split text into fixed-size chunks with optional overlap.
*
* @param text - The input text to chunk.
* @param config - Sampling configuration (chunkSize, overlap, maxChunks).
* @returns An array of Chunks in document order, each with uniform score of 0.
*/
export declare function sampleByLength(text: string, config: SamplingConfig): readonly Chunk[];
//# sourceMappingURL=length.d.ts.map