pub struct TextSummarizer { /* private fields */ }
Expand description
A TextSummarizer
takes a given text and summarizes it using an Executor
.
The summarizer is built on top of a map_reduce::Chain
, which takes care of the summarization process.
Implementations§
Source§impl TextSummarizer
impl TextSummarizer
Sourcepub async fn summarize_text<E: Executor>(
&self,
exec: &E,
text: &str,
) -> Result<String, TextSummarizerError>
pub async fn summarize_text<E: Executor>( &self, exec: &E, text: &str, ) -> Result<String, TextSummarizerError>
Summarizes the given text using the provided Executor
.
Returns the summarized text, or an error if the summarization process fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextSummarizer
impl RefUnwindSafe for TextSummarizer
impl Send for TextSummarizer
impl Sync for TextSummarizer
impl Unpin for TextSummarizer
impl UnwindSafe for TextSummarizer
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