GraphRAG Chunking
This package contains a collection of text chunkers, a core config model, and a factory for acquiring instances.
Examples
Basic sentence chunking with nltk
The SentenceChunker class splits text into individual sentences by identifying sentence boundaries. It takes input text and returns a list where each element is a separate sentence, making it easy to process text at the sentence level.
Open the notebook to explore the basic sentence example code
Token chunking
The TokenChunker splits text into fixed-size chunks based on token count rather than sentence boundaries. It uses a tokenizer to encode text into tokens, then creates chunks of a specified size with configurable overlap between chunks.
Open the notebook to explore the token chunking example code
Using the factory via helper util
The create_chunker factory function provides a configuration-driven approach to instantiate chunkers by accepting a ChunkingConfig object that specifies the chunking strategy and parameters. This allows for more flexible and maintainable code by separating chunker configuration from direct instantiation.
Open the notebook to explore the factory helper util example code
Metadata
Release files for graphrag-chunking 3.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| graphrag_chunking-3.3.0.tar.gz | 7.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graphrag_chunking-3.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / graphrag_chunking-3.3.0.tar.gz
| Download URL | graphrag_chunking-3.3.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56d3fcfc4cbdfbb8caf86d03c3f2d6365a316fdf125137f3e0c4b9b35f4774ca
|
|
BLAKE2b-256 checksum How to use checksums |
9b313daf2330dc9d3235155e6b74d7004f02bca3b65510a1f478a0767afc14dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Release files / graphrag_chunking-3.3.0-py3-none-any.whl
| Download URL | graphrag_chunking-3.3.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
981f25c00c0815ddf64ae1dec86102e871ae7357a81de9f450467ccadd74f7f5
|
|
BLAKE2b-256 checksum How to use checksums |
efc0309083a2338128a851b30611fde23b10a632a51712f011a7353765937307
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Security for graphrag-chunking 3.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.