Trait Tokenizer

Source
pub trait Tokenizer {
    // Required method
    fn tokenize<'a>(&self, text: &'a str) -> Vec<&'a str>;
}
Expand description

A trait that all Tokenizer should implement.

Required Methods§

Source

fn tokenize<'a>(&self, text: &'a str) -> Vec<&'a str>

Tokenize given text and return a Vec<&str> where each &str inside a Vec is a slice from given text.

Implementors§

Source§

impl Tokenizer for tokenizer::en::Tokenizer

Source§

impl Tokenizer for tokenizer::th::Tokenizer