Chunking Experiment
A Python package to chunk pandas/numpy data with different chunking strategies.
Requirements
- Python 3.10+
- Gradio
- pandas
- pytest
- numpy
Installation
pip install chunking-experiment
Or:
make install
Usage
from chunking_experiment import ChunkingExperiment
Create an instance of a Chunking class
class_instance = ChunkingExperiment(
"input.csv",
"output.csv",
n_chunks=3,
chunking_strategy="rows"
)
Then perform the chunking:
class_instance.process_chunks()
Run the web interface
Go to the app folder and run the following command:
from gradio_interface import launch_interface
launch_interface()
Alternatively, you can run the following command to start the web interface:
python gradio_interface.py
Features
- Multiple chunking strategies (rows, columns, tokens)
- Support for CSV, JSON, Numpy and Parquet files
- Web interface using Gradio
- Comprehensive test suite
- Documentation using Sphinx
- Benchmarking the chunking strategies
Development
To install development dependencies:
pip install -e .[dev]
Or:
make install-dev
Testing
To run tests, run the following command from the root folder:
pytest
Documentation
To install the documentation dependencies:
pip install -e .[docs]
Or:
make install-docs
To build the documentation:
make docs
To serve the documentation:
make docs-serve
Below are the full list of commands that can be run from the root folder:
make benchmark
make clean
make docs
make docs-clean
make docs-serve
make install
make install-docs
make lint
make run
make test
make typecheck
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for chunking-experiment 0.1.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 | |
|---|---|---|---|
| chunking_experiment-0.1.0.tar.gz | 7.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chunking_experiment-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 MB
Release files / chunking_experiment-0.1.0.tar.gz
| Download URL | chunking_experiment-0.1.0.tar.gz |
|---|---|
| Size | 7.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22c362f815ce473a73788107251952848742241ba56f33a6493d0b36b150101b
|
|
BLAKE2b-256 checksum How to use checksums |
2d0ffe7e14733d998fcdf21d95c93022205b0e9eeee0dc7d8874e7751cb14788
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.15
|
Release files / chunking_experiment-0.1.0-py3-none-any.whl
| Download URL | chunking_experiment-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
765e6dc07fb9244e850a3941ed33b8e89b6542bbfbc770b175196904da9a673e
|
|
BLAKE2b-256 checksum How to use checksums |
d133d2cce7c2d40faabfb457ead2e362cfacf617002bd1414498b325aeadb7e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.15
|