pub struct FuzzyMatcher { /* private fields */ }Expand description
Fuzzy matcher for component correlation.
Implementations§
Source§impl FuzzyMatcher
impl FuzzyMatcher
Sourcepub fn new(config: FuzzyMatchConfig) -> Self
pub fn new(config: FuzzyMatchConfig) -> Self
Create a new fuzzy matcher with the given configuration
Sourcepub const fn config(&self) -> &FuzzyMatchConfig
pub const fn config(&self) -> &FuzzyMatchConfig
Get the current configuration.
Sourcepub fn with_alias_table(self, table: AliasTable) -> Self
pub fn with_alias_table(self, table: AliasTable) -> Self
Create a matcher with a custom alias table
Sourcepub fn match_components(&self, a: &Component, b: &Component) -> f64
pub fn match_components(&self, a: &Component, b: &Component) -> f64
Match two components and return a confidence score (0.0 - 1.0)
Sourcepub fn compute_phonetic_similarity(name_a: &str, name_b: &str) -> f64
pub fn compute_phonetic_similarity(name_a: &str, name_b: &str) -> f64
Compute phonetic similarity using Soundex.
Sourcepub fn compute_multi_field_score(
&self,
a: &Component,
b: &Component,
weights: &MultiFieldWeights,
) -> MultiFieldScoreResult
pub fn compute_multi_field_score( &self, a: &Component, b: &Component, weights: &MultiFieldWeights, ) -> MultiFieldScoreResult
Compute multi-field weighted score.
Combines scores from multiple component fields based on configured weights.
Trait Implementations§
Source§impl AdaptiveMatching for FuzzyMatcher
impl AdaptiveMatching for FuzzyMatcher
Source§fn with_adaptive_threshold(
old_sbom: &NormalizedSbom,
new_sbom: &NormalizedSbom,
base_config: FuzzyMatchConfig,
) -> (FuzzyMatcher, AdaptiveThresholdResult)
fn with_adaptive_threshold( old_sbom: &NormalizedSbom, new_sbom: &NormalizedSbom, base_config: FuzzyMatchConfig, ) -> (FuzzyMatcher, AdaptiveThresholdResult)
Create a matcher with an adaptively computed threshold for the given SBOMs.
Source§fn adapt_threshold(
&self,
old_sbom: &NormalizedSbom,
new_sbom: &NormalizedSbom,
) -> AdaptiveThresholdResult
fn adapt_threshold( &self, old_sbom: &NormalizedSbom, new_sbom: &NormalizedSbom, ) -> AdaptiveThresholdResult
Compute and apply adaptive threshold to an existing matcher.
Source§impl ComponentMatcher for FuzzyMatcher
impl ComponentMatcher for FuzzyMatcher
Source§fn match_score(&self, a: &Component, b: &Component) -> f64
fn match_score(&self, a: &Component, b: &Component) -> f64
Compute a match score between two components. Read more
Source§fn match_detailed(&self, a: &Component, b: &Component) -> MatchResult
fn match_detailed(&self, a: &Component, b: &Component) -> MatchResult
Compute a detailed match result between two components. Read more
Source§fn explain_match(&self, a: &Component, b: &Component) -> MatchExplanation
fn explain_match(&self, a: &Component, b: &Component) -> MatchExplanation
Generate a human-readable explanation of why two components matched or didn’t. Read more
Auto Trait Implementations§
impl Freeze for FuzzyMatcher
impl RefUnwindSafe for FuzzyMatcher
impl Send for FuzzyMatcher
impl Sync for FuzzyMatcher
impl Unpin for FuzzyMatcher
impl UnsafeUnpin for FuzzyMatcher
impl UnwindSafe for FuzzyMatcher
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
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