chunking
triplum.steps.chunking ¶
Chunker ¶
FixedSize ¶
FixedSize(size: int)
Bases: Chunker, FingerprintedComputationMixin
Slice the text every size characters; the last chunk keeps the remainder.
Chunks do not overlap and concatenate back to the source text. Empty text yields no chunks.
Source code in src/triplum/steps/chunking.py
23 24 25 26 | |
fingerprint_config ¶
fingerprint_config() -> dict[str, object]
Source code in src/triplum/steps/chunking.py
28 29 | |
__call__ ¶
Source code in src/triplum/steps/chunking.py
31 32 33 34 35 36 37 38 39 40 41 42 | |
WholeText ¶
Bases: Chunker, FingerprintedComputationMixin
One chunk holding the whole source text; empty text yields no chunks.
Keeps a benchmark's native passages as retrieval units, as passage-level recall assumes.
fingerprint_config ¶
fingerprint_config() -> dict[str, object]
Source code in src/triplum/steps/chunking.py
51 52 | |
__call__ ¶
Source code in src/triplum/steps/chunking.py
54 55 56 57 58 59 60 61 62 63 64 65 66 | |