pub struct ConfigLexiconScorer { /* private fields */ }Expand description
LexiconScorer backed by a TOML config file.
§Matching
Pattern matching is case-insensitive substring with two normalizations applied before comparison:
- Apostrophes are stripped from both content and pattern, so
"that's right"matches"thats right"and vice versa. - A 3-token negation window suppresses matches preceded within three
whitespace-separated tokens by a negator (
not,never,don't,didn't,no,isn't,can't,cannot,won't,hardly,barely). This prevents"not confirmed"from firing the"confirmed"affirmation.
§Limitations
This is a lexical heuristic, not a language model. It does not perform syntactic parsing, sarcasm detection, discourse analysis, or full semantic interpretation. Known blind spots:
- Deep negation stacking (
"I don't think this is not confirmed") - Pragmatic ambiguity (
"noted"as genuine vs. cold acknowledgment) - Cross-sentence negation scope (the window is local to each pattern site)
The semantic search layer (embeddings) complements this scorer but does not replace it — embeddings handle vocabulary-agnostic retrieval; this scorer handles explicit memory-intent signals (commitments, decisions, corrections) that are not the same problem as semantic similarity.
Implementations§
Trait Implementations§
Source§impl Clone for ConfigLexiconScorer
impl Clone for ConfigLexiconScorer
Source§fn clone(&self) -> ConfigLexiconScorer
fn clone(&self) -> ConfigLexiconScorer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConfigLexiconScorer
impl Debug for ConfigLexiconScorer
Source§impl FromStr for ConfigLexiconScorer
impl FromStr for ConfigLexiconScorer
Source§impl LexiconScorer for ConfigLexiconScorer
impl LexiconScorer for ConfigLexiconScorer
Auto Trait Implementations§
impl Freeze for ConfigLexiconScorer
impl RefUnwindSafe for ConfigLexiconScorer
impl Send for ConfigLexiconScorer
impl Sync for ConfigLexiconScorer
impl Unpin for ConfigLexiconScorer
impl UnsafeUnpin for ConfigLexiconScorer
impl UnwindSafe for ConfigLexiconScorer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more