Skip to main content
RecursiveCharacterTextSplitter includes prebuilt lists of separators that are useful for splitting text in a specific programming language. Supported languages are stored in the langchain_text_splitters.Language enum. They include:
To view the list of separators for a given language, pass a value from this enum into
To instantiate a splitter that is tailored for a specific language, pass a value from the enum into
Below we demonstrate examples for the various languages.
To view the full list of supported languages:
You can also see the separators used for a given language:

Python

以下是一个using the PythonTextSplitter:的示例

JS

以下是一个using the JS text splitter:的示例

TS

以下是一个using the typescript text splitter:的示例

Markdown

以下是一个using the Markdown text splitter:的示例

Latex

以下是一个on Latex text:的示例

HTML

以下是一个using an HTML text splitter:的示例

Solidity

以下是一个using the Solidity text splitter:的示例

C#

以下是一个using the C# text splitter:的示例

Haskell

以下是一个using the Haskell text splitter:的示例

PHP

以下是一个using the PHP text splitter:的示例

PowerShell

以下是一个using the PowerShell text splitter:的示例

Visual basic 6