pub struct TextExtractor { /* private fields */ }Expand description
Text extraction component
Implementations§
Source§impl TextExtractor
impl TextExtractor
Sourcepub fn new(config: TextExtractionConfig) -> RragResult<Self>
pub fn new(config: TextExtractionConfig) -> RragResult<Self>
Create new text extractor
Sourcepub async fn extract_from_pdf(
&self,
file_path: &Path,
) -> RragResult<ExtractedContent>
pub async fn extract_from_pdf( &self, file_path: &Path, ) -> RragResult<ExtractedContent>
Extract from PDF
Sourcepub async fn extract_from_word(
&self,
file_path: &Path,
) -> RragResult<ExtractedContent>
pub async fn extract_from_word( &self, file_path: &Path, ) -> RragResult<ExtractedContent>
Extract from Word document
Sourcepub async fn extract_from_ppt(
&self,
file_path: &Path,
) -> RragResult<ExtractedContent>
pub async fn extract_from_ppt( &self, file_path: &Path, ) -> RragResult<ExtractedContent>
Extract from PowerPoint
Sourcepub async fn extract_from_html(
&self,
file_path: &Path,
) -> RragResult<ExtractedContent>
pub async fn extract_from_html( &self, file_path: &Path, ) -> RragResult<ExtractedContent>
Extract from HTML
Sourcepub async fn extract_from_markdown(
&self,
file_path: &Path,
) -> RragResult<ExtractedContent>
pub async fn extract_from_markdown( &self, file_path: &Path, ) -> RragResult<ExtractedContent>
Extract from Markdown
Sourcepub async fn extract_from_text(
&self,
file_path: &Path,
) -> RragResult<ExtractedContent>
pub async fn extract_from_text( &self, file_path: &Path, ) -> RragResult<ExtractedContent>
Extract from plain text
Sourcepub async fn extract_auto_detect(
&self,
file_path: &Path,
) -> RragResult<ExtractedContent>
pub async fn extract_auto_detect( &self, file_path: &Path, ) -> RragResult<ExtractedContent>
Auto-detect and extract
Auto Trait Implementations§
impl Freeze for TextExtractor
impl RefUnwindSafe for TextExtractor
impl Send for TextExtractor
impl Sync for TextExtractor
impl Unpin for TextExtractor
impl UnwindSafe for TextExtractor
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