17
$\begingroup$

I often end up with PDFs of old math papers and books that are not searchable and cannot be highlighted (basically, they display like images). One way to make them searchable is to apply optical character recognition (OCR). There are several free OCR engines online, but they often limit the size of a file you can upload (in practice, number of pages must be less than 30). Alternatively, you can buy Adobe Pro, but that's a lot more than you need if you only need to OCR. Other programs tend to output text as Word files, and tend to ruin mathematical equations. My question is:

Does anyone know of any OCR programs that work well for mathematical documents?

I have a PC, a Mac, and a Linux machine (this is what happens when you teach CS) so platform doesn't matter.

I feel like this question would be important to math researchers, but questions in the past on technology have met mixed support. Since my main goal is to get a good OCR program (even if it's not free) that works for math papers, I figured I'd ask here. If people think it's appropriate for MO, I'm happy to migrate.

$\endgroup$
8
  • 4
    $\begingroup$ Just for context: In the early days of MathOverflow, there were some non-mathematical Community-Wiki questions about tools used by mathematicians (e.g., tablets, software, and chalk). $\endgroup$
    – S. Carnahan Mod
    Sep 14, 2016 at 18:58
  • $\begingroup$ Some time ago there was a question on TeX.SE about getting TeX-source from the formulas. But you seem to ask about something else - you want to leave formulas and everything else intact and just add OCR layer to the text. To me this seems as a reasonable question for softwarerecs.SE. $\endgroup$ Sep 14, 2016 at 22:08
  • $\begingroup$ @martinsleziak Well, except that most (all?) existing OCR programs are thrown off by math equations and often make them unreadable. So the question really needs input from mathematicians, who perhaps don't spend that much time on the software se you link to. $\endgroup$ Sep 14, 2016 at 22:30
  • $\begingroup$ BTW there is a kind of precedent. The question OCR for handwritten mathematics has been asked on MO and well-received. On the other hand, since your question is now in the community bulletin, it might get more views here on meta than on the main site. $\endgroup$ Sep 14, 2016 at 22:36
  • 3
    $\begingroup$ To me it seems that this question is close to what you are asking: Free OCR software that makes a PDF searchable (with searchable text at the right place). And also there is this book scanning tutorial which can be found on several various sites, however here you work from tiff files to get the final djvu with OCR layer. $\endgroup$ Sep 14, 2016 at 22:47
  • $\begingroup$ Thanks. I will check out the ideas in that thread and report back if anything works. $\endgroup$ Sep 14, 2016 at 23:08
  • 2
    $\begingroup$ Ok, so I downloaded Homebrew for my Mac (which already, I love, for giving me back some of the control Apple always denies me), then tesseract, then ocrmypdf, and it works like a charm. The files are PDFs with all the same text and equations in all the same places, but now the text is searchable and highlightable. You can even highlight whole equations, but not individual sub/super scripts. Thanks for pointing me to that free OCR thread! $\endgroup$ Sep 15, 2016 at 0:23
  • 2
    $\begingroup$ In fact, it seems that the only answers on the question mathoverflow.net/questions/95558/… linked to in @MartinSleziak's comment are for OCR of printed mathematics, making them in fact technically off-topic answers to that thread but on-topic answers to your question. $\endgroup$ Sep 15, 2016 at 17:44

1 Answer 1

9
$\begingroup$

So that this question doesn't linger around, I want to post my comment from above as an answer. Following Martin Sleziak's link to Free OCR software that makes a PDF searchable (with searchable text at the right place), I downloaded Homebrew for my Mac, then tesseract, then ocrmypdf, and it works like a charm. The files are PDFs with all the same text and equations in all the same places, but now the text is searchable and highlightable. You can even highlight whole equations, but not individual sub/super scripts. The file size increased, but by less than a factor of two (the ratio was often much higher for online PDF OCR tools, and even for Acrobat Pro when I used it in grad school). Thanks all for the helpful comments.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .