How campusx-official/langchain-text-splitters works
This repository is a set of standalone Python demonstrations of document and text chunking, not a unified application. Each script prepares sample text or loads a PDF, configures a splitting strategy, and prints a result. The examples cover length-based, general recursive, Markdown-aware, Python-aware, and embedding-driven semantic splitting. Edges reflect calls visible in the excerpts; external libraries are shown as dependencies, not as repository modules.
Main entry points: semantic_meaning_based.py Semantic split · length_based.py PDF length split · text_structure_based.py Text structure split · markdown_splitting.py Markdown split
Components 11
Other components
- PDF length split
length_based.py - PDF loader
- Character splitter
- Text structure split
text_structure_based.py - Recursive splitter
- Markdown split
markdown_splitting.py - Python code split
python_code_splitting.py - Semantic split
semantic_meaning_based.py - Semantic chunker
- OpenAI embeddings
- Environment loader
Connections 8
- PDF length split → PDF loader: loads PDF
length_based.py - PDF length split → Character splitter: splits documents
length_based.py - Text structure split → Recursive splitter: splits text
text_structure_based.py - Markdown split → Recursive splitter: splits Markdown
markdown_splitting.py - Python code split → Recursive splitter: splits Python
python_code_splitting.py - Semantic split → Semantic chunker: creates documents
semantic_meaning_based.py - Semantic split → OpenAI embeddings: configures embeddings
semantic_meaning_based.py - Semantic split → Environment loader: loads environment
semantic_meaning_based.py