Northwind Electronics ENTERPRISE
#503

Document Intelligence

Upload an invoice, receipt, PO or quotation (PDF, text or image) and get its type, fields, line items and checks.

Technique: Keyword classifier + field extractors + arithmetic validation; PDFBox for PDF text
Read the code: src/main/java/com/study/advlab/docintel/DocumentAnalyzer.javasrc/main/java/com/study/advlab/docintel/SampleDocuments.java
Paste a document
...or upload a file
  • PDF - text read with Apache PDFBox. Download a sample PDF
  • Image - text read by our OCR engine (#498) first.
  • TXT - read as UTF-8.
1. Document type
RECEIPT
Sample: Receipt · text
INVOICE 0%
RECEIPT 98%
PURCHASE ORDER 0%
QUOTATION 0%
CONTRACT 0%
2. Extracted fields 7 found
FieldValueConfidenceLine
Document number R-2026-0418 90% 4
Document date 26/10/2026 90% 5
Vendor / from SIAM FRESH MARKET 60% 1
Subtotal 784.00 90% 10
VAT / tax 54.88 90% 11
Total 838.88 90% 12
VAT rate 7 % 95% 11
Line items
DescriptionQtyUnit priceAmount
Thai jasmine rice 5kg2 295.00 590.00
Coconut milk3 35.00 105.00
Mango sticky rice1 89.00 89.00
3. Validation 6 of 6 checks passed
  • Line: Thai jasmine rice 5kg
    2 x 295.00 = 590.00 (document says 590.00)
  • Line: Coconut milk
    3 x 35.00 = 105.00 (document says 105.00)
  • Line: Mango sticky rice
    1 x 89.00 = 89.00 (document says 89.00)
  • Items add up to the subtotal
    Items 784.00 vs subtotal 784.00
  • Subtotal + VAT = total
    784.00 + 54.88 = 838.88 (document says 838.88)
  • VAT is 7% of the subtotal
    Expected 54.88, document says 54.88
Source text highlighted lines were used
1SIAM FRESH MARKET
2Central World, Bangkok
3RECEIPT
4Receipt No: R-2026-0418
5Date: 26/10/2026 14:32
6Cashier: Mali
72 x Thai jasmine rice 5kg 590.00
83 x Coconut milk 105.00
91 x Mango sticky rice 89.00
10Subtotal 784.00
11VAT 7% 54.88
12Total 838.88
13Cash 1,000.00
14Change 161.12
15Thank you for shopping with us!
Recent documents
DocumentTypeConfidenceChecksWhen
Sample: ReceiptRECEIPT 98% 6/6 09 Nov 21:35
Sample: QuotationQUOTATION 100% 7/7 09 Nov 21:16
Sample: InvoiceINVOICE 100% 8/8 09 Nov 21:16
Sample: Contract (no numbers)CONTRACT 100% 0/0 09 Nov 20:56
Sample: ReceiptRECEIPT 98% 6/6 09 Nov 20:56
Sample: QuotationQUOTATION 100% 7/7 09 Nov 20:56
Sample: InvoiceINVOICE 100% 8/8 09 Nov 20:56
Sample: Purchase orderPURCHASE_ORDER 99% 6/6 09 Nov 20:56