Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Byaidu/PDFMathTranslate

PDF scientific paper translation and bilingual comparison - 完整保留排版的 PDF 文档全文双语翻译
https://github.com/Byaidu/PDFMathTranslate

chinese english japanese korean latex pdf translation

Last synced: about 2 months ago
JSON representation

PDF scientific paper translation and bilingual comparison - 完整保留排版的 PDF 文档全文双语翻译

Awesome Lists containing this project

README

        

# PDFMathTranslate










PDF scientific paper translation and bilingual comparison based on font rules and deep learning, preserving formula and figure layout.

![image](https://github.com/user-attachments/assets/57e1cde6-c647-4af8-8f8f-587a40050dde)

![image](https://github.com/user-attachments/assets/0e6d7e44-18cd-443a-8a84-db99edf2c268)

## Installation

```bash
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

```bash
pdf2zh example.pdf
```

### Translate part of the document

```bash
pdf2zh example.pdf -p 1-3,5
```

### Translate with the specified language

```bash
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.

```bash
pdf2zh BDA3.pdf -f "(CM[^RT].*|MS.*|XY.*|MT.*|BL.*|.*0700|.*0500|.*Italic)" -c "(\(|\||\)|\+|=|\d|[\u0080-\ufaff])"
```

## Acknowledgement

Document merging: [PyMuPDF](https://github.com/pymupdf/PyMuPDF)

Document parsing: [Pdfminer.six](https://github.com/pdfminer/pdfminer.six)

Document extraction: [MinerU](https://github.com/opendatalab/MinerU)

Multi-threaded translation: [MathTranslate](https://github.com/SUSYUSTC/MathTranslate)

Layout parsing: [DocLayout-YOLO](https://github.com/opendatalab/DocLayout-YOLO)

## Star History





Star History Chart