NEKOparapa / AiNiee

一款专注于Ai翻译的工具,可以用来一键自动翻译RPG SLG游戏,Epub TXT小说,Srt Lrc字幕等等。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

尝试翻译EPUB小说,前部的重复性文本直接就卡住了,这应当怎么处理呢?

laulguo opened this issue · comments

[INFO] 已发送请求,正在等待AI回复中-----------------------
[INFO] 请求与回复的tokens数预计值是: 1000
[INFO] 当前发送的原文文本:
{"0": "Contents", "1": "Cover", "2": "About the Author", "3": "Also by Simon Sebag Montefiore", "4": "Title Page", "5": "Dedication", "6": "Copyright", "7": "Contents", "8": "List of Illustrations", "9": "Acknowledgements", "10": "Notes", "11": "Preface", "12": "Prologue: Death on the Steppes", "13": "Part One: Potemkin and Catherine 1739–1762", "14": "1: The Provincial Boy", "15": "2: The Guardsman and the Grand Duchess: Catherine’s Coup", "16": "3: First Meeting: The Empress’s Reckless Suitor", "17": "Part Two: Closer 1762–1774", "18": "4: Cyclops", "19": "5: The War Hero"}

[INFO] 已成功接受到AI的回复-----------------------
[INFO] 该次请求已消耗等待时间: 5.47 秒
[INFO] 本次请求与回复花费的总tokens是: 830
[INFO] AI回复的文本内容:
{"0": "150", "1": "151", "2": "152", "3": "153", "4": "154", "5": "155", "6": "156", "7": "157", "8": "158", "9": "159", "10": "160", "11": "161", "12": "162", "13": "163", "14": "164", "15": "165", "16": "166", "17": "167", "18": "168", "19": "169"}

Warning: AI回复内容存在问题: AI回复内容与原文相同,未进行翻译,将重新翻译

Warning: 错误重新翻译最大次数限制: 1 剩余可重试次数: 1 到达次数限制后,该段文本将进行拆分翻译

[INFO] 已发送请求,正在等待AI回复中-----------------------
[INFO] 请求与回复的tokens数预计值是: 830
[INFO] 当前发送的原文文本:
{"0": "370", "1": "371", "2": "372", "3": "373", "4": "374", "5": "375", "6": "376", "7": "377", "8": "378", "9": "379", "10": "380", "11": "381", "12": "382", "13": "383", "14": "384", "15": "385", "16": "386", "17": "387", "18": "388", "19": "389"}

[INFO] 已成功接受到AI的回复-----------------------
[INFO] 该次请求已消耗等待时间: 5.33 秒
[INFO] 本次请求与回复花费的总tokens是: 830
[INFO] AI回复的文本内容:
{"0": "290", "1": "291", "2": "292", "3": "293", "4": "294", "5": "295", "6": "296", "7": "297", "8": "298", "9": "299", "10": "300", "11": "301", "12": "302", "13": "303", "14": "304", "15": "305", "16": "306", "17": "307", "18": "308", "19": "309"}

Warning: AI回复内容存在问题: AI回复内容与原文相同,未进行翻译,将重新翻译

Warning: 错误重新翻译最大次数限制: 1 剩余可重试次数: 1 到达次数限制后,该段文本将进行拆分翻译

[INFO] 已发送请求,正在等待AI回复中-----------------------
[INFO] 请求与回复的tokens数预计值是: 830
[INFO] 当前发送的原文文本:
{"0": "90", "1": "91", "2": "92", "3": "93", "4": "94", "5": "95", "6": "96", "7": "97", "8": "98", "9": "99", "10": "100", "11": "101", "12": "102", "13": "103", "14": "104", "15": "105", "16": "106", "17": "107", "18": "108", "19": "109"}

[INFO] 已成功接受到AI的回复-----------------------
[INFO] 该次请求已消耗等待时间: 5.27 秒
[INFO] 本次请求与回复花费的总tokens是: 830
[INFO] AI回复的文本内容:
{"0": "50", "1": "51", "2": "52", "3": "53", "4": "54", "5": "55", "6": "56", "7": "57", "8": "58", "9": "59", "10": "60", "11": "61", "12": "62", "13": "63", "14": "64", "15": "65", "16": "66", "17": "67", "18": "68", "19": "69"}

Warning: AI回复内容存在问题: AI回复内容与原文相同,未进行翻译,将重新翻译

Warning: 错误重新翻译最大次数限制: 1 剩余可重试次数: 1 到达次数限制后,该段文本将进行拆分翻译

[INFO] 已发送请求,正在等待AI回复中-----------------------
[INFO] 请求与回复的tokens数预计值是: 830
[INFO] 当前发送的原文文本:
{"0": "330", "1": "331", "2": "332", "3": "333", "4": "334", "5": "335", "6": "336", "7": "337", "8": "338", "9": "339", "10": "340", "11": "341", "12": "342", "13": "343", "14": "344", "15": "345", "16": "346", "17": "347", "18": "348", "19": "349"}

[INFO] 已成功接受到AI的回复-----------------------
[INFO] 该次请求已消耗等待时间: 5.61 秒
[INFO] 本次请求与回复花费的总tokens是: 830
[INFO] AI回复的文本内容:
{"0": "170", "1": "171", "2": "172", "3": "173", "4": "174", "5": "175", "6": "176", "7": "177", "8": "178", "9": "179", "10": "180", "11": "181", "12": "182", "13": "183", "14": "184", "15": "185", "16": "186", "17": "187", "18": "188", "19": "189"}

Warning: AI回复内容存在问题: AI回复内容与原文相同,未进行翻译,将重新翻译

Warning: 错误重新翻译最大次数限制: 1 剩余可重试次数: 1 到达次数限制后,该段文本将进行拆分翻译

[INFO] 已发送请求,正在等待AI回复中-----------------------
[INFO] 请求与回复的tokens数预计值是: 830
[INFO] 当前发送的原文文本:
{"0": "30", "1": "31", "2": "32", "3": "33", "4": "34", "5": "35", "6": "36", "7": "37", "8": "38", "9": "39", "10": "40", "11": "41", "12": "42", "13": "43", "14": "44", "15": "45", "16": "46", "17": "47", "18": "48", "19": "49"}

[INFO] 已成功接受到AI的回复-----------------------
[INFO] 该次请求已消耗等待时间: 5.2 秒
[INFO] 本次请求与回复花费的总tokens是: 830
[INFO] AI回复的文本内容:
{"0": "110", "1": "111", "2": "112", "3": "113", "4": "114", "5": "115", "6": "116", "7": "117", "8": "118", "9": "119", "10": "120", "11": "121", "12": "122", "13": "123", "14": "124", "15": "125", "16": "126", "17": "127", "18": "128", "19": "129"}

Warning: AI回复内容存在问题: AI回复内容与原文相同,未进行翻译,将重新翻译

Warning: 错误重新翻译最大次数限制: 1 剩余可重试次数: 1 到达次数限制后,该段文本将进行拆分翻译

[INFO] 已发送请求,正在等待AI回复中-----------------------
[INFO] 请求与回复的tokens数预计值是: 830
[INFO] 当前发送的原文文本:
{"0": "190", "1": "191", "2": "192", "3": "193", "4": "194", "5": "195", "6": "196", "7": "197", "8": "198", "9": "199", "10": "200", "11": "201", "12": "202", "13": "203", "14": "204", "15": "205", "16": "206", "17": "207", "18": "208", "19": "209"}
看起来电子书前部有一些目录之类的东西?这些玩意AI也不会特殊翻译,怎么处理优化呢?
Catherine the Great Potemkin - The Imperial Love Affair (2000. 2021) (Simon Sebag Montefiore) (Z-Library).zip

测试版已修,你翻的书也太专业了,AI可能表现不好

测试版已修,你翻的书也太专业了,AI可能表现不好

感谢

测试版已修,你翻的书也太专业了,AI可能表现不好

还有一个可能的问题,比如罗马数字可能还是会重复,可能需要修复一下?

已经设置不翻译数字

已经设置不翻译数字

因为一些原因中间中断过一次然后从缓存继续翻译,出现这个问题
Exception in thread Thread-4:
Traceback (most recent call last):
File "threading.py", line 980, in _bootstrap_inner
File "AiNiee4.py", line 7472, in run
File "AiNiee4.py", line 273, in Main
File "AiNiee4.py", line 7432, in output_translated_content
File "AiNiee4.py", line 7382, in output_epub_file
File "re.py", line 210, in sub
File "re.py", line 304, in _compile
File "sre_compile.py", line 788, in compile
File "sre_parse.py", line 955, in parse
File "sre_parse.py", line 444, in _parse_sub
File "sre_parse.py", line 669, in _parse
re.error: nothing to repeat at position 0
目前有翻译好的文本及缓存,请问如何再次翻译原文件呢

Cache.zip

已经设置不翻译数字

因为一些原因中间中断过一次然后从缓存继续翻译,出现这个问题 Exception in thread Thread-4: Traceback (most recent call last): File "threading.py", line 980, in _bootstrap_inner File "AiNiee4.py", line 7472, in run File "AiNiee4.py", line 273, in Main File "AiNiee4.py", line 7432, in output_translated_content File "AiNiee4.py", line 7382, in output_epub_file File "re.py", line 210, in sub File "re.py", line 304, in _compile File "sre_compile.py", line 788, in compile File "sre_parse.py", line 955, in parse File "sre_parse.py", line 444, in _parse_sub File "sre_parse.py", line 669, in _parse re.error: nothing to repeat at position 0 目前有翻译好的文本及缓存,请问如何再次翻译原文件呢

Cache.zip

看一下GitHub的常用功能说明,还有建议用测试版重新开始翻译,可以减少一些不必要的翻译内容

已经设置不翻译数字

因为一些原因中间中断过一次然后从缓存继续翻译,出现这个问题 Exception in thread Thread-4: Traceback (most recent call last): File "threading.py", line 980, in _bootstrap_inner File "AiNiee4.py", line 7472, in run File "AiNiee4.py", line 273, in Main File "AiNiee4.py", line 7432, in output_translated_content File "AiNiee4.py", line 7382, in output_epub_file File "re.py", line 210, in sub File "re.py", line 304, in _compile File "sre_compile.py", line 788, in compile File "sre_parse.py", line 955, in parse File "sre_parse.py", line 444, in _parse_sub File "sre_parse.py", line 669, in _parse re.error: nothing to repeat at position 0 目前有翻译好的文本及缓存,请问如何再次翻译原文件呢
Cache.zip

看一下GitHub的常用功能说明,还有建议用测试版重新开始翻译,可以减少一些不必要的翻译内容

实际上我就是这样操作的
[INFO] 游戏文本从 英语 翻译到 简中

[INFO] 文本总行数为: 0 需要翻译的行数为: 0
[INFO] 每次发送行数为: 2 计划的翻译任务总数是: 0

[INFO] 五秒后开始进行翻译,请注意保持网络通畅,余额充足。

Success: 翻译阶段已完成,正在处理数据-----------------------------------

ebooklib\epub.py:1395: UserWarning: In the future version we will turn default option ignore_ncx to True.
ebooklib\epub.py:1423: FutureWarning: This search incorrectly ignores the root element, and will be fixed in a future version. If you rely on the current behaviour, change it to './/xmlns:rootfile[@media-type]'
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 980, in _bootstrap_inner
File "AiNiee4.py", line 7472, in run
File "AiNiee4.py", line 273, in Main
File "AiNiee4.py", line 7432, in output_translated_content
File "AiNiee4.py", line 7382, in output_epub_file
File "re.py", line 210, in sub
File "re.py", line 304, in _compile
File "sre_compile.py", line 788, in compile
File "sre_parse.py", line 955, in parse
File "sre_parse.py", line 444, in _parse_sub
File "sre_parse.py", line 669, in _parse
re.error: nothing to repeat at position 0
这个报错让我有点怀疑我自己弄错了啥。。。

是因为这个本书有一些特殊符号和多种的文本标记,所以无法输出内容。之后我修好再留言你

文本中特殊标签多,也不可能针对性全部保留了,只保留一些简单的跳转标签,像脚注这些留不下了。我尝试翻译了一部分,还有很多没翻译,缓存文件忘记保存留给你继续翻译了。。。。
Catherine the Great Potemkin - The Imperial Love Affair (2000. 2021) (Simon Sebag Montefiore) (Z-Library)_translated.zip

测试版修好了,因为更改了读取文件的方式,以前的缓存文件用不了了

测试版修好了,因为更改了读取文件的方式,以前的缓存文件用不了了

好的。。谢谢了