Live data from Hacker News

Ask HN: What is the best method for turning a scanned book as a PDF into text?

news.ycombinator.com

71–80 of 122 posts

Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?

#71

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.

Are there papers on this effect? That quality of responses diminishes with very large inputs I mean. I observed the same.

Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?

#72
This is somewhat unrelated, but I am curious what hardware there is for small scale printing (like an independent press) or scanning (for automatically converting books to digitally archive them for personal use). Does anyone in HN have recommendations?

Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?

#73
This open source tool would probably work well for splitting into pages, sending to an LLM of your choice, and getting it back into a structured markdown file: https://github.com/getomni-ai/zerox

I 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?

#74
post #7

My 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.

Yes. It’s still just an LLM and that means it can alter the meaning of entire passages in ways that are difficult to detect. This technology absolutely should not be used for OCR in domains where correctness matters.

Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?

#75
post #52

Earlier 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

Which one is the smartest, and most knowledgeable? (Like least likely to make up facts)

Re: Ask HN: What is the best method for turning a scanned book as a PDF into text?

#77

Earlier 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.

I think these models all "cheat" to some extent with their long context lengths.

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?

#78

Earlier 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)?

Yes

(albeit I believe o3-mini isn't natively multimodal)

Post reply on HN