Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Commercially available OCR is amazingly bad. The errors it makes are crazy. For example, if the top of a 'd' is missing it might read it as an 'a', while a human can see that it's identical to all the other 'd's on the page except that a bit is missing, while it looks nothing at all like an 'a' in any of the fonts used in that book. Or the OCR sees a random blotch and guesses it might be a comma, although it's in completely the wrong place and has the wrong size to be part of the text.

I think perhaps the developers took a wrong turn when they started trying to improve OCR with language models rather than font models. Humans can accurately transcribe a printed text without knowing the language. They do that with a mental model of font metrics and so on. In fact, a human transcribes more accurately (though more slowly) when they don't know the language because they don't erroneously "autocorrect".

I wonder if Google has in-house OCR that works much better than commercially available OCR. Google has OCR-ed at least 25 million books. You can't download the complete texts, but you can see snippets. Perhaps someone would like to publish a paper assessing the quality of Google's OCR and comparing it with commercial software. (Probably someone has done that already; I'm just bad at finding papers.)



Have you evaluated the latest version of Tesseract (developed by Google)? They added an LSTM-based OCR engine starting with version 4 and the improvements over version 3.x are startling.


Also, ocrmypdf [0] is a great Tesseract-based tool which makes it easy to add ocr layers to raster pdfs. Plus, it takes care of optimizing the resulting file (compression, etc). I used it on several old academic papers and have been pleased with the results.

[0]: https://github.com/jbarlow83/OCRmyPDF


FWIW, Tesseract does pretty well on the second image (though I don't know how well it would do on the uncropped version):

  THE NORTH STAR.

  ee ee

  ROCHESTER, DECEMBER 3, 1817.

  — — ——--

  ‘THE COLORED CONVENTION,

  We give Mr. Nell’s report of the doings of
  this Convention, as the best we have scen. |
  The crowded state of our columns prevent:
  our publishing in the present number, any of
  the able and interesting reports which en-.
  gaged the attention of that body. We shall
  attead to them in our next.

  For the confidence reposed in me,


Running that Tesseract output through OverProof corrects the scen/prevent/attead: https://overproof.projectcomputing.com/showRequest/159891472...


Some years ago I ran across someone's research based on some Google book scanning technology reporting on the fantastic number of instances on f()ck in books prior to the 20th century. This is simply not true. The problem was the scanning technology which interpreted the old elongated S type face in old books as F.


For about a year now i am working on an iOS Application that requires good OCR. With the release of iOS 13 Apple has added an API for this in their Vision Framework and i have to say i am shocked how good it works. It works completely on device and, according to Apple, uses Machine Learning.

You can feed it an image that contains text, with the only constrained being that the text should not be rotated. Depending how much text there is it can digitize a 12MP image in about .5 to 2 seconds on an iPhone Xs.

I compared it to ABBYYs OCR SDK and i have to say Apple's OCR outperforms it nearly every time both in speed as well as in recognition quality. I am still fascinated by it and would really like to know how this is working under the hood.


Your remark about font models makes me wonder whether it might be feasible to extract recurring shapes in a scan to identify the glyphs used and reverse-engineer a font from that.


Adobe has a tool for that, and Nate Craun (who has an aging but still amazing tutorial on scanning books from Linux) had made one too.

https://www.natecraun.net/projects/smoothscan.html




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: