Yes. Pay a translator.
Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu
If you find that OCR doesn't get you very far, maybe try a small vLM to parse PNGs of the pages. For example, Nanonets OCR will do this, although quite slow if you don't have a GPU. It will give you a Markdown version of the page, which you can then translate with another tool.
PaddleOCR might also be useful, since it focuses on Chinese, but it's more difficult to set up. To add to this, some other options are MinerU and MistralOCR (this is paid, but you can test it for free if you upload it in Mistral's library).
That PaddleOCR looks very interesting. It will even extract images and formulas and somewhat preserve formatting in the output! I will try this one, even if takes more than a day to process is with my low end cpu. Thank you for the suggestion!
Be wary that their docs are so and so. Nanonets OCR, Mistral OCR and MinerU will also extract formulas and images.
One other model I forgot to mention is Docling. This one is quite quick to set up in a docker container, and will have a web interface ready to go where you can upload documents. This sort of follows the PaddleOCR pipeline, but also allows you to use vLMs.
Good luck!
i did this with a chinese book, but have to check what i used.
The translation was entirely readable.
i think i used tesseract.
No, GImagereader!
that was it.
tesseract was also very straightforward, but gimage reader had a GUI, and all I had to do was import the file and then click export and it did the whole thing.
I used tesseract, but the output pdf didn't have visible text, and I found no way to change it. Maybe I don't know how to properly use it., or it's not intended to keep formatting.
try gImagereader.
it's a frontend to tesseract and is more workable via its GUI and option menus.
Load the file, execute the program.
That's all I had to do for a successful OCR.
This is more intended for real time usage, but might work for you:
https://github.com/Artikash/Textractor
https://github.com/Crivella/ocr_translate
I watch Macaw45 play full fledged Japanese retro RPG games using Textractor it'd probably be good for books too.
Thanks for the suggestions. That OCR_translate looks interesting. I will prioritize other recommended tools that seem to be more focused on books, but I bookmarked it for future needs.
You can literally just feed the images into chat gpt at this point.
I'm giving preference to open source tools, but that's a good thing to know, thanks
Every time I've done it, it's pretty bad. Ocr is much better.
This doesn't work after the pdf reaches a cert max size.
Could just break it up into chapters or something, pretty easy to split a pdf.
Which Google lens work? And take a picture of each page and feed it to the Google translate engine. It might be the easiest way.
I'm not sure if it would be viable for a long book, and I'm also avoiding google, but thanks for helping. I got some nice suggestions in this thread.
notebooklm (Google)
Well, I'm avoiding google, but I will keep it in mind as a last last resort, thanks