tisfeng / Easydict

一个简洁优雅的词典翻译 macOS App。开箱即用,支持离线 OCR 识别,支持有道词典,🍎 苹果系统词典,🍎 苹果系统翻译,OpenAI,Gemini,DeepL,Google,Bing,腾讯,百度,阿里,小牛,彩云和火山翻译。A concise and elegant Dictionary and Translator macOS App for looking up words and translating text.
GNU General Public License v3.0
7.03k stars 356 forks source link

🚀 功能建议:建议增加翻译前,去除换行符之类的空白符的功能 #513

Closed luckmoon closed 5 months ago

luckmoon commented 5 months ago

请先确认以下事项

功能描述

从一些pdf,特别是双栏的学术论文中,复制一段文本后去翻译时,由于有些pdf会带着换行符,比如: CategoryAlignment. Intheindustrialscenario,thecategories of items will be diverse (e.g., food, hotels, movies, etc.) and the number of items in each category is seriously uneven. With the imbalanced category data, the two-tower model performs differ- ently for the different categories, and it performs much worse on the categories with relatively smaller amount of items. 这导致翻译时,翻译接口会把这段文字错误拆句,非常影响效果:

image

使用场景

pdf复制时

实现方案(可选)

No response

是否愿意提交 PR 实现该功能

github-actions[bot] commented 5 months ago

Hello luckmoon, Thank you for your first issue contribution 🎉

tisfeng commented 5 months ago

目前已经实现了,下个版本就上。

这个周末应该会发新版本。

image
tisfeng commented 5 months ago

2.7.0 版本已实现该功能。

cnkjw commented 4 months ago

这个问题好像还没有解决,无法正确处理双栏PDF中的换行符号。