/** * Sentence boundary detection — Decision D-4, I-5.1. * * Uses `Intl.Segmenter` with `{ granularity: 'sentence' }`: * - Browser-native & Node 16+ — zero bundle size * - Handles abbreviations (Mr., Dr.), decimals ($3.50), URLs, markdown * - Language-aware (detects locale automatically) * - No regex required */ /** * Given a streaming text buffer, extract all **complete** sentences and * return the remaining partial sentence that has not ended yet. * * The last segment from `Intl.Segmenter` is treated as incomplete because * more tokens may still arrive. All earlier segments are complete. * * I-5.5: This function is called on each new token during streaming. * On natural stream end, the remaining buffer is spoken as-is. * * @param buffer Accumulated token buffer * @returns `{ sentences, remaining }` — sentences ready to speak, leftover */ export declare function extractCompleteSentences(buffer: string): { sentences: string[]; remaining: string; }; /** * Split a **complete** text into all its sentences. * Use for pre-existing text — not for streaming buffers. */ export declare function splitSentences(text: string): string[];