windingwind / zotero-pdf-translate

Translate PDF, EPub, webpage, metadata, annotations, notes to the target language. Support 20+ translate services.
GNU Affero General Public License v3.0
6.06k stars 301 forks source link

Add CNKI Segmented Translation #762

Open sasaju opened 1 month ago

sasaju commented 1 month ago

Split sentences by periods, question marks, and exclamation points and translate them block by block. At the same time, I found that the limit of CNKI is 800 characters, and 1000 characters seems to be inexplicably truncated. 通过句号、问号、叹号分割句子,逐块翻译。同时我发现似乎CNKI的限制是800字符,1000字符似乎会莫名截断。

windingwind commented 1 month ago

谢谢。可考虑相关代码放在cnki.ts里,避免大量重复代码

sasaju commented 1 month ago

谢谢。可考虑相关代码放在cnki.ts里,避免大量重复代码

行,我再处理一下

sasaju commented 3 weeks ago

已移除重复代码

windingwind commented 2 weeks ago

感觉单独作为一个服务不是很合适。我倾向拼接与否作为cnki的一个选项(参考src/modules/settings/cnki.ts),根据配置决定是否使用分割模式

sasaju commented 2 weeks ago

那倒也是,我再处理一下

sasaju commented 1 week ago

已合并至cnki.ts,同时添加了设置选项。 image

windingwind commented 5 days ago

谢谢。我不确定弹窗是否需要,从我的体验来说进度弹窗会干扰注意力,我倾向于去掉。欢迎讨论

sasaju commented 5 days ago

我是考虑到如果分段过多可能会明显感觉到翻译缓慢,也可能会影响使用体验。那就超过5段或者4段再进行提示?