pub struct MapWordsFile { /* private fields */ }Expand description
Collects keywords from .txt files by frequency, ignoring stopwords
Implementations§
Source§impl MapWordsFile
impl MapWordsFile
Sourcepub fn new(file_path: String, top_n: u8) -> MapWordsFile
pub fn new(file_path: String, top_n: u8) -> MapWordsFile
MapwordsString constructor
pub fn read_file(&self) -> String
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 MapWordsFile
impl RefUnwindSafe for MapWordsFile
impl Send for MapWordsFile
impl Sync for MapWordsFile
impl Unpin for MapWordsFile
impl UnwindSafe for MapWordsFile
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