LangChain · Class
RecursiveCharacterTextSplitter
RecursiveCharacterTextSplitter breaks text into size-limited chunks while trying to keep paragraphs, sentences, and words together. It checks separators in order and falls back to smaller units when needed.
Last updated
- Since
- v0.0
Syntax
RecursiveCharacterTextSplitter(separators: list[str] | None = None, keep_separator: bool | Literal['start', 'end'] = True, is_separator_regex: bool = False, **kwargs: Any)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
TextSplittercreate_documentssplit_documentsfrom_huggingface_tokenizerfrom_tiktoken_encodertransform_documentsget_separators_for_language