pub struct StatisticalFilterConfig {
pub compression_ratio: f32,
pub idf_weight: f32,
pub position_weight: f32,
pub pos_weight: f32,
pub entity_weight: f32,
pub entropy_weight: f32,
pub enable_protection_masks: bool,
pub enable_contextual_stopwords: bool,
pub preserve_negations: bool,
pub preserve_comparators: bool,
pub domain_terms: Vec<String>,
pub min_gap_between_critical: usize,
}Expand description
Configuration for statistical filtering
Fields§
§compression_ratio: f32Target compression ratio (0.0 to 1.0) 0.5 = keep 50% of tokens, 0.2 = keep 20%
idf_weight: f32Weight for inverse document frequency (IDF)
position_weight: f32Weight for position in document (start/end more important)
pos_weight: f32Weight for part-of-speech heuristics
entity_weight: f32Weight for named entity patterns
entropy_weight: f32Weight for local entropy (vocabulary diversity)
enable_protection_masks: boolEnable protection masks for code/JSON/paths/identifiers
enable_contextual_stopwords: boolEnable contextual stopword filtering (smarter removal)
preserve_negations: boolPreserve negations (not, no, never, don’t, etc.)
preserve_comparators: boolPreserve comparators (!=, <=, >=, ==, etc.)
domain_terms: Vec<String>Domain-specific terms to always preserve
min_gap_between_critical: usizeMinimum gap between critical tokens before re-adding
Trait Implementations§
Source§impl Clone for StatisticalFilterConfig
impl Clone for StatisticalFilterConfig
Source§fn clone(&self) -> StatisticalFilterConfig
fn clone(&self) -> StatisticalFilterConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatisticalFilterConfig
impl Debug for StatisticalFilterConfig
Auto Trait Implementations§
impl Freeze for StatisticalFilterConfig
impl RefUnwindSafe for StatisticalFilterConfig
impl Send for StatisticalFilterConfig
impl Sync for StatisticalFilterConfig
impl Unpin for StatisticalFilterConfig
impl UnwindSafe for StatisticalFilterConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more