pub enum SummarizationOption {
Bart(BartGenerator),
T5(T5Generator),
LongT5(LongT5Generator),
ProphetNet(ProphetNetConditionalGenerator),
Pegasus(PegasusConditionalGenerator),
}
Expand description
§Abstraction that holds one particular summarization model, for any of the supported models
Variants§
Bart(BartGenerator)
Summarizer based on BART model
T5(T5Generator)
Summarizer based on T5 model
LongT5(LongT5Generator)
Summarizer based on LongT5 model
ProphetNet(ProphetNetConditionalGenerator)
Summarizer based on ProphetNet model
Pegasus(PegasusConditionalGenerator)
Summarizer based on Pegasus model
Implementations§
Source§impl SummarizationOption
impl SummarizationOption
pub fn new(config: SummarizationConfig) -> Result<Self, RustBertError>
pub fn new_with_tokenizer( config: SummarizationConfig, tokenizer: TokenizerOption, ) -> Result<Self, RustBertError>
Sourcepub fn model_type(&self) -> ModelType
pub fn model_type(&self) -> ModelType
Returns the ModelType
for this SummarizationOption
Sourcepub fn get_tokenizer(&self) -> &TokenizerOption
pub fn get_tokenizer(&self) -> &TokenizerOption
Interface method to access tokenizer
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 !Freeze for SummarizationOption
impl !RefUnwindSafe for SummarizationOption
impl Send for SummarizationOption
impl !Sync for SummarizationOption
impl Unpin for SummarizationOption
impl !UnwindSafe for SummarizationOption
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more