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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdf2zh-1.4.2.tar.gz.
File metadata
- Download URL: pdf2zh-1.4.2.tar.gz
- Upload date:
- Size: 131.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11b08549afb99a397274acec1bdff787dff4dab150c33f7077eafa1683584a7f
|
|
| MD5 |
6c7dd87610ba3bfab7f2f337526e012e
|
|
| BLAKE2b-256 |
358641f6e2f4cad931bf0885ca021f18d2cbede09b63703904c4f1fae44f3912
|
File details
Details for the file pdf2zh-1.4.2-py3-none-any.whl.
File metadata
- Download URL: pdf2zh-1.4.2-py3-none-any.whl
- Upload date:
- Size: 139.4 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 |
bb5925e6dfedfbc84b85da4646e2ca3d42b27b7b84719fa0dbf4da914e9156ec
|
|
| MD5 |
32aadc3e092f54eccb2c280463b9c850
|
|
| BLAKE2b-256 |
e48e5679b6136e42e5531d505804f3c44876a6f5ce0772921276a6e10cda7ab9
|