pub struct Rake { /* private fields */ }
Expand description
Represents an instance of Rake type
Implementations§
source§impl Rake
impl Rake
sourcepub fn new(stop_words: StopWords) -> Self
pub fn new(stop_words: StopWords) -> Self
Create a new instance of Rake
.
stop_words
is an instance of StopWords
struct.
sourcepub fn run(&self, text: &str) -> Vec<KeywordScore>
pub fn run(&self, text: &str) -> Vec<KeywordScore>
Runs RAKE algorithm on text
and returns a vector of keywords.
The returned vector is sorted by score (from greater to less).
sourcepub fn run_fragments<'a>(
&self,
fragments: impl IntoIterator<Item = &'a str>
) -> Vec<KeywordScore>
pub fn run_fragments<'a>( &self, fragments: impl IntoIterator<Item = &'a str> ) -> Vec<KeywordScore>
Runs RAKE algorithm on chunks of text (such as sentences), and returns a vector of keywords. The returned vector is sorted by score (from greater to less).
Trait Implementations§
source§impl<'de> Deserialize<'de> for Rake
impl<'de> Deserialize<'de> for Rake
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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