- Notifications
You must be signed in to change notification settings - Fork44
pdf-translator translates English PDF files into Japanese, preserving the original layout.
License
discus0434/pdf-translator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository offers an WebUI and API endpoint that translates English PDF files into Japanese, preserving the original layout.
To be more readable, the translated PDF file displays the original PDF page in the left side and the translated text in the right side (see the image above).
To speed up the translation process,translation is performed until "References" section in the PDF file. After that, the rest of the page is copied as it is.
This repository contains some unsolved issues. Pull requests for improvements are always welcome.
- Clone this repository
git clone https://github.com/discus0434/pdf-translator.gitcd pdf-translator/docker
- Build the docker image via Makefile
make build
- Run the docker container via Makefile
make run
Access to GUI via browser.
http://localhost:8288
cd pdf-translator/docker&& make translate INPUT="path/to/input_pdf_or_dir"
You can throw a PDF file or a directory containing PDF files.
The translated PDF files will be saved in./outputs
directory.
- NVIDIA GPU(currently only support NVIDIA GPU)
- Docker
This repository does not allow commercial use.
This repository is licensed under CC BY-NC 4.0. SeeLICENSE for more information.
For PDF layout analysis, usingDiT.
For PDF to text conversion, usingPaddlePaddle model.
For text translation, usingFuguMT model fromHuggingFace.
FuguMT models are distributed under the CC BY-SA 4.0 license. Please also note that the use is clearly stated as "for research purposes only" and that "no responsibility is assumed for operation or output".
Font files are fromSource Han Serif.
- Make possible to highlight the translated text
- Support M1 Mac or CPU
Thanks to the following people who have contributed to this project:
- Akira Ishino: Improvements on text truncation algorithm
- hibit: Implementation of directory input to
translator.py
About
pdf-translator translates English PDF files into Japanese, preserving the original layout.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.