Class HybridChunkerOptions
java.lang.Object
ai.docling.serve.api.chunk.request.options.ChunkerOptions
ai.docling.serve.api.chunk.request.options.HybridChunkerOptions
Options for configuring the hybrid chunker.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creatingHybridChunkerOptionsinstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull HybridChunkerOptions.Builderbuilder()@Nullable IntegerMaximum number of tokens per chunk.Merge undersized successive chunks with same headings.@Nullable StringHuggingFace model name for custom tokenization.booleanInclude both raw_text and text (contextualized) in response.booleanUse markdown table format instead of triplets for table serialization.@NonNull HybridChunkerOptions.Builder@NonNull StringtoString()
-
Method Details
-
builder
-
toBuilder
-
isUseMarkdownTables
public boolean isUseMarkdownTables()Use markdown table format instead of triplets for table serialization.- Returns:
- true if markdown tables should be used, false otherwise
-
isIncludeRawText
public boolean isIncludeRawText()Include both raw_text and text (contextualized) in response. If False, only text is included.- Returns:
- true if raw text should be included, false otherwise
-
getMaxTokens
Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer.- Returns:
- the maximum number of tokens per chunk, or null if not specified
-
getTokenizer
HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.- Returns:
- the tokenizer model name, or null to use the default
-
getMergePeers
Merge undersized successive chunks with same headings.- Returns:
- true if chunks should be merged, false otherwise, or null if not specified
-
toString
- Overrides:
toStringin classChunkerOptions
-