
Most of my course notes are phone photos or scans of a whiteboard saved as PDFs, and before I trust OCR with a whole semester of them I wanted to know what it gets wrong. So I made a two-page test PDF that looks like scanned lecture notes: images only, no text layer, the course name as a running header, page numbers "- 2 -" and "- 3 -" at the bottom, one formula "e = y − ŷ" with a real minus sign, and a scatter plot with a caption. The content is made up, which is the point: I know exactly what every character should be.
I ran it through ImgIng's Extract PDF content with the OCR model left on Auto, which picks the Professional model on a desktop. I only ran the default and I'm not comparing models here. What follows is everything I had to fix, in the order I'll check it next time.
1. The formula lost a symbol completely
The source line is "2.2 Residual = observed − predicted, written e = y − ŷ." and it came out as "2.2 Residual = observed – predicted, written e = y – ." The ŷ didn't turn into a plain y or into some wrong letter. It's just gone, leaving a minus sign pointing at a full stop. Before blaming OCR I zoomed into the page image in case my font had no glyph for ŷ, and it renders fine. I haven't figured out why the model drops it instead of guessing something. If I hadn't written the formula myself, "y – ." would have been easy to read straight past.
2. Minus signs came back as en dashes
Both minus signs (U+2212) came back as en dashes (U+2013), the one in "observed − predicted" as well. They look nearly identical on screen, and that's the problem: searching my notes for − finds nothing, and if the text ends up in LaTeX or code it's the wrong character.
3. The header repeats, the page numbers are gone
"Statistical Learning · Lecture Notes" appears at the top of both pages with the spaces around the dot missing. That's faithful to the scan, but in one merged notes file it's clutter. Page numbers went the other way: neither "- 2 -" nor "- 3 -" is anywhere in the output, even though you can see "- 2 -" on the page image in the result pane. I want those back in notes, because they're how I find where something was in the original.
4. The plot is only a caption, and everything sits in a code block
The scatter plot has no text in it, so there's nothing to read, and the caption "Figure 2-1: scatter plot and fitted line" survives. Fine, but notes that say "see Figure 2-1" need the picture saved separately. Also, each page is one Image OCR block, and in the Markdown export that block is a plain-text code fence. Good for knowing what was machine-read, bad for notes, since headings and lists inside a code fence don't render. I copy the text out of the fence before editing.
What a simple check catches, and what it doesn't
I don't want to find these by eye across a whole semester of notes, so I wrote a short Python check that reads the exported text, splits it into pages at each "Page N" line, and looks for four things. First, any line that ends in an operator with nothing after it, maybe followed by a full stop, because that's the shape a dropped symbol leaves behind. Second, every non-ASCII character on every line, printed with its code point and Unicode name, so an en dash can't pass for a minus. Third, a page with no line that is just a number, optionally between dashes. Fourth, any line from page 1 that shows up on every page, as a guess at the running header.
On this file it caught the dangling minus in "written e = y – .", named the en dash as U+2013 EN DASH, and flagged both pages as having no page number. It also listed the middle dot U+00B7 in the header, which is harmless but at least tells me which dot I'm dealing with. The repeated-line check found the header, and it also flagged "Lecture 2 Linear Regression", which is a real title that happens to be on both pages. It can't tell a running header from a repeated heading, and I haven't worked out a rule that could without knowing where on the page each line sat, so I still read that list myself.
It's a short list for two pages. But the ŷ, the dashes and the missing page numbers are three I'd never have caught by skimming, because the text around them reads perfectly well. The tool I used is at https://imging.ai/
Top comments (0)