[−][src]Enum imdb_index::NameScorer
The type of scorer that the name index should use.
The default is OkapiBM25. If you aren't sure which scorer to use, then stick with the default.
Variants
OkapiBM25
OkapiBM25 is a TF-IDF-like ranking function, which takes name length into account.
TFIDF
TFIDF is the traditional TF-IDF ranking function, which does not incorporate document length.
Jaccard
Jaccard is a ranking function determined by computing the similarity of ngrams between the query and a name in the index. The similarity is computed by dividing the number of ngrams in common by the total number of distinct ngrams in both the query and the name combined.
QueryRatio
QueryRatio is a ranking function that represents the ratio of query terms that matched a name. It is computed by dividing the number of ngrams in common by the total number of ngrams in the query only.
Methods
impl NameScorer
[src]
pub fn possible_names() -> &'static [&'static str]
[src]
Returns a list of strings representing the possible scorer values.
pub fn as_str(&self) -> &'static str
[src]
Return a string representation of this scorer.
The string returned can be parsed back into a NameScorer
.
Trait Implementations
impl PartialEq<NameScorer> for NameScorer
[src]
fn eq(&self, other: &NameScorer) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Copy for NameScorer
[src]
impl Eq for NameScorer
[src]
impl Default for NameScorer
[src]
fn default() -> NameScorer
[src]
impl Clone for NameScorer
[src]
fn clone(&self) -> NameScorer
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for NameScorer
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for NameScorer
[src]
impl Display for NameScorer
[src]
impl FromStr for NameScorer
[src]
Auto Trait Implementations
impl Send for NameScorer
impl Unpin for NameScorer
impl Sync for NameScorer
impl UnwindSafe for NameScorer
impl RefUnwindSafe for NameScorer
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,