Skip to main content

ScoreAgainstDictionary

Trait ScoreAgainstDictionary 

Source
pub trait ScoreAgainstDictionary {
    // Required method
    fn score_with_words(&self, words_list: Vec<String>) -> f32;
}

Required Methods§

Source

fn score_with_words(&self, words_list: Vec<String>) -> f32

Calculates a relative value “score” for an item which relates to how likely it is the item represents text.

The provided words vector is used to increase the score of the item if it contained any of the words in the vector.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ScoreAgainstDictionary for String

Source§

fn score_with_words(&self, words_list: Vec<String>) -> f32

Implementors§