From a661131efbffb746e126482d1fb157a3060f3a63 Mon Sep 17 00:00:00 2001 From: Panmax Date: Thu, 16 Mar 2023 20:54:56 +0800 Subject: [PATCH] Delete duplicate description (#172) --- README-CN.md | 3 --- README.md | 3 --- 2 files changed, 6 deletions(-) diff --git a/README-CN.md b/README-CN.md index 722df2b..5bcd33a 100644 --- a/README-CN.md +++ b/README-CN.md @@ -42,9 +42,6 @@ bilingual_book_maker 是一个 AI 翻译工具,使用 ChatGPT 帮助用户制 如果您需要设置 `system` 角色,可以使用以下方式配置:`--prompt '{"user":"Translate {text} to {language}", "system": "You are a professional translator."}'`,或者 `--prompt prompt_template_sample.json`(示例 JSON 文件可以在 [./prompt_template_sample.json](./prompt_template_sample.json) 找到)。 你也可以用环境以下环境变量来配置 `system` 和 `user` 角色 prompt:`BBM_CHATGPTAPI_USER_MSG_TEMPLATE` 和 `BBM_CHATGPTAPI_SYS_MSG`。 该参数可以是提示模板字符串,也可以是模板 `.txt` 文件的路径。 -- 翻译完会生成一本 ${book_name}_bilingual.epub 的双语书 -- 如果出现了错误或使用 `CTRL+C` 中断命令,不想接下来继续翻译了,会生成一本 ${book_name}_bilingual_temp.epub 的书,直接改成你想要的名字就可以了 -- 如果你想要翻译电子书中的无标签字符串,可以使用 `--allow_navigable_strings` 参数,会将可遍历字符串加入翻译队列,**注意,在条件允许情况下,请寻找更规范的电子书** - 使用`--batch_size` 参数,指定批量翻译的行数(默认行数为10,目前只对txt生效) diff --git a/README.md b/README.md index 26f01c6..2442d16 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,6 @@ The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist u If you don't need to set the `system` role content, you can simply set it up like this: `--prompt "Translate {text} to {language}."` or `--prompt prompt_template_sample.txt` (example of a text file can be found at [./prompt_template_sample.txt](./prompt_template_sample.txt)). If you need to set the `system` role content, you can use the following format: `--prompt '{"user":"Translate {text} to {language}", "system": "You are a professional translator."}'` or `--prompt prompt_template_sample.json` (example of a JSON file can be found at [./prompt_template_sample.json](./prompt_template_sample.json)). You can also set the `user` and `system` role prompt by setting environment variables: `BBM_CHATGPTAPI_USER_MSG_TEMPLATE` and `BBM_CHATGPTAPI_SYS_MSG`. -- Once the translation is complete, a bilingual book named `${book_name}_bilingual.epub` would be generated. -- If there are any errors or you wish to interrupt the translation by pressing `CTRL+C`. A book named `${book_name}_bilingual_temp.epub` would be generated. You can simply rename it to any desired name. -- If you want to translate strings in an e-book that aren't labeled with any tags, you can use the `--allow_navigable_strings` parameter. This will add the strings to the translation queue. **Note that it's best to look for e-books that are more standardized if possible.** - Use the `--batch_size` parameter to specify the number of lines for batch translation (default is 10, currently only effective for txt files). ### Examples