Earlier quoted context omitted.
Is it really necessary to split it into pages? Not so bad if you automate it I suppose, but aren't there models that will accept a large PDF directly (I know Sonnet has a 32MB limit)?
They are limited on how much they can output and there is generally an inverse relationship between the amount of tokens you send vs quality after the first 20-30 thousand tokens.
Ask HN: What is the best method for turning a scanned book as a PDF into text?
71–80 of 122 posts
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#72Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#73I haven’t used it yet, since my use case ended up not needing more than just sending to an LLM directly.
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#74My understanding is that Gemini OCR is now considered state of the art and a material step forward in OCR accuracy
Is this from the article that was on the front page a few days ago? If so, it's not true. The title was intentionally misleading, they said they're the best, but if you read the article it was that they're actually the best in some subproblem, not the actual thing.
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#75Earlier 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
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#76Just a thought.
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#77Earlier quoted context omitted.
They are limited on how much they can output and there is generally an inverse relationship between the amount of tokens you send vs quality after the first 20-30 thousand tokens.
Are there papers on this effect? That quality of responses diminishes with very large inputs I mean. I observed the same.
The original transformer had dense attention where every token attends to every other token, and the computational cost therefore grew quadratically with increased context length. There are other attention patterns than can be used though, such as only attending to recent tokens (sliding window attention), or only having a few global tokens that attend to all the others, or even attending to random tokens, or using combinations of these (e.g. Google's "Big Bird" attention from their Elmo/Bert muppet era).
I don't know what types of attention the SOTA closed source models are using, and they may well be using different techniques, but it'd not be surprising if there was "less attention" to tokens far back in the context. It's not obvious why this would affect a task like doing page-by-page OCR on a long PDF though, since there it's only the most recent page that needs attending to.
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#78Earlier quoted context omitted.
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
What is the o3 model good for? Is it just an evolution of o1 (chain of thought / internal reasoning)?
(albeit I believe o3-mini isn't natively multimodal)
Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#79Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?
#80Works quite well