namespace Api.Services.Contracts; /// /// Splits document text into overlapping chunks suitable for embedding and vector search. /// public interface ITextChunker { /// /// Divides into a list of chunks using a sliding window. /// Adjacent chunks share characters to preserve cross-boundary context. /// /// The full document text to chunk. /// Maximum character length per chunk (clamped to 300–3000). /// Number of trailing characters from the previous chunk to repeat at the start of the next (clamped to 0–chunkSize/2). /// Ordered list of non-empty text chunks. IReadOnlyList Chunk(string text, int chunkSize, int overlap); }