pub struct KeywordProcessor { /* private fields */ }Implementations§
Source§impl KeywordProcessor
impl KeywordProcessor
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn add_keyword(&mut self, word: impl Into<String>)
pub fn add_keyword_with_clean_word( &mut self, word: impl Into<String>, clean_word: impl Into<String>, )
pub fn add_keywords_from_iter( &mut self, iter: impl IntoIterator<Item = impl Into<String>>, )
pub fn add_keywords_with_clean_word_from_iter( &mut self, iter: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, )
pub fn extract_keywords<'a>( &'a self, text: &'a str, ) -> impl Iterator<Item = &'a str> + 'a
pub fn extract_keywords_with_span<'a>( &'a self, text: &'a str, ) -> impl Iterator<Item = (&'a str, usize, usize)> + 'a
pub fn replace_keywords(&self, text: &str) -> String
Trait Implementations§
Source§impl Debug for KeywordProcessor
impl Debug for KeywordProcessor
Source§impl Default for KeywordProcessor
impl Default for KeywordProcessor
Source§fn default() -> KeywordProcessor
fn default() -> KeywordProcessor
Returns the “default value” for a type. Read more
Source§impl PartialEq for KeywordProcessor
impl PartialEq for KeywordProcessor
impl StructuralPartialEq for KeywordProcessor
Auto Trait Implementations§
impl Freeze for KeywordProcessor
impl RefUnwindSafe for KeywordProcessor
impl Send for KeywordProcessor
impl Sync for KeywordProcessor
impl Unpin for KeywordProcessor
impl UnwindSafe for KeywordProcessor
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