@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
26 lines (25 loc) • 920 B
TypeScript
/**
* Sentence-based Chunker
*
* Splits text based on sentence boundaries while respecting size limits.
* Best for prose and natural language content where sentence integrity matters.
*/
import type { BaseChunkerConfig, Chunk, Chunker, ChunkerValidationResult, SentenceChunkerConfig } from "../../types/index.js";
/**
* Sentence-aware chunker implementation
* Splits text by sentences while respecting size constraints
*/
export declare class SentenceChunker implements Chunker {
readonly strategy: "sentence";
private readonly defaultSentenceEnders;
chunk(text: string, config?: SentenceChunkerConfig): Promise<Chunk[]>;
/**
* Split text into sentences based on sentence enders
*/
private splitIntoSentences;
/**
* Split a large sentence into smaller chunks
*/
private splitLargeSentence;
validateConfig(config: BaseChunkerConfig): ChunkerValidationResult;
}