Expand description
Semantic chunking strategy.
Chunks content based on semantic structure (headings, paragraphs, sections). Best for markdown, documentation, and prose text.
Structsยง
- Section ๐
- A parsed section of the document.
- Semantic
Chunker - Semantic chunker that splits at document structure boundaries.
Functionsยง
- chunk_
from_ ๐elements - Chunk from structured elements.
- chunk_
sections ๐ - Chunk sections into appropriately-sized chunks.
- create_
chunk ๐ - Create a chunk output.
- is_
underline_ ๐heading - Check if a line is an underline-style heading indicator.
- parse_
markdown_ ๐heading - Parse a markdown-style heading (# Heading).
- parse_
sections ๐ - Parse document into sections based on headings.
- split_
large_ ๐section - Split a large section into smaller chunks.