Fast text chunking toolkit: fixed-size, delimiter, semantic, cognition-aware, intent-driven, topology-aware, enriched, and adaptive strategies
Project description
cognigraph-chunker
Fast text chunking toolkit for RAG pipelines, written in Rust with Python bindings.
Eight chunking strategies — fixed-size, delimiter, semantic, cognition-aware, intent-driven, topology-aware, enriched, and adaptive — plus token-aware merging, signal-processing primitives, and five intrinsic quality metrics.
Install
pip install cognigraph-chunker
Quick start
from cognigraph_chunker import Chunker, OllamaProvider, SemanticConfig, semantic_chunk
# Fixed-size chunking — no external services needed
for chunk in Chunker("Your long document text here...", size=1024):
print(chunk)
# Semantic chunking with a local Ollama embedding model
provider = OllamaProvider(model="nomic-embed-text")
result = semantic_chunk(open("document.md").read(), provider, SemanticConfig())
for text, offset in result.chunks:
print(f"[{offset}] {text[:80]}")
Cognition-aware chunking (entity/discourse-preserving boundaries with quality
metrics), intent-driven, topology-aware, enriched, and adaptive strategies are
exposed as cognitive_chunk, intent_chunk, topo_chunk, enriched_chunk,
and adaptive_chunk, alongside evaluate_chunks for standalone quality
scoring.
Full documentation, the CLI, and the REST API live in the project repository.
MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cognigraph_chunker-2.2.4.tar.gz.
File metadata
- Download URL: cognigraph_chunker-2.2.4.tar.gz
- Upload date:
- Size: 194.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dcfb791b09dacfbabf50d6e4a670ae822ce033ec1e5100aee024755adbc0a0b
|
|
| MD5 |
bcad989dd3f9cf443b632dbc4448eea5
|
|
| BLAKE2b-256 |
dbc3517294f9d95fe20cda9a2bbb4e70b21dcc56fba343063005b5d02de39009
|
File details
Details for the file cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82c3c3798ac4679f202ccb2f533daa78253a212a2f76a5d371a24457d996fc48
|
|
| MD5 |
21198d7578a1aa0625c48055604e472f
|
|
| BLAKE2b-256 |
041f316e8a446572a8ffa699de3b474dbe30e50656b86bed292e5bd8906a4df6
|
File details
Details for the file cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd676106769684d9adae007b4187341501cfecb8d90081377d44187d9f2eb39
|
|
| MD5 |
818558f7b5de4ff9479df09ba5571e0e
|
|
| BLAKE2b-256 |
fad9276963cf7cd5c2bcd21a74fa936b3be7bd9c1a8aae938abb54e62dbe1dd1
|
File details
Details for the file cognigraph_chunker-2.2.4-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: cognigraph_chunker-2.2.4-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f10458a6dbcf41251ce95a0b0f15fda475cad52f83a2d60b897f92d06c31eab7
|
|
| MD5 |
454a457db98cf8cf150a30784b0ec685
|
|
| BLAKE2b-256 |
6ae872100f8ac1a03f8f0b5ece4d7507ba6e2c1eb61d455f68f968805018380c
|
File details
Details for the file cognigraph_chunker-2.2.4-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: cognigraph_chunker-2.2.4-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f834b2064531ec9963bbce675ae5c34742a6f1bdb00391a17a9aee49a5a705ec
|
|
| MD5 |
1c59dc99c30a9c42c630ef08bb1b65cd
|
|
| BLAKE2b-256 |
7da3e8cd9f8ffa3aa7e2e28fd9a86fa2a519f282f793e3556b12436f1a82a829
|