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.
Metadata
Release files for cognigraph-chunker 2.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cognigraph_chunker-2.2.4.tar.gz | 194.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| cognigraph_chunker-2.2.4-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| cognigraph_chunker-2.2.4-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 13.4 MB
Release files / cognigraph_chunker-2.2.4.tar.gz
| Download URL | cognigraph_chunker-2.2.4.tar.gz |
|---|---|
| Size | 194.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0dcfb791b09dacfbabf50d6e4a670ae822ce033ec1e5100aee024755adbc0a0b
|
|
BLAKE2b-256 checksum How to use checksums |
dbc3517294f9d95fe20cda9a2bbb4e70b21dcc56fba343063005b5d02de39009
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
82c3c3798ac4679f202ccb2f533daa78253a212a2f76a5d371a24457d996fc48
|
|
BLAKE2b-256 checksum How to use checksums |
041f316e8a446572a8ffa699de3b474dbe30e50656b86bed292e5bd8906a4df6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | cognigraph_chunker-2.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
1cd676106769684d9adae007b4187341501cfecb8d90081377d44187d9f2eb39
|
|
BLAKE2b-256 checksum How to use checksums |
fad9276963cf7cd5c2bcd21a74fa936b3be7bd9c1a8aae938abb54e62dbe1dd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / cognigraph_chunker-2.2.4-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | cognigraph_chunker-2.2.4-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f10458a6dbcf41251ce95a0b0f15fda475cad52f83a2d60b897f92d06c31eab7
|
|
BLAKE2b-256 checksum How to use checksums |
6ae872100f8ac1a03f8f0b5ece4d7507ba6e2c1eb61d455f68f968805018380c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / cognigraph_chunker-2.2.4-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | cognigraph_chunker-2.2.4-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f834b2064531ec9963bbce675ae5c34742a6f1bdb00391a17a9aee49a5a705ec
|
|
BLAKE2b-256 checksum How to use checksums |
7da3e8cd9f8ffa3aa7e2e28fd9a86fa2a519f282f793e3556b12436f1a82a829
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|