How enoch3712/extractthinker works
Main Components
a) Core Processing Components:
• Document Loaders Hub
• Extractor Engine
• Classification System
• Splitter System
• Contract Management
• LLM Integration Layer
b) External Integrations:
• Multiple LLM Providers (OpenAI, Anthropic, Cohere, Azure OpenAI, Local/Ollama)
• Document Processing Services (AWS Textract, Azure Form Recognizer, Google Document AI)
• OCR Services (Tesseract)
Input Layer
• Document input handlers (PDF, Images, Spreadsheets, Text)
• File system interfaces
• Stream handlers
Document Processing Layer
• Document Loader Hub (showing all supported loaders)
• Caching system
• Pre-processing components
Core Processing Layer
• Classification Engine
• Extraction Engine
• Splitting System
• Contract Management
LLM Integration Layer
• LLM Router
• Provider-specific adapters
• Response handlers
Output Layer
• Contract-based structured data
• Batch processing results
• Classification results
Key Relationships to Highlight
• Synchronous vs. Asynchronous flows
• Data transformation paths
• Classification decision trees
• Contract validation flows
• Batch processing workflows
Specific Implementation Details
• The modular architecture allowing multiple document loaders
• The contract-based extraction system using Pydantic models
• The classification tree structure
• Splitting strategies (Lazy vs. Eager)
• Batch processing capabilities
• LLM provider abstraction
Component Details
Document Loader Hub:
┌─────────────────────┐
• Document Loader Hub│
• ┤
• PyPDF │
• Tesseract │
• AWS Textract │
• Azure Form │
• Google Doc AI │
• ┘
Extraction Pipeline:
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
• Document │ -> │ Classification│ -> │ Extraction │
• Input │ │ Engine │ │ Engine │
• ┘ └──────────────┘ └──────────────┘