pub struct SummarizationConfig {
pub mode: SummarizationMode,
pub max_statements: Option<usize>,
pub language: String,
pub use_compound_words: bool,
pub use_semantic_primes: bool,
pub drop_boilerplate: bool,
}Expand description
Configuration for the summarization pipeline. Every knob has a sensible
default so the simplest call site can be
summarize(&statements, &SummarizationConfig::default()).
Fields§
§mode: SummarizationMode§max_statements: Option<usize>Hard cap on output statements. None lets SummarizationMode pick.
language: StringLanguage slug (en / ru / hi / zh). Drives compound-word and
semantic-prime substitution lists.
use_compound_words: boolReplace compound words with shorter compound forms (default false).
Useful for chat titles where the result should fit in 1–5 words.
use_semantic_primes: boolExpand compound or rare words into NSM semantic primes when the mode
is Expand. Off by default to keep Topic/Short/Standard terse.
drop_boilerplate: boolStrip boilerplate kinds (install, example) from the output.
true by default — compressed answers should never carry setup steps.
Implementations§
Source§impl SummarizationConfig
impl SummarizationConfig
Sourcepub const fn with_mode(self, mode: SummarizationMode) -> Self
pub const fn with_mode(self, mode: SummarizationMode) -> Self
Builder helper used by project lookup call sites.
Sourcepub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
Builder helper to pin the language.
Sourcepub const fn with_max_statements(self, cap: usize) -> Self
pub const fn with_max_statements(self, cap: usize) -> Self
Builder helper to clamp the number of statements.
Sourcepub fn effective_max_statements(&self, input_count: usize) -> usize
pub fn effective_max_statements(&self, input_count: usize) -> usize
Effective statement cap for the given input size. Combines
SummarizationMode::target_percent with the optional explicit cap and
guarantees at least one statement for any non-empty input.
Trait Implementations§
Source§impl Clone for SummarizationConfig
impl Clone for SummarizationConfig
Source§fn clone(&self) -> SummarizationConfig
fn clone(&self) -> SummarizationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more