Tables as markdown instead of HTML
The previous version of LightOn OCR would output tables directly to markdown format, but this version is outputting tables to HTML format (more tokens generated, slower speed in out tests)
Is there a way to get LightOnOCR2 to output tables as markdown instead of HTML?
Thanks!
Hello and thank you for the question!
We have debated on this before working on the second version, but in the end we decided on HTML as output as some nested tables cannot be represented in markdown and thus we would lose some generality. Also converting from html to md after transcription is much more robust than the reverse operation, which also explains our choice.
It hasn't been planned for now to give this as option but I'd say the model would be quite suited for a finetuning in this direction if it's really a deal breaker for your usage :)
Thanks for the response - I just wanted to make sure I understood the landscape. I've already done post-processing to markdown, and I agree it was fairly trivial (and also allowed me to handle things more gracefully, such as tables spanning multiple pages, partial rows (typically subtotal and total type rows) where only the last N columns align with the rest of the table, etc.)
We have tried every OCR model we can get our hands on for our extraction pipeline- From DeepseekOCR, Nanonets, Chandra, OLMOcr2, various VL models, etc - LightOnOCR (even the 1st version) has been outperforming everything else by a large margin for our specific workflow. You guys are doing some great work in this field.
Thank you for the kind words, it really means a lot! And don't hesitate to share feedback for future versions if you notice issues.
why not use otsl (optimised table-structure language) to output tables . it need less tokens then html, and can convert to html.
otsl sounds like a good thing to explore, and we weren't aware of it, thank you! I'd say a finetune on this output format could work pretty well, we'd have to see as the style is probably quite outside of the typical teacher model's output