pub struct Jieba { /* private fields */ }
Implementations§
Source§impl Jieba
impl Jieba
Sourcepub fn new(
dict_path: &str,
hmm_path: &str,
user_dict_path: &str,
idf_path: &str,
stop_words_path: &str,
) -> Self
pub fn new( dict_path: &str, hmm_path: &str, user_dict_path: &str, idf_path: &str, stop_words_path: &str, ) -> Self
Create a new instance
Sourcepub fn lookup_tag(&self, word: &str) -> String
pub fn lookup_tag(&self, word: &str) -> String
Look up an single word’s tag
Sourcepub fn add_user_word(&mut self, word: &str)
pub fn add_user_word(&mut self, word: &str)
Add user defined word
Sourcepub fn extract_with_weight(&self, text: &str, top_k: usize) -> Vec<WordWeight>
pub fn extract_with_weight(&self, text: &str, top_k: usize) -> Vec<WordWeight>
Trait Implementations§
impl Send for Jieba
impl Sync for Jieba
Auto Trait Implementations§
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