Enum imdb_index::NameScorer[][src]

pub enum NameScorer {
    OkapiBM25,
    TFIDF,
    Jaccard,
    QueryRatio,
}

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 is a TF-IDF-like ranking function, which takes name length into account.

TFIDF is the traditional TF-IDF ranking function, which does not incorporate document length.

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 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]

Returns a list of strings representing the possible scorer values.

Return a string representation of this scorer.

The string returned can be parsed back into a NameScorer.

Trait Implementations

impl Clone for NameScorer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for NameScorer
[src]

impl Debug for NameScorer
[src]

Formats the value using the given formatter. Read more

impl Eq for NameScorer
[src]

impl Hash for NameScorer
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for NameScorer
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for NameScorer
[src]

Returns the "default value" for a type. Read more

impl Display for NameScorer
[src]

Formats the value using the given formatter. Read more

impl FromStr for NameScorer
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for NameScorer

impl Sync for NameScorer