Skip to main content

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.

image

image

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

Star History Chart

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.8.tar.gz (141.8 kB view details)

Uploaded Source

Built Distribution

pdf2zh-1.5.8-py3-none-any.whl (150.2 kB view details)

Uploaded Python 3

File details

Details for the file pdf2zh-1.5.8.tar.gz.

File metadata

  • Download URL: pdf2zh-1.5.8.tar.gz
  • Upload date:
  • Size: 141.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pdf2zh-1.5.8.tar.gz
Algorithm Hash digest
SHA256 bba367fe3e845437ada1914d12a1c08554e0ab89f4b716001ed71d31203420e0
MD5 4b618bab320d5e489e91655aabf0afec
BLAKE2b-256 1eaf39a0c87b0a4c380054e1b013f3c84c08a13f72d515f9e632e7310f04d599

See more details on using hashes here.

File details

Details for the file pdf2zh-1.5.8-py3-none-any.whl.

File metadata

  • Download URL: pdf2zh-1.5.8-py3-none-any.whl
  • Upload date:
  • Size: 150.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pdf2zh-1.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 99f9515567099a2617d66ab6c1be8d76debff57ff8e2e3d6d7e12b6b56e232db
MD5 63962a8314a99b581be96dd951b5927e
BLAKE2b-256 489809d013ba7cc983ee3cd587f5bc6ac0acbf9e7ae247d3d4548d87f2db2ab0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page