#[non_exhaustive]pub struct ExtractionConfig {
pub context_window: usize,
pub dedup_enabled: bool,
pub max_passage_sentences: usize,
}Expand description
Configuration for passage extraction around high-recurrence terms.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.context_window: usizeNumber of surrounding sentences to include on each side.
dedup_enabled: boolWhether to deduplicate extracted passages by content hash.
max_passage_sentences: usizeMaximum number of sentences allowed in a single extracted passage.
If a merged range exceeds this value, it is split into sentence-boundary
chunks of at most this size. A value of 0 is treated as a per-sentence
cap (each sentence becomes its own chunk).
After splitting, each chunk is re-evaluated and chunks that do not
contain any matching high-recurrence term are discarded. As a result,
when context_window is larger than max_passage_sentences, some
context-only sentences may be dropped and the effective surrounding
context in the returned passages can be smaller than the original
merged window.
Trait Implementations§
Source§impl Clone for ExtractionConfig
impl Clone for ExtractionConfig
Source§fn clone(&self) -> ExtractionConfig
fn clone(&self) -> ExtractionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more