I had very good experience with `gemini-2.0-flash-exp`: https://github.com/maurycy/gemini-json-ocr
It's hard to know what to make of this because while you've included the output JSON you haven't included the input PDF so I have no idea how to interpret what it's actually doing.
Ask HN: What is the best method for turning a scanned book as a PDF into text?
51–60 of 122 posts
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#52I did this very recently for a 19th century book in German with occasionally some Greek. The method that produces the highest level of accuracy I've found is to use ImageMagick to extract each page as a image, then send each image file to Claude Sonnet (encoded as base64) with a simple user prompt like "Transcribe the complete text from this image verbatim with no additional commentary or explanations". The whole thi…
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#53I did this very recently for a 19th century book in German with occasionally some Greek. The method that produces the highest level of accuracy I've found is to use ImageMagick to extract each page as a image, then send each image file to Claude Sonnet (encoded as base64) with a simple user prompt like "Transcribe the complete text from this image verbatim with no additional commentary or explanations". The whole thi…
I recently did some OCRing with OpenAI. I found o3-mini-hi to be imagining and changing text, whereas the older (?) o4 was more accurate. It’s a bit worrying that some of the models screw around with the text.
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#54Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#55Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#56Google Cloud Document AI is amazing, I love it https://cloud.google.com/document-ai?hl=en It can correctly read many other languages than English if that is something you need. Previously I tried others and there were many errors in conversion. This does it well.
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#57Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#58Earlier quoted context omitted.
I recently did some OCRing with OpenAI. I found o3-mini-hi to be imagining and changing text, whereas the older (?) o4 was more accurate. It’s a bit worrying that some of the models screw around with the text.
There’s GPT4, then GPT4o (o for Omni, as in multi modal) and then GPT o1 (chain of thought / internal reasoning) then o3 (because o2 is a stadium in London that I guess is very litigious about its trademark?), o3-mini is the latest but yes optimized to be faster and cheaper