Struct tokenizers::models::unigram::UnigramTrainerBuilder
source · pub struct UnigramTrainerBuilder { /* private fields */ }
Expand description
Builder for UnigramTrainer
.
Implementations§
source§impl UnigramTrainerBuilder
impl UnigramTrainerBuilder
pub fn show_progress(&mut self, value: bool) -> &mut Self
pub fn vocab_size(&mut self, value: u32) -> &mut Self
pub fn n_sub_iterations(&mut self, value: u32) -> &mut Self
pub fn shrinking_factor(&mut self, value: f64) -> &mut Self
pub fn special_tokens(&mut self, value: Vec<AddedToken>) -> &mut Self
pub fn initial_alphabet(&mut self, value: HashSet<char>) -> &mut Self
pub fn unk_token(&mut self, value: Option<String>) -> &mut Self
pub fn max_piece_length(&mut self, value: usize) -> &mut Self
pub fn seed_size(&mut self, value: usize) -> &mut Self
pub fn words(&mut self, value: HashMap<String, u32>) -> &mut Self
sourcepub fn build(&self) -> Result<UnigramTrainer, UnigramTrainerBuilderError>
pub fn build(&self) -> Result<UnigramTrainer, UnigramTrainerBuilderError>
Trait Implementations§
source§impl Clone for UnigramTrainerBuilder
impl Clone for UnigramTrainerBuilder
source§fn clone(&self) -> UnigramTrainerBuilder
fn clone(&self) -> UnigramTrainerBuilder
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 UnigramTrainerBuilder
impl RefUnwindSafe for UnigramTrainerBuilder
impl Send for UnigramTrainerBuilder
impl Sync for UnigramTrainerBuilder
impl Unpin for UnigramTrainerBuilder
impl UnwindSafe for UnigramTrainerBuilder
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