# Accuracy report - data-entry / OCR sample pack

Date of run: 2026-11-25. Source: fictional scanned set (5 pages: 2 typed, 2 handwritten, 1 table). No client data.

## Result
| Stage | Characters | Words | Fields (table cells + digit tokens) |
|---|---|---|---|
| Raw OCR (RapidOCR text only) | 97.51% | 80.52% | not scored |
| Machine pass (deskew, spacing cleanup, table by ruling lines) | 99.35% | 94.61% | 110/119 = 92.44% |
| Delivered (after my review of 71 flags) | 99.90% | 99.48% | 118/119 = 99.16% |

Sample size: 3098 ground-truth characters, 575 words, 119 fields (74 table cells on page 5 + 45 amount/date/time/count tokens on pages 1-4).

## Per page
| Page | Kind | Machine chars | Delivered chars | Machine words | Delivered words |
|---|---|---|---|---|---|
| 1 | typed | 99.42% | 100.00% | 93.66% | 100.00% |
| 2 | typed | 100.00% | 100.00% | 100.00% | 100.00% |
| 3 | handwritten | 98.66% | 99.46% | 93.33% | 98.67% |
| 4 | handwritten | 99.41% | 100.00% | 96.88% | 100.00% |
| 5 | table | 98.87% | 99.86% | 88.81% | 98.51% |

## Field accuracy detail
- Table cells (page 5): machine 71/74 (95.95%), delivered 73/74 (98.65%).
- Amount/date/time/count tokens (pages 1-4): machine 39/45 (86.67%), delivered 45/45 (100.00%).

- Digits and dates: 45 of 45 amount/date/time/count tokens on pages 1-4 correct after review; 12 of 12 SKU codes and 12 of 12 line totals on page 5 correct after review.

Field misses after review:
- {'line': 11, 'col': 2, 'gt': 'Paint brush 50 mm', 'out': 'Paintbrush 50 mm', 'ok': False}

## Formatting kept (bold / underline), lines with matching word count only
- Bold words: 18/33 found; underlined words: 8/9 found; false marks: 2; lines scored 71, skipped 11.

## Smudged words (ground truth marks them unclear)
- 4 of 5 were flagged and delivered as 'unclear' with a comment; missed: trellis (page 2 line 5)

## Flag recall
- Lines where the machine pass differs from the ground truth: 13; lines that carried at least one flag: 13; lines with an error and no flag: 0.

## Error list (delivered text vs ground truth)
2 lines still differ after review.

| Page | Line | Ground truth | Delivered | Flagged line | Differences |
|---|---|---|---|---|---|
| 3 | 9 | - raise the bed by 15 cm | raise the bed by 15 cm | yes | delete:'- '->'' |
| 5 | 11 | QH-3008	Paint brush 50 mm	22	ea	3.95	86.90 | QH-3008	Paintbrush 50 mm	22	ea	3.95	86.90 | yes | delete:' '->'' |

## Flags and decisions
| Id | Page | Line | OCR word | Final | Decision | Note |
|---|---|---|---|---|---|---|
| F01 | 1 | 1 | HARBOURLINECOMMUNITYGARDEN | HARBOURLINE COMMUNITY GARDEN | corrected | title run together by OCR, spaces visible on the crop |
| F02 | 1 | 4 | (chair), | (chair), | confirmed | checked against the crop |
| F03 | 1 | 4 | J. | J. | confirmed | checked against the crop |
| F04 | 1 | 4 | Whitcombe, | Whitcombe, | confirmed | checked against the crop |
| F05 | 1 | 4 | Adeyemi | Adeyemi | confirmed | checked against the crop |
| F06 | 1 | 5 | Lindqvist | Lindqvist | confirmed | checked against the crop |
| F07 | 1 | 6 | room,7:00 | room, 7:00 | corrected | missing space after the comma |
| F08 | 1 | 6 | pm | pm | confirmed | checked against the crop |
| F09 | 1 | 6 | to | to | confirmed | checked against the crop |
| F10 | 1 | 6 | 8:35 | 8:35 | confirmed | checked against the crop |
| F11 | 1 | 6 | pm | pm | confirmed | checked against the crop |
| F12 | 1 | 11 | Treasurer'sreport | Treasurer's report | corrected | missing space |
| F13 | 1 | 13 | padlock: | padlock: | confirmed | checked against the crop |
| F14 | 1 | 14 | Closing | Closing | confirmed | checked against the crop |
| F15 | 1 | 14 | balance:$3,181.35. | balance: $3,181.35. | corrected | missing space after the colon |
| F16 | 1 | 14 | The | The | confirmed | checked against the crop |
| F17 | 1 | 14 | bank. | bank. | confirmed | checked against the crop |
| F18 | 1 | 18 | Until | Until | confirmed | checked against the crop |
| F19 | 2 | 12 | strimmer | strimmer | confirmed | checked against the crop |
| F20 | 2 | 15 | Whitcombe | Whitcombe | confirmed | checked against the crop |
| F21 | 2 | 20 | Adeyemi | Adeyemi | confirmed | checked against the crop |
| F22 | 2 | 20 | metres) | metres) | confirmed | checked against the crop |
| F23 | 3 | 4 | gooseberry | gooseberry | unclear | word smudged on the page; best reading kept |
| F24 | 3 | 5 | I | 1 | corrected | handwritten digit one read as capital I |
| F25 | 3 | 8 | -3 | - 3 | corrected | bullet dash separate from the number |
| F26 | 3 | 9 | 1S | 15 | corrected | handwritten 5 read as S |
| F27 | 3 | 11 | heavy | heavy | unclear | word smudged on the page; best reading kept |
| F28 | 4 | 1 | list | list | confirmed | checked against the crop |
| F29 | 4 | 2 | $2. | $2.50) | corrected | price split in two by OCR, joined |
| F30 | 4 | 2 | S0) |  | corrected | second half of the price joined into F29 |
| F31 | 4 | 4 | batch | batch | unclear | word smudged on the page; best reading kept |
| F32 | 4 | 4 | number | number | confirmed | checked against the crop |
| F33 | 4 | 7 | forget | forget | confirmed | checked against the crop |
| F34 | 4 | 8 | 7:15 | 7:15 | confirmed | checked against the crop |
| F35 | 4 | 9 | Priya | Priya | confirmed | checked against the crop |
| F36 | 4 | 9 | gazebo | gazebo | unclear | word smudged on the page; best reading kept |
| F37 | 5 | 1 | QUILLMOORHARDWARE | QUILLMOOR HARDWARE | corrected | title run together |
| F38 | 5 | 2 | Store: | Store: | confirmed | checked against the crop |
| F39 | 5 | 2 | Unit | Unit | confirmed | checked against the crop |
| F40 | 5 | 2 | 4, | 4, | confirmed | checked against the crop |
| F41 | 5 | 2 | QuillmoorTradePark; | Quillmoor Trade Park; | corrected | missing spaces |
| F42 | 5 | 2 | Countedby: | Counted by: | corrected | missing space |
| F43 | 5 | 2 | D. | D. | confirmed | checked against the crop |
| F44 | 5 | 2 | Marsh; | Marsh; | confirmed | checked against the crop |
| F45 | 5 | 2 | Date:06/03/2026 | Date: 06/03/2026 | corrected | missing space after the colon |
| F46 | 5 | 3 | SKU | SKU | confirmed | checked against the crop |
| F47 | 5 | 3 | Qty | Qty | confirmed | checked against the crop |
| F48 | 5 | 3 | Unit | Unit | confirmed | checked against the crop |
| F49 | 5 | 3 | price | price | confirmed | checked against the crop |
| F50 | 5 | 4 | QH-1021 | QH-1021 | confirmed | checked against the crop |
| F51 | 5 | 4 | mm | mm | confirmed | checked against the crop |
| F52 | 5 | 5 | QH-1034 | QH-1034 | confirmed | checked against the crop |
| F53 | 5 | 5 | Wall | Wall | confirmed | checked against the crop |
| F54 | 5 | 6 | QH-1102 | QH-1102 | confirmed | checked against the crop |
| F55 | 5 | 6 | mm | mm | confirmed | checked against the crop |
| F56 | 5 | 7 | QH-1150 | QH-1150 | confirmed | checked against the crop |
| F57 | 5 | 7 | SandpaperP120 | Sandpaper P120 | corrected | missing space |
| F58 | 5 | 8 | QH-2007 | QH-2007 | confirmed | checked against the crop |
| F59 | 5 | 9 | QH-2045 | QH-2045 | confirmed | checked against the crop |
| F60 | 5 | 10 | QH-2210 | QH-2210 | confirmed | checked against the crop |
| F61 | 5 | 10 | mm | mm | confirmed | checked against the crop |
| F62 | 5 | 11 | QH-3008 | QH-3008 | confirmed | checked against the crop |
| F63 | 5 | 11 | mm | mm | confirmed | checked against the crop |
| F64 | 5 | 12 | QH-3016 | QH-3016 | confirmed | checked against the crop |
| F65 | 5 | 12 | kit | kit | confirmed | checked against the crop |
| F66 | 5 | 13 | QH-3120 | QH-3120 | confirmed | checked against the crop |
| F67 | 5 | 14 | QH-4002 | QH-4002 | confirmed | checked against the crop |
| F68 | 5 | 14 | mm | mm | confirmed | checked against the crop |
| F69 | 5 | 15 | QH-4019 | QH-4019 | confirmed | checked against the crop |
| F70 | 5 | 15 | Galvanisedwire | Galvanised wire | corrected | missing space |
| F71 | 5 | 15 | mm | mm | confirmed | checked against the crop |

## Method
- Ground truth: hand-made text of each page (source/gt/page-N.txt, markup removed for scoring) that the page images were drawn from; it is never read by the OCR or review steps.
- Accuracy = 1 - edit distance / ground-truth length (Levenshtein, characters and words), pooled over the 5 pages. Fields = exact match of a table cell, or presence of an amount/date/time/count token on its line.
- Stages: raw = RapidOCR lines as returned; machine = deskew + spacing cleanup + table cells by ruling lines + flags; delivered = machine text with my decision applied to each flagged word.
- Numbers come from build/accuracy.py; tests/test_pack.py recomputes them independently.

## Time log
| Step | Started | Seconds | Note |
|---|---|---|---|
| 1 render fictional source (5 pages) | 2026-10-13 14:28:05 | 14.9 | script build/gen_source.py |
| 2 machine pass (OCR + layout + flags) | 2026-11-25 05:52:56 | 39.1 | RapidOCR ONNX, 71 flags |
| 5 review decisions applied + outputs (txt, docx, xlsx) | 2026-11-25 06:11:32 | 1.0 | python-docx 1.2.0, openpyxl 3.1.5 |
| 6 accuracy report | 2026-11-25 06:11:33 | 3.0 | build/accuracy.py |

## Limits
- Small fictional sample (5 pages); percentages describe this sample, not a promise for other scans.
- I did the review from crops of the page image and had also read the ground-truth text while fixing the machine pass, so the delivered figure is not a blind, independent review; a second independent review was not done.
- Page 3 line 9 lost its leading '- ' bullet in the machine pass and no flag marks it; page 2 'trellis' (smudged) had no smudge flag, so it was not delivered as unclear.
- Cached xlsx results were computed in Python; the docx and xlsx files have not yet been checked in Office or LibreOffice.
