pub struct TokenMatcher { /* private fields */ }Expand description
Token-based (bag-of-words) similarity.
Computes the Jaccard index of the token sets extracted from two strings.
Implementations§
Source§impl TokenMatcher
impl TokenMatcher
Sourcepub fn case_insensitive(self, yes: bool) -> Self
pub fn case_insensitive(self, yes: bool) -> Self
Set whether comparison is case-insensitive.
Sourcepub fn similarity(&self, a: &str, b: &str) -> FuzzyScore
pub fn similarity(&self, a: &str, b: &str) -> FuzzyScore
Compute the Jaccard similarity between two strings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TokenMatcher
impl RefUnwindSafe for TokenMatcher
impl Send for TokenMatcher
impl Sync for TokenMatcher
impl Unpin for TokenMatcher
impl UnsafeUnpin for TokenMatcher
impl UnwindSafe for TokenMatcher
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> 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