Skip to main content

A comprehensive text chunking library for RAG applications with multiple strategies

Project description

Jajula Chunking

A comprehensive Python library for text chunking strategies optimized for RAG (Retrieval-Augmented Generation) applications.

Features

  • 9 Different Chunking Strategies - From simple fixed-size to advanced semantic chunking
  • RAG-Optimized - Designed specifically for retrieval-augmented generation workflows
  • Easy to Use - Simple, consistent API across all chunkers
  • Extensible - Base classes for creating custom chunking strategies
  • Production Ready - Comprehensive error handling and validation

Installation

pip install jajula-chunking

Quick Start

from jajula_chunking import FixedSizeChunker, SemanticChunker

# Fixed-size chunking
chunker = FixedSizeChunker(chunk_size=500, overlap=50)
chunks = chunker.chunk("Your long text here...")

# Semantic chunking
semantic_chunker = SemanticChunker(similarity_threshold=0.6)
semantic_chunks = semantic_chunker.chunk("Your text here...")

for chunk in chunks:
    print(f"ID: {chunk.chunk_id}")
    print(f"Content: {chunk.content}")
    print(f"Metadata: {chunk.metadata}")
    print("---")

Available Chunkers

  1. FixedSizeChunker - Fixed character/word-based chunking
  2. SentenceBasedChunker - Sentence boundary-based chunking
  3. ParagraphBasedChunker - Paragraph boundary-based chunking
  4. SemanticChunker - AI-powered semantic chunking
  5. HierarchicalChunker - Multi-level hierarchical chunking
  6. StructureBasedChunker - Document structure-based chunking (HTML/Markdown)
  7. TokenBasedChunker - Token-count based chunking
  8. RecursiveChunker - Recursive text splitting with multiple separators
  9. AdaptiveChunker - Adaptive chunking based on content analysis

Documentation

For detailed documentation and examples, visit: [Documentation Link]

Contributing

Contributions are welcome! Please read our contributing guidelines for details.

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jajula_chunking-0.1.0.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jajula_chunking-0.1.0-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file jajula_chunking-0.1.0.tar.gz.

File metadata

  • Download URL: jajula_chunking-0.1.0.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for jajula_chunking-0.1.0.tar.gz
Algorithm Hash digest
SHA256 13c45f9cac1c4695a59b76c60ccb2f99fa22a49295d567293cd2f63790df9fff
MD5 bf6cefed6d19d3af911dd935b1682cdf
BLAKE2b-256 ccd4ae283d53b321e5d2422d96ef9f26fe8859a6388a3f36919cc7b348f0a3f0

See more details on using hashes here.

File details

Details for the file jajula_chunking-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jajula_chunking-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 709a8c7fcd6cae967a2ab1c295f2fac078c386165046f780ab4814ad01b37c13
MD5 22984d8697b7d261d071701378b31f58
BLAKE2b-256 aa46e92ee665628e971d1232be6365e772894f8221b63727c470733536e358df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page