pub struct Tokenizer { /* private fields */ }Expand description
Tokenizer for processing input text
Implementations§
Source§impl Tokenizer
impl Tokenizer
Sourcepub fn tokenize_text(&self, text: &str) -> Vec<Token>
pub fn tokenize_text(&self, text: &str) -> Vec<Token>
Tokenize input text into words and other tokens
Sourcepub fn tokenize_word(&self, word: &str) -> Vec<PhoneticUnit>
pub fn tokenize_word(&self, word: &str) -> Vec<PhoneticUnit>
Tokenize a word into phonetic units for Bengali transliteration
Sourcepub fn tokenize_word_into(&self, word: &str, units: &mut Vec<PhoneticUnit>)
pub fn tokenize_word_into(&self, word: &str, units: &mut Vec<PhoneticUnit>)
Tokenize a word into a caller-owned phonetic-unit buffer.
The buffer is cleared before use, but its existing allocation is reused. This is the preferred path for high-frequency callers such as editors or typing frontends that repeatedly analyze one changing word.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tokenizer
impl RefUnwindSafe for Tokenizer
impl Send for Tokenizer
impl Sync for Tokenizer
impl Unpin for Tokenizer
impl UnsafeUnpin for Tokenizer
impl UnwindSafe for Tokenizer
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