Live data from Hacker News

Nanonets-OCR-s – OCR model that transforms documents into structured markdown

huggingface.co

21–30 of 85 posts

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#22
I have been looking for something that would ingest a decade of old Word and PowerPoint documents and convert them into a standardized format where the individual elements could be repurposed for other formats. This seems like a critical building block for a system that would accomplish this task.

Now I need a catalog, archive, or historian function that archives and pulls the elements easily. Amazing work!

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#23
post #21

It’s a shame all these models target markdown and not something with more structure and a specification. There are different flavors of Markdown and limited support for footnotes, references, figures, etc.

Actually, we have trained the model to convert to markdown and do semantic tagging at the same time. Eg, the equations will be extracted as LaTeX equations, and images (plots, figures, and so on) will be described within the `` tags. Same with ``, ``, .

Also, we extract the tables as HTML tables instead of markdown for complex tables.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#24
post #21

It’s a shame all these models target markdown and not something with more structure and a specification. There are different flavors of Markdown and limited support for footnotes, references, figures, etc.

Actually, we have trained the model to convert to markdown and do semantic tagging at the same time. Eg, the equations will be extracted as LaTeX equations, and images (plots, figures, and so on) will be described within the ` ` tags. Same with ` `, ` `, . Also, we extract the tables as HTML tables instead of markdown for complex tables.

What happens to footnotes?

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#27
post #18

How does it compare to Datalab/Marker https://github.com/datalab-to/marker ? We evaluated many PDF->MD converters and this one performed the best, though it is not perfect.

I am just getting started with my own cross-comparison, would appreciate your list of considered candidates if you have it handy.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#28

Earlier quoted context omitted.

Document: * https://imgur.com/cAtM8Qn Result: * https://imgur.com/ElUlZys Perhaps it needed more than 1K tokens? But it took about an hour (number 28 in queue) to generate that and I didn't feel like trying again. How many tokens does it usually take to represent a page of text with 554 characters?

Hey, the reason for the long processing time is that lots of people are using it, and with probably larger documents. I tested your file locally seems to be working correctly. https://ibb.co/C36RRjYs Regarding the token limit, it depends on the text. We are using the qwen-2.5-vl tokenizer in case you are interested in reading about it. You can run it very easily in a Colab notebook. This should be faster than the dem…

> I tested your file locally seems to be working correctly

Apologies if there's some unspoken nuance in this exchange, but by "working correctly" did you just mean that it ran to completion? I don't even recognize some of the unicode characters that it emitted (or maybe you're using some kind of strange font, I guess?)

Don't misunderstand me, a ginormous number of floating point numbers attempting to read that handwriting is already doing better than I can, but I was just trying to understand if you thought that outcome is what was expected

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#29
post #21

It’s a shame all these models target markdown and not something with more structure and a specification. There are different flavors of Markdown and limited support for footnotes, references, figures, etc.

Actually, we have trained the model to convert to markdown and do semantic tagging at the same time. Eg, the equations will be extracted as LaTeX equations, and images (plots, figures, and so on) will be described within the ` ` tags. Same with ` `, ` `, . Also, we extract the tables as HTML tables instead of markdown for complex tables.

Have you considered XML. TEI, for example, is very robust and mature for marking up documents.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#30
post #28

Earlier quoted context omitted.

Hey, the reason for the long processing time is that lots of people are using it, and with probably larger documents. I tested your file locally seems to be working correctly. https://ibb.co/C36RRjYs Regarding the token limit, it depends on the text. We are using the qwen-2.5-vl tokenizer in case you are interested in reading about it. You can run it very easily in a Colab notebook. This should be faster than the dem…

> I tested your file locally seems to be working correctly Apologies if there's some unspoken nuance in this exchange, but by "working correctly" did you just mean that it ran to completion? I don't even recognize some of the unicode characters that it emitted (or maybe you're using some kind of strange font, I guess?) Don't misunderstand me, a ginormous number of floating point numbers attempting to read that handwr…

It actually did a decent. Perhaps the font is weird? For reference here is the 'ground truth' content, not in markdown:

Page# 8

Log: MA 6100 2.03.15

34 cement emitter resistors - 0.33R 5W 5% measure 0.29R 0.26R

35 replaced R436, R430 emitter resistors on R-chn P.O. brd w/new WW 5W .33R 5% w/ ceramic lead insulators

36 applied de-oxit d100 to speaker outs, card terminals, terminal blocks, output trans jacks

37 replace R-chn drivers and class A BJTs w/ BD139/146, & TIP31AG

38 placed boards back in

39 desoldered grnd lug from volume control

40 contact cleaner, Deoxit D5, faderlube on pots & switches teflon lube on rotor joint

41 cleaned ground lug & resoldered, reattached panel

Post reply on HN