/** * Text Chunker Factory * Provides unified interface for text chunking strategies */ import type { ChunkingConfig, ChunkingResult, TextChunk } from "./ChunkingConfig.js"; /** * Interface for chunking strategies */ export interface ChunkingStrategy { chunk(text: string, config: ChunkingConfig): ChunkingResult; } /** * Text Chunker - Factory for creating and using chunking strategies */ export declare class TextChunker { private config; constructor(config?: Partial); /** * Get current configuration */ getConfig(): ChunkingConfig; /** * Check if text needs chunking based on estimated token count */ needsChunking(text: string): boolean; /** * Estimate token count for text */ estimateTokens(text: string): number; /** * Chunk text using configured strategy */ chunk(text: string): ChunkingResult; /** * Chunk multiple texts in batch */ chunkBatch(texts: string[]): ChunkingResult[]; /** * Flatten chunks from multiple texts into a single array with source tracking */ chunkBatchFlat(texts: Array<{ id: string | number; content: string; }>): Array; } /** * Get or create global chunker instance */ export declare function getTextChunker(config?: Partial): TextChunker; /** * Reset global chunker (useful for testing) */ export declare function resetTextChunker(): void; export type { ChunkingConfig, ChunkingResult, TextChunk }; export { DEFAULT_CHUNKING_CONFIG, getChunkingConfig } from "./ChunkingConfig.js"; export { estimateTokens } from "./strategies/SentenceChunker.js"; //# sourceMappingURL=TextChunker.d.ts.map