[−][src]Enum rust_bert::pipelines::common::TokenizerOption
Variants
Bert(BertTokenizer)Bert Tokenizer
Roberta(RobertaTokenizer)Roberta Tokenizer
Implementations
impl TokenizerOption[src]
pub fn from_file(
model_type: ModelType,
vocab_path: &str,
merges_path: Option<&str>,
lower_case: bool
) -> Self[src]
model_type: ModelType,
vocab_path: &str,
merges_path: Option<&str>,
lower_case: bool
) -> Self
Interface method to load a tokenizer from file
pub fn model_type(&self) -> ModelType[src]
Returns the model type
pub fn encode_list(
&self,
text_list: Vec<&str>,
max_len: usize,
truncation_strategy: &TruncationStrategy,
stride: usize
) -> Vec<TokenizedInput>[src]
&self,
text_list: Vec<&str>,
max_len: usize,
truncation_strategy: &TruncationStrategy,
stride: usize
) -> Vec<TokenizedInput>
Interface method
Auto Trait Implementations
impl !RefUnwindSafe for TokenizerOption
impl !Send for TokenizerOption
impl !Sync for TokenizerOption
impl Unpin for TokenizerOption
impl UnwindSafe for TokenizerOption
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,