Automated extraction from unstructured documents using Claude + AWS Textract. Outputs structured JSON with confidence scores.
This project combines AWS Textract's OCR/layout extraction with Claude's reasoning to turn unstructured documents (PDFs, scanned images, forms) into clean, structured JSON — including per-field confidence scores.
- Document ingestion (PDF, PNG, JPG)
- Text and layout extraction via AWS Textract
- Field-level structuring and validation via Claude
- JSON output with confidence scores per extracted field
- Configurable extraction schemas per document type
Document → AWS Textract (OCR/layout) → Claude (structuring + validation) → JSON output
- Python 3.10+
- AWS account with Textract access
- Anthropic API key
git clone https://github.com/xdt-ai/document-intelligence.git
cd document-intelligence
pip install -r requirements.txt
cp .env.example .env # add your AWS and Anthropic credentialspython src/main.py --input examples/sample_invoice.pdf --schema invoicedocument-intelligence/
├── src/ # Core extraction and processing logic
├── tests/ # Unit and integration tests
├── examples/ # Sample documents and expected outputs
├── docs/ # Additional documentation
├── requirements.txt
└── README.md
MIT