pub struct Rake { /* private fields */ }Implementations§
Source§impl Rake
impl Rake
Sourcepub fn new(params: RakeParams<'_>) -> Self
pub fn new(params: RakeParams<'_>) -> Self
Create a new Rake instance.
Sourcepub fn get_ranked_keyword(&self, n: usize) -> Vec<String>
pub fn get_ranked_keyword(&self, n: usize) -> Vec<String>
Gets the top n words with the highest score.
Sourcepub fn get_ranked_keyword_scores(&self, n: usize) -> Vec<(String, f32)>
pub fn get_ranked_keyword_scores(&self, n: usize) -> Vec<(String, f32)>
Gets the top n words with the highest score and their score.
Sourcepub fn get_ranked_phrases(&self, n: usize) -> Vec<String>
pub fn get_ranked_phrases(&self, n: usize) -> Vec<String>
Gets the top n phrases with the highest score.
Sourcepub fn get_ranked_phrases_scores(&self, n: usize) -> Vec<(String, f32)>
pub fn get_ranked_phrases_scores(&self, n: usize) -> Vec<(String, f32)>
Gets the top n phrases with the highest score and their scores.
Sourcepub fn get_keyword_score(&self, word: &str) -> f32
pub fn get_keyword_score(&self, word: &str) -> f32
Gets the score of a word.
Sourcepub fn get_phrase_score(&self, phrase: &str) -> f32
pub fn get_phrase_score(&self, phrase: &str) -> f32
Gets the score of a phrase.
Sourcepub fn get_word_scores_map(&self) -> &HashMap<String, f32>
pub fn get_word_scores_map(&self) -> &HashMap<String, f32>
Gets the base hashmap of words and their score.
Sourcepub fn get_phrase_scores_map(&self) -> &HashMap<String, f32>
pub fn get_phrase_scores_map(&self) -> &HashMap<String, f32>
Gets the base hashmap of phrases and their score.
Auto Trait Implementations§
impl Freeze for Rake
impl RefUnwindSafe for Rake
impl Send for Rake
impl Sync for Rake
impl Unpin for Rake
impl UnwindSafe for Rake
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