Enum rust_bert::pipelines::translation::TranslationOption
source · pub enum TranslationOption {
Marian(MarianGenerator),
T5(T5Generator),
MBart(MBartGenerator),
M2M100(M2M100Generator),
NLLB(NLLBGenerator),
}Expand description
Variants§
Marian(MarianGenerator)
Translator based on Marian model
T5(T5Generator)
Translator based on T5 model
MBart(MBartGenerator)
Translator based on MBart50 model
M2M100(M2M100Generator)
Translator based on M2M100 model
NLLB(NLLBGenerator)
Translator based on NLLB model
Implementations§
source§impl TranslationOption
impl TranslationOption
pub fn new(config: TranslationConfig) -> Result<Self, RustBertError>
pub fn new_with_tokenizer( config: TranslationConfig, tokenizer: TokenizerOption ) -> Result<Self, RustBertError>
sourcepub fn model_type(&self) -> ModelType
pub fn model_type(&self) -> ModelType
Returns the ModelType for this TranslationOption
sourcepub fn get_tokenizer(&self) -> &TokenizerOption
pub fn get_tokenizer(&self) -> &TokenizerOption
Returns the Tokenizer for this TranslationOption
sourcepub fn get_tokenizer_mut(&mut self) -> &mut TokenizerOption
pub fn get_tokenizer_mut(&mut self) -> &mut TokenizerOption
Interface method to access tokenizer
Auto Trait Implementations§
impl !RefUnwindSafe for TranslationOption
impl Send for TranslationOption
impl !Sync for TranslationOption
impl Unpin for TranslationOption
impl !UnwindSafe for TranslationOption
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