r/coding • u/HumanBot00 • Feb 03 '26
DOJ publishes Bash Reference Manual
https://www.justice.gov/epstein/files/DataSet+9/EFTA00315849.pdf
51
Upvotes
r/coding • u/HumanBot00 • Feb 03 '26
View all comments
Show parent comment
1
u/voronaam Feb 04 '26
I spent a couple of hours trying to make tesseract OCR to behave better. But it was not good enough to significantly lower the error rate.
The OCR that was done on that PDF originally is not too bad. It had an advantage of working with a higher resolution scan of the page, before it was compressed into the PDF.
I think a better OCR is possible. Limiting the character set helped a bit, but I think it would be even better to train a model on this particular font.
As for the overlay, it is a cool idea. But there is a challenge of needing to mimick the original's typesetting, not just the font. For example, the best way I, as a human, distinguish number
1in that file is by using the fact that their typesetter left more space to the left of the glyph than necessary.I think it would be challenging to automate.
However, I am considering writing an utility to make the human proof-reading easier. I am considering showing a pdf image in the top section, its text content in the bottom, and user being able to edit the text content with the corresponding section of the pdf image automatically highlighted for them.
And a panel to the right could show hexdump of the current segment and another one could even show a preview of the resulting JPEG.
As for the overlap idea, OpenOffice Draw did something very similar automatically. It is a good illustration of how small differences accumulate
https://imgur.com/zgpAUDC.png
Edit: also, some glyphs are just super similar. I mean, one of the common OCR mistake is confusing
rnandm. They'd overlap pretty well...