Class: SentenceSplitter
SentenceSplitter is our default text splitter that supports splitting into sentences, paragraphs, or fixed length chunks with overlap.
One of the advantages of SentenceSplitter is that even in the fixed length chunks it will try to keep sentences together.
Constructors
constructor
• new SentenceSplitter(options?
): SentenceSplitter
Parameters
Name | Type |
---|---|
options? | Object |
options.chunkOverlap? | number |
options.chunkSize? | number |
options.chunkingTokenizerFn? | (text : string ) => string [] |
options.paragraphSeparator? | string |
options.splitLongSentences? | boolean |
options.tokenizer? | any |
options.tokenizerDecoder? | any |
Returns
Defined in
packages/core/src/TextSplitter.ts:77
Properties
chunkOverlap
• Private
chunkOverlap: number
Defined in
packages/core/src/TextSplitter.ts:70