pub struct TokenizerOptions<'a> {
pub cls_token: Option<&'a str>,
pub sep_token: Option<&'a str>,
}Expand description
Configuration for a Tokenizer.
Fields§
§cls_token: Option<&'a str>Token added at the start of the output. For BERT models, this is the
[CLS] token.
sep_token: Option<&'a str>Token added after each encoded sequence in the output. For BERT models,
this is the [SEP] token.
Trait Implementations§
Source§impl<'a> Clone for TokenizerOptions<'a>
impl<'a> Clone for TokenizerOptions<'a>
Source§fn clone(&self) -> TokenizerOptions<'a>
fn clone(&self) -> TokenizerOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Default for TokenizerOptions<'a>
impl<'a> Default for TokenizerOptions<'a>
Source§fn default() -> TokenizerOptions<'a>
fn default() -> TokenizerOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for TokenizerOptions<'a>
impl<'a> RefUnwindSafe for TokenizerOptions<'a>
impl<'a> Send for TokenizerOptions<'a>
impl<'a> Sync for TokenizerOptions<'a>
impl<'a> Unpin for TokenizerOptions<'a>
impl<'a> UnwindSafe for TokenizerOptions<'a>
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