Latex PDF Translator
Project description
PDFMathTranslate
PDF scientific paper translation and bilingual comparison based on font rules and deep learning, preserving formula and figure layout.
Installation
pip install pdf2zh
Usage
Execute the translation command in the command line to generate the translated document example-zh.pdf
and the bilingual document example-dual.pdf
in the current directory.
Translate the entire document
pdf2zh example.pdf
Translate part of the document
pdf2zh example.pdf -p 1-3,5
Translate with the specified language
pdf2zh example.pdf -li en -lo ja
Use regex to specify formula fonts and characters that need to be preserved
Hint: Starting from \ufb00
is English style ligature.
pdf2zh BDA3.pdf -f "(CM[^RT].*|MS.*|XY.*|MT.*|BL.*|.*0700|.*0500|.*Italic)" -c "(\(|\||\)|\+|=|\d|[\u0080-\ufaff])"
Acknowledgement
Document merging: PyMuPDF
Document parsing: Pdfminer.six
Document extraction: MinerU
Multi-threaded translation: MathTranslate
Layout parsing: DocLayout-YOLO
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdf2zh-1.5.6.tar.gz
(142.1 kB
view details)
Built Distribution
pdf2zh-1.5.6-py3-none-any.whl
(150.3 kB
view details)
File details
Details for the file pdf2zh-1.5.6.tar.gz
.
File metadata
- Download URL: pdf2zh-1.5.6.tar.gz
- Upload date:
- Size: 142.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89b6137afd2a79181231655d23f00eff6f0e6342a60e8b3f34a2fc4cc5a80894 |
|
MD5 | 136d3046df633144ddd6104d7b54e7da |
|
BLAKE2b-256 | a42027244525d11fdfad9374bc7aa50ea4c97c697e16ff1be4fb361480121425 |
File details
Details for the file pdf2zh-1.5.6-py3-none-any.whl
.
File metadata
- Download URL: pdf2zh-1.5.6-py3-none-any.whl
- Upload date:
- Size: 150.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 551fc59618ee34a5720755ed83dd00a1aaeb676642490c77581dce21cbf199e8 |
|
MD5 | b43f6ae9dae8b0b4ac0eb4572a226405 |
|
BLAKE2b-256 | 4026f4a4b82a65536c79158b20992a0b7873e33d607d1deee8237e06852f3c80 |