ChatGPT-for-Translation基于 ChatGPT 的翻译命令行工具

联合创作 · 2023-09-30 17:40

ChatGPT-for-Translation 是基于 ChatGPT 的翻译命令行工具——使用 ChatGPT 完成文件翻译。

该工具接受一个文本文件(.pdf,.txt,.md,.html.rtf)或者一个包含文本的文件夹。它将生成一个直接翻译和一个双语文本文件。对于 PDF 解析做了优化。

示例

# Install
git clone https://github.com/Raychanan/ChatGPT-for-Translation.git
cd ./ChatGPT-for-Translation/
pip install -r requirements.txt --quiet

# Run
python ChatGPT-translate.py --input_path=input.txt --openai_key=password

可用参数

--num_threads: The number of threads to use for translation (default: 10).
--only_process_this_file_extension. For example, set only_process_this_file_extension="txt".
--not_to_translate_references. By default, not to translate references.

 

浏览 7
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报