Implement Extractous integration for text and metadata extraction from various file formats #142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a simple MVP integration of Extractous - a high-performance document extraction library built in Rust that leverages Apache Tika for text and metadata extraction from various file formats.
What's Changed
Backend Implementation
extractous>=0.2.2) to support document processing/api/v1/extractfor file content extractionFileExtractionResponsewith structured extraction resultsThe extraction endpoint accepts file uploads (up to 50MB) and returns:
{ "extracted_text": "Full document text content...", "metadata": { "Content-Type": ["application/pdf"], "X-TIKA:Parsed-By": ["org.apache.tika.parser.DefaultParser"], "Content-Length": ["1234"] }, "original_filename": "document.pdf", "content_type": "application/pdf", "file_size": 1234 }Frontend Implementation
Key Features
✨ Multi-format Support: PDF, DOC, DOCX, TXT, HTML, RTF, and many more via Apache Tika
⚡ High Performance: Rust-based core bypasses Python GIL for efficient processing
🔍 Rich Metadata: Extracts comprehensive document metadata including content type, encoding, and parser information
🎯 Simple Integration: Clean API design following existing Extralit patterns
🛡️ Error Handling: Graceful error handling with user-friendly feedback
Demo Screenshots
Clean interface for file upload and extraction
Complete extraction results showing text content and technical metadata
Usage Example
The extraction functionality integrates seamlessly into the existing file upload workflow:
Technical Details
Testing
This implementation provides a solid foundation for enhanced document processing capabilities in Extralit, enabling users to preview and validate document content before processing.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.