Struct rust_jieba::Jieba
[−]
[src]
pub struct Jieba { /* fields omitted */ }
Methods
impl Jieba
[src]
fn new(
dict_path: &str,
hmm_path: &str,
user_dict_path: &str,
idf_path: &str,
stop_words_path: &str
) -> Self
[src]
dict_path: &str,
hmm_path: &str,
user_dict_path: &str,
idf_path: &str,
stop_words_path: &str
) -> Self
Create a new instance
fn from_dir(data_dir: &str) -> Self
[src]
Create a new instance from dict data directory
fn cut(&self, text: &str, hmm: bool) -> Vec<String>
[src]
fn cut_all(&self, text: &str) -> Vec<String>
[src]
fn cut_for_search(&self, text: &str, hmm: bool) -> Vec<String>
[src]
fn cut_hmm(&self, text: &str) -> Vec<String>
[src]
fn cut_small(&self, text: &str, max_word_len: usize) -> Vec<String>
[src]
fn tag(&self, text: &str) -> Vec<Tag>
[src]
fn lookup_tag(&self, word: &str) -> String
[src]
Look up an single word's tag
fn add_user_word(&mut self, word: &str)
[src]
Add user defined word
fn tokenize(&self, text: &str, mode: TokenizeMode, hmm: bool) -> Vec<Token>
[src]
fn extract(&self, text: &str, top_k: usize) -> Vec<String>
[src]
fn extract_with_weight(&self, text: &str, top_k: usize) -> Vec<WordWeight>
[src]
Trait Implementations
impl Debug for Jieba
[src]
impl Clone for Jieba
[src]
fn clone(&self) -> Jieba
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more