| Crates.io | slabs |
| lib.rs | slabs |
| version | 0.1.0 |
| created_at | 2026-01-18 18:10:46.159539+00 |
| updated_at | 2026-01-18 18:10:46.159539+00 |
| description | Text chunking for RAG: fixed, sentence, recursive, and semantic strategies |
| homepage | |
| repository | https://github.com/arclabs561/slabs |
| max_upload_size | |
| id | 2052784 |
| size | 212,517 |
Text chunking for RAG pipelines.
Dual-licensed under MIT or Apache-2.0.
| Strategy | Use Case | Complexity |
|---|---|---|
| Fixed | Homogeneous content, baselines | $O(n)$ |
| Sentence | Prose, articles | $O(n)$ |
| Recursive | General-purpose | $O(n \log n)$ |
| Semantic | Topic coherence (semantic feature) |
$O(nd)$ |
use slabs::{Chunker, RecursiveChunker};
let chunker = RecursiveChunker::prose(500);
let text = "Your long document here...";
let slabs = chunker.chunk(text);
for slab in slabs {
println!("[{}..{}]: {}", slab.start, slab.end, slab.text);
}