pub struct Prefix {}Expand description
Prefix similarity is the length of the longest common prefix for the given sequences.
It’s a very dumb metric but it can be surprisingly effective for comparing words in languages with an extensive use of suffixes.
Trait Implementations§
Source§impl Algorithm<usize> for Prefix
impl Algorithm<usize> for Prefix
Source§fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<usize>
fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<usize>
Calculate distance/similarity for iterators. Read more
Source§fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<R>
fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<R>
Calculate distance/similarity for vectors. Read more
Source§fn for_str(&self, s1: &str, s2: &str) -> Result<R>
fn for_str(&self, s1: &str, s2: &str) -> Result<R>
Calculate distance/similarity for strings. Read more
Auto Trait Implementations§
impl Freeze for Prefix
impl RefUnwindSafe for Prefix
impl Send for Prefix
impl Sync for Prefix
impl Unpin for Prefix
impl UnwindSafe for Prefix
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