langchain/libs/text-splitters/langchain_text_splitters
Ben 789db7398b
text-splitters: Add JSFrameworkTextSplitter for Handling JavaScript Framework Code (#28972)
## Description
This pull request introduces a new text splitter,
`JSFrameworkTextSplitter`, to the Langchain library. The
`JSFrameworkTextSplitter` extends the `RecursiveCharacterTextSplitter`
to handle JavaScript framework code effectively, including React (JSX),
Vue, and Svelte. It identifies and utilizes framework-specific component
tags and syntax elements as splitting points, alongside standard
JavaScript syntax. This ensures that code is divided at natural
boundaries, enhancing the parsing and processing of JavaScript and
framework-specific code.

### Key Features
- Supports React (JSX), Vue, and Svelte frameworks.
- Identifies and uses framework-specific tags and syntax elements as
natural splitting points.
- Extends the existing `RecursiveCharacterTextSplitter` for seamless
integration.

## Issue
No specific issue addressed.

## Dependencies
No additional dependencies required.

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
2025-03-17 23:32:33 +00:00
..
xsl text-splitters[patch]: delete unused html_chunks_with_headers.xslt (#29340) 2025-01-23 11:29:08 -05:00
__init__.py text-splitters: Add JSFrameworkTextSplitter for Handling JavaScript Framework Code (#28972) 2025-03-17 23:32:33 +00:00
base.py text-splitters: add pydocstyle linting (#28127) 2024-12-09 06:01:03 +00:00
character.py text-splitters: add pydocstyle linting (#28127) 2024-12-09 06:01:03 +00:00
html.py infra: migrate to uv (#29566) 2025-02-06 13:36:26 -05:00
json.py text-splitters: add pydocstyle linting (#28127) 2024-12-09 06:01:03 +00:00
jsx.py text-splitters: Add JSFrameworkTextSplitter for Handling JavaScript Framework Code (#28972) 2025-03-17 23:32:33 +00:00
konlpy.py text-splitters[minor], langchain[minor], community[patch], templates, docs: langchain-text-splitters 0.0.1 (#18346) 2024-02-29 18:33:21 -08:00
latex.py text-splitters[minor], langchain[minor], community[patch], templates, docs: langchain-text-splitters 0.0.1 (#18346) 2024-02-29 18:33:21 -08:00
markdown.py text-splitters: Bump ruff version to 0.9 (#29231) 2025-01-22 00:27:58 +00:00
nltk.py text-splitters: Inconsistent results with NLTKTextSplitter's add_start_index=True (#27782) 2024-12-16 19:53:15 +00:00
py.typed text-splitters[minor], langchain[minor], community[patch], templates, docs: langchain-text-splitters 0.0.1 (#18346) 2024-02-29 18:33:21 -08:00
python.py text-splitters[minor], langchain[minor], community[patch], templates, docs: langchain-text-splitters 0.0.1 (#18346) 2024-02-29 18:33:21 -08:00
sentence_transformers.py text-splitters: Inconsistent results with NLTKTextSplitter's add_start_index=True (#27782) 2024-12-16 19:53:15 +00:00
spacy.py text-splitters: add pydocstyle linting (#28127) 2024-12-09 06:01:03 +00:00