pub struct MapWordsString { /* private fields */ }
Expand description
Collects keywords from String by frequency, ignoring stopwords
Implementations§
Source§impl MapWordsString
impl MapWordsString
Sourcepub fn new(str: String, top_n: u8) -> MapWordsString
pub fn new(str: String, top_n: u8) -> MapWordsString
MapwordsString constructor
Sourcepub fn get_keywords(&mut self) -> Vec<(u16, String)>
pub fn get_keywords(&mut self) -> Vec<(u16, String)>
Returns a copy of sorted keywords
Sourcepub fn print_keywords(&self)
pub fn print_keywords(&self)
Prints top_n keywords
Auto Trait Implementations§
impl Freeze for MapWordsString
impl RefUnwindSafe for MapWordsString
impl Send for MapWordsString
impl Sync for MapWordsString
impl Unpin for MapWordsString
impl UnwindSafe for MapWordsString
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