The registration key for this segmenter. Must match the key passed to
@RegisterClass so metadata-driven resolution round-trips.
Modalities this segmenter can produce. Used to validate configuration.
ProtectedresolveFill in defaults for any option the caller left unset.
Optionaloptions: SegmentationOptionsSegment content into embeddable units.
Never throws for content-shaped problems — inspect Success/ErrorMessage.
ProtectedSegmentProduce the raw, un-normalized segments for this content.
Implementations should focus purely on where the boundaries are; the base
class enforces the token ceiling afterwards, so returning a segment that is
too large is acceptable (it will be split, preserving Title and offsets).
ProtectedtokensStaticResolveResolve a registered segmenter by key via the MJ class factory. Returns null when no segmenter is registered under that key.
Uses TryCreateInstance rather than CreateInstance deliberately: the latter never returns
null for an unregistered key — it falls back to new BaseSegmenter(), a hollow object whose
abstract Key/SegmentCore are undefined. That failure stays invisible until something calls
it, so an unresolvable key must be reported as such here.
Splits content into uniform windows: token-bounded chunks for text, and fixed-duration windows for audio/video that has no transcript.
This is the safety net, not the recommended default. It requires no LLM call, no transcript, and no document structure, so it always produces something — which makes it the right choice for logs, machine-generated text, and media that arrives without cues. Where structure or a transcript exists, prefer
StructuralTextorTranscript, both of which cut on real boundaries.