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
new SentenceSplitter()
new SentenceSplitter(
options
?):SentenceSplitter
Parameters
• options?
• options.chunkOverlap?: number
• options.chunkSize?: number
• options.chunkingTokenizerFn?
• options.paragraphSeparator?: string
• options.splitLongSentences?: boolean
• options.tokenizer?: any
• options.tokenizerDecoder?: any
Returns
Source
packages/core/src/TextSplitter.ts:78
Properties
chunkOverlap
chunkOverlap:
number
Source
packages/core/src/TextSplitter.ts:70
chunkSize
chunkSize:
number
Source
packages/core/src/TextSplitter.ts:69
chunkingTokenizerFn()
private
chunkingTokenizerFn: (text
) =>string
[]
Parameters
• text: string
Returns
string
[]