Struct tokenizers::models::wordlevel::WordLevelTrainerBuilder
source · pub struct WordLevelTrainerBuilder { /* private fields */ }
Expand description
Builder for WordLevelTrainer
.
Implementations§
source§impl WordLevelTrainerBuilder
impl WordLevelTrainerBuilder
sourcepub fn min_frequency(&mut self, value: u64) -> &mut Self
pub fn min_frequency(&mut self, value: u64) -> &mut Self
The minimum frequency a word must have to be part of the vocabulary
sourcepub fn vocab_size(&mut self, value: usize) -> &mut Self
pub fn vocab_size(&mut self, value: usize) -> &mut Self
The target vocabulary size
sourcepub fn show_progress(&mut self, value: bool) -> &mut Self
pub fn show_progress(&mut self, value: bool) -> &mut Self
Whether to show progress while training
sourcepub fn special_tokens(&mut self, value: Vec<AddedToken>) -> &mut Self
pub fn special_tokens(&mut self, value: Vec<AddedToken>) -> &mut Self
A list of special tokens that the model should know of
sourcepub fn build(&self) -> Result<WordLevelTrainer, WordLevelTrainerBuilderError>
pub fn build(&self) -> Result<WordLevelTrainer, WordLevelTrainerBuilderError>
Trait Implementations§
source§impl Clone for WordLevelTrainerBuilder
impl Clone for WordLevelTrainerBuilder
source§fn clone(&self) -> WordLevelTrainerBuilder
fn clone(&self) -> WordLevelTrainerBuilder
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for WordLevelTrainerBuilder
impl RefUnwindSafe for WordLevelTrainerBuilder
impl Send for WordLevelTrainerBuilder
impl Sync for WordLevelTrainerBuilder
impl Unpin for WordLevelTrainerBuilder
impl UnwindSafe for WordLevelTrainerBuilder
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