Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /topoteretes_cognee /cognee /infrastructure /data /chunking /HaystackChunkEngine.py
| from collections.abc import Iterable | |
| from cognee.shared.data_models import ChunkStrategy | |
| class HaystackChunkEngine: | |
| """ | |
| Manage chunking of source data using specified strategies and parameters. | |
| The class provides functionality to process source data into manageable chunks according | |
| to defined strategies, chunk sizes, and overlaps. The primary instance variables include | |
| chunk_strategy, source_data, chunk_size, and chunk_overlap, which dictate how the data | |
| is chunked. | |
| """ | |
| def __init__( | |
| self, | |
| chunk_strategy: ChunkStrategy | None = None, | |
| source_data: Iterable[str] | None = None, | |
| chunk_size: int | None = None, | |
| chunk_overlap: int | None = None, | |
| ) -> None: | |
| self.chunk_strategy = chunk_strategy | |
| self.source_data = source_data | |
| self.chunk_size = chunk_size | |
| self.chunk_overlap = chunk_overlap | |
Xet Storage Details
- Size:
- 903 Bytes
- Xet hash:
- 059f5557e4d3e3a45f4213f46bfd14341ec3b844174420b94a3adf9ac740e5b2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.