New Tool Radar

AI PDF

How to Check Time Values in OCR Output from a Scanned Document

Check the time values OCR reads from a scanned document before you build a schedule from them.

Schematic illustration of a time values check: run OCR, read the four times, and test that each one is a real time.

Times are short and dense: 09:30 can become 09:80, which is not a time at all, or 19:30 can lose its first digit and become 9:30, which is twelve hours wrong. The check is to test every time in the OCR text against the printed page. This guide checks four times on one schedule.

Prerequisites

A scanned schedule or timetable and an OCR tool. Note whether the document uses 24-hour or 12-hour times before starting.

Steps

1. Run OCR on the schedule

Run OCR on the schedule and save the text. Expected result: the four times become selectable text.

2. Read the four times from the OCR text

Read each time from the OCR text. Expected result: four times, each with hours and minutes.

3. Test each time is a real time

Check that the hours run 00 to 23 and the minutes 00 to 59. Expected result: all four times are valid times.

4. Compare each time with the printed page

Compare each OCR time with the printed schedule. Expected result: all four times match the printed page.

Practice check: fictional workshop schedule, four sessions

The table below is fictional practice material. It lists the four session times.

Session Time
Registration 09:00
Opening talk 09:30
Workshop 11:15
Closing 16:45

Expected result. all four OCR times are valid and match the printed schedule: 09:00, 09:30, 11:15 and 16:45.

Limits

  • A time that is valid and matches the page can still sit next to the wrong session, so check the pairing of time and session name too.
  • UNTESTED – no OCR tool or AI tool was run; all results above are expected results. The practice file is fictional.

Sources

See all