pub struct JaroWinkler {
pub jaro: Jaro,
pub prefix_weight: f64,
pub max_prefix: usize,
}Expand description
Jaro-Winkler similarity is a variation of Jaro with a better rating for strings with a matching prefix.
The metric is always normalized on the interval from 0.0 to 1.0.
Fields§
§jaro: JaroThe Jaro instance to use to calculate the classic Jaro similarity.
prefix_weight: f64p is a scailing factor for how much Jaro score is adjusted
for the common prefix. The default is 0.1, must not be higher than
1/ℓ where ℓ is the max_prefix value (4 by default).
max_prefix: usizeℓ is the maximum length of the common prefix. The default is 4.
Trait Implementations§
Source§impl Algorithm<f64> for JaroWinkler
impl Algorithm<f64> for JaroWinkler
Source§fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<f64>
fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<f64>
Calculate distance/similarity for vectors. Read more
Source§fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<R>
fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<R>
Calculate distance/similarity for iterators. 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 JaroWinkler
impl RefUnwindSafe for JaroWinkler
impl Send for JaroWinkler
impl Sync for JaroWinkler
impl Unpin for JaroWinkler
impl UnwindSafe for JaroWinkler
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