[][src]Struct str_distance::modifiers::Winkler

pub struct Winkler<D: DistanceMetric> { /* fields omitted */ }

Winkler modifies a DistanceMetric's distance to decrease the distance between two strings, when their original distance is below some threshold. The boost is equal to min(l, maxlength) * p * dist where l denotes the length of their common prefix and dist denotes the original distance. The Winkler adjustment was originally defined for the Jaro similarity score but is here defined it for any distance.

Methods

impl<D: DistanceMetric> Winkler<D>[src]

pub fn new(inner: D) -> Self[src]

pub fn with_config(inner: D, config: WinklerConfig) -> Self[src]

Trait Implementations

impl<D: Clone + DistanceMetric> Clone for Winkler<D>[src]

impl<D: Debug + DistanceMetric> Debug for Winkler<D>[src]

impl Default for Winkler<Jaro>[src]

impl<D> DistanceMetric for Winkler<D> where
    D: DistanceMetric,
    <D as DistanceMetric>::Dist: Into<f64>, 
[src]

type Dist = f64

Represents the data type in which this distance is evaluated.

Auto Trait Implementations

impl<D> RefUnwindSafe for Winkler<D> where
    D: RefUnwindSafe

impl<D> Send for Winkler<D> where
    D: Send

impl<D> Sync for Winkler<D> where
    D: Sync

impl<D> Unpin for Winkler<D> where
    D: Unpin

impl<D> UnwindSafe for Winkler<D> where
    D: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.