ChatGPT-for-Translation基于 ChatGPT 的翻譯命令行工具
ChatGPT-for-Translation 是基于 ChatGPT 的翻譯命令行工具——使用 ChatGPT 完成文件翻譯。
該工具接受一個(gè)文本文件(.pdf,.txt,.md,.html或.rtf)或者一個(gè)包含文本的文件夾。它將生成一個(gè)直接翻譯和一個(gè)雙語(yǔ)文本文件。對(duì)于 PDF 解析做了優(yōu)化。
示例
# 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
可用參數(shù)
--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.
評(píng)論
圖片
表情
