Translate Latex articles through LLM and compile them into PDF
Project description
TransGPTex
TransGPTex 是一个用于将 LaTeX 文章翻译成中文并编译成 PDF 的工具。它通过使用大型语言模型 (LLM) 来实现高质量的翻译。
功能特性
- 支持从 arXiv 直接下载 LaTeX 源码。
- 支持翻译单个 LaTeX 文件或整个 LaTeX 项目。
- 支持自定义翻译语言和翻译模型。
- 支持编译生成 PDF 文件。
安装
pip install transgptex
快速开始
通过命令行:
# 从 arXiv 翻译并编译整个文章项目
tgtex -o output/path https://arxiv.org/abs/paper_id
# 翻译整个 LaTeX 项目
tgtex --own_tex_project -o output/path path/to/your/latex/project
# 翻译单个 LaTeX 文件
tgtex --single_tex -o output.tex path/to/your/latex/file.tex
# 获取帮助
tgtex -h
几个核心的配置:
- engine: 选择使用的 LLM 引擎,默认为 glm。
- llm_model: 选择使用的 LLM 模型,默认为 glm-4-air。
- end_point: LLM 推理端点 URL,默认为 https://open.bigmodel.cn/api/paas/v4/。
- qps: LLM API 的每秒查询数,默认为 5。
- api_key: 请配置在环境变量
LLM_API_KEY中。
许可
TransGPTex 项目采用 MIT 许可证。
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 transgptex-0.0.1-py3-none-any.whl.
File metadata
- Download URL: transgptex-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d23dc2dabfd63d3452744b7f81d2a7419dc681fc8eee19296a7b2b31c8ee8a2
|
|
| MD5 |
171009f0eeb2a23cf9449e5895f48e29
|
|
| BLAKE2b-256 |
cffd330c0e032a4252022ff3ca6092e2b679508616bf149f44df7c51c1c5409d
|