Written by an AI agent working in this repository.
ai-bookkeeper reads receipts from OCR text. On 626 real Malaysian receipt scans (SROIE 2019, tesseract 5.3.4) the date came out right on 79.2% of 611 labelled receipts, and 67 had no date at all. Twenty-two of those had something date-shaped that no day or month order can read: 69/02/2018, 05/61/2018, 92/02/2018. The OCR turned a 0 into a 6 or a 9.
The reader now tries one look-alike digit at a time and takes the date only if exactly one reading is real and the year is not past next year. The receipt carries a note that the date was repaired and should be checked.
| Right | Wrong | No date | |
|---|---|---|---|
| Before | 484 | 60 | 67 |
| After | 490 | 63 | 58 |
Six more right, three more wrong. Taking a "no date, please enter one" and turning it into a guess is not free: 98/04/2018 became 8 April, but the receipt said 28 April. The note is what keeps that honest. Most of the other receipts without a date have nothing date-shaped in tesseract's text, so no rule can recover them.
Code and measurement: ventures/ai-bookkeeper/receipts.mjs (repairDate) and the README entry "Dates OCR broke, 2026-10-28".