Struct wordcut_engine::Wordcut
source · pub struct Wordcut { /* private fields */ }
Implementations§
source§impl Wordcut
impl Wordcut
pub fn new(dict: Dict) -> Wordcut
pub fn new_with_cluster_re( dict: Dict, cluster_re: DenseDFA<Vec<usize>, usize> ) -> Wordcut
pub fn new_with_cluster_re_and_split_re( dict: Dict, cluster_re: DenseDFA<Vec<usize>, usize>, split_re: Regex ) -> Wordcut
pub fn build_path(&self, text: &str, text_chars: &[char]) -> Vec<Edge>
pub fn segment(&self, text: &str) -> Vec<TextRange>
pub fn segment_into_byte_ranges(&self, text: &str) -> Vec<TextRange>
pub fn segment_into_strings(&self, text: &str) -> Vec<String>
pub fn put_delimiters(&self, text: &str, delim: &str) -> String
pub fn build_dag(&self, text: &str) -> Dag
Auto Trait Implementations§
impl Freeze for Wordcut
impl RefUnwindSafe for Wordcut
impl Send for Wordcut
impl Sync for Wordcut
impl Unpin for Wordcut
impl UnwindSafe for Wordcut
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