/** * Chunking service - splits text into overlapping chunks for embedding */ export interface ChunkResult { chunks: string[]; metadata: { total_chars: number; total_chunks: number; avg_chunk_size: number; }; } export declare class ChunkingService { private readonly targetChunkSize; private readonly overlapSize; constructor(targetChunkSize?: number, // ~600 tokens = ~2400 chars overlapSize?: number); /** * Normalize text before chunking * - Remove excessive whitespace * - Normalize line breaks * - Preserve code structure */ private normalizeText; /** * Split text into sentences (rough heuristic) */ private splitIntoSentences; /** * Chunk text with sliding window and overlap */ chunk(text: string): ChunkResult; /** * Estimate token count (rough: 1 token ≈ 4 chars) */ estimateTokens(text: string): number; } //# sourceMappingURL=chunking.service.d.ts.map