-
-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve system prompt; add verbose_logging; add glossary for openai; Beautify the command-line output ; Update README #874
base: main
Are you sure you want to change the base?
Conversation
Whether to hide _CHAT_SYSTEM_TEMPLATE and _CHAT_SAMPLE in the command line output
@popcion I think that a lot of the additions could be worth moving to a new parent class (e.g. e.g.
class CommonGPTTranslator(ConfigGPT, CommonTranslator):
def __init__(self, config_key: str):
ConfigGPT.__init__(self, config_key=config_key)
CommonTranslator.__init__(self)
...
def print_boxed(self, text, border_color="blue", title=f"{self.__class__.__name__} Output"):
...
def load_glossary(self, path):
...
... Can probably move some other functions there, too. e.g. : def _cannot_assist(self, response: str) -> bool:
...
class OpenAITranslator(CommonGPTTranslator):
... |
@SamuelWN Regarding glossary, this is actually an old issue. glossaries have been used to guide AI translation since the end of 2022. I've always wondered why a project with so many users doesn't have a glossary feature. Adding a glossary is on the TODO list, and I considered adding it when implementing the replacement dictionary. However, automatically adding a glossary is a new reference point. Furthermore, taking inspiration from this project , we could even create an automated workflow that generates and adds glossaries. It would work by first performing OCR on the entire comic, then generating a specific terminology glossary for that comic based on the merged textline results, and finally proceeding with translation and subsequent processes. This approach could serve as a superior alternative to the current automatic terminology matching system. |
glossory -> glossary
_CHAT_SAMPLE
和_CHAT_SYSTEM_TEMPLATE
的选项verbose_logging
,即使在调试模式下,每次都输出也过于冗余了,默认隐藏OPENAI_GLOSSARY_PATH
参数,可使用sakura、galtransl、mit(与post_dict/pre_dict一样的格式)格式的术语表调整web模式下final输出文件夹命名的顺序,重点突出参数以便查看修复旧版翻译同一张图片时由于hash相同会something went wrong的遗留问题
才发现新版web模式不会保存翻译完成的图片...
[edit]