Implement receipt-specific OCR extraction for fuel receipts:
- Pattern matching modules for date, currency, and fuel data extraction
- Receipt-optimized image preprocessing for thermal receipts
- POST /extract/receipt endpoint with field extraction
- Confidence scoring per extracted field
- Cross-validation of fuel receipt data
- Unit tests for all pattern matchers
Extracted fields: merchantName, transactionDate, totalAmount,
fuelQuantity, pricePerUnit, fuelGrade
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Changes
New Files
ocr/app/patterns/- Pattern matching modulesdate_patterns.py- Multiple date format support (MM/DD/YYYY, Mon DD YYYY, etc.)currency_patterns.py- Total/amount extraction (TOTAL, SALE, AMOUNT DUE, etc.)fuel_patterns.py- Gallons, price per unit, fuel grade extractionocr/app/preprocessors/receipt_preprocessor.py- Thermal receipt optimizationsocr/app/extractors/receipt_extractor.py- Main receipt extraction logicocr/app/extractors/fuel_receipt.py- Fuel-specific validationAPI Changes
POST /extract/receiptendpointTest Plan
Closes #69
Generated with Claude Code