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
Multi-threaded translation: MathTranslate
Layout parsing: LayoutParser
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.3.6.tar.gz
(130.3 kB
view details)
Built Distribution
pdf2zh-1.3.6-py3-none-any.whl
(138.8 kB
view details)
File details
Details for the file pdf2zh-1.3.6.tar.gz
.
File metadata
- Download URL: pdf2zh-1.3.6.tar.gz
- Upload date:
- Size: 130.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 279c004e692f4618a6ee3ef53f2d2722e26f8a7531b75d8942584441d69c7c2b |
|
MD5 | 4a8fe31ab42524b2119db2148342623d |
|
BLAKE2b-256 | a11657dffd13caa56aa378670020d7f6992387f272c6b75a5aa9fec251e303fb |
File details
Details for the file pdf2zh-1.3.6-py3-none-any.whl
.
File metadata
- Download URL: pdf2zh-1.3.6-py3-none-any.whl
- Upload date:
- Size: 138.8 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 | 3f8db835db45f74b8174af69918deb75bf09200acfbc2312b63ffb9dd1c3cfd5 |
|
MD5 | 97bd78b00f11793b6261084d5559caa9 |
|
BLAKE2b-256 | 428392f4db87d171817783059ac0ef7b57a11634f7394fe29d29371f9a5b0595 |