pub trait Tokenizer {
    // Required methods
    fn new<P: Into<PathBuf>>(path: P) -> Result<Self, Error>
       where Self: Sized;
    fn pre_tokenize<S: AsRef<str>>(&self, input: &[S]) -> Vec<Vec<String>>;
    fn tokenize<S: AsRef<str>>(&self, input: &[S]) -> (Vec<Tensor>, Vec<Tensor>);
}

Required Methods§

source

fn new<P: Into<PathBuf>>(path: P) -> Result<Self, Error>where Self: Sized,

source

fn pre_tokenize<S: AsRef<str>>(&self, input: &[S]) -> Vec<Vec<String>>

source

fn tokenize<S: AsRef<str>>(&self, input: &[S]) -> (Vec<Tensor>, Vec<Tensor>)

Implementors§