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
Metadata
Release files for pdf2zh 1.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pdf2zh-1.5.5.tar.gz | 142.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pdf2zh-1.5.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 292.7 kB
Release files / pdf2zh-1.5.5.tar.gz
| Download URL | pdf2zh-1.5.5.tar.gz |
|---|---|
| Size | 142.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
431c61316393cabb4ac1fa2d1c074a078e89562692ebc899a3d9e42a7fcb3348
|
|
BLAKE2b-256 checksum How to use checksums |
567279fc126e39ae8d0eefc4dcff2980827284f3005cccaaf82dafb41aa4bcc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / pdf2zh-1.5.5-py3-none-any.whl
| Download URL | pdf2zh-1.5.5-py3-none-any.whl |
|---|---|
| Size | 150.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af9db82341150788f4c1a319f5623579ff6d0422f083861e7c7b1112b310ee68
|
|
BLAKE2b-256 checksum How to use checksums |
6ef1c1104456649e4bdb304de4a9f8b348c74f93a65b01601b69a02b697134b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for pdf2zh 1.5.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.