justzx2011 / openyoudao

openyoudao is a youdao client for linux.有道字典在Linux下的客户端,目前程序已经进入aur源,并支持Debian/Ubuntu fedora/centos 等常用发行版linux
http://openyoudao.org
MIT License
267 stars 87 forks source link

建议:添加识别断行机制 #46

Closed syrte closed 9 years ago

syrte commented 10 years ago

看pdf等文档时,openyoudao划词翻译真的非常方便。提两个改进建议:

  1. 不太清楚有道的工作原理,它能识别出换行符吗?目前看,如果划记词组跨行后,只会搜索第一行的单词。建议添加支持跨行词组搜索,自动把换行符换成空格,再搜索。
  2. 有时由于排版需要,一个单词会被分到两行中,用连字符-连接,如下面引文中的evolu-tionaryfunda-mentally。划记整个词时,有道似乎只会搜索前面半截,如evolu-,这就不是想查的词了。当然,也有些词组是本来就自带连字符的,如large-scaleshort-lived

    是否可以再添加一项功能,带连字符-的单词找不到时,就去掉连字符后再重新一次?

个人觉得上面两条应该还比较实用,不知以上建议是否可行。

以下是示例文本。

In these, as in other suggested lines of postbiological evolu- tionary development of advanced civilizations, the approaches favoured by the recent and ongoing SETI projects are funda- mentally misguided – the unavoidable result being that ad- vanced societies will remain undetectable by current approaches.

syrte commented 9 years ago

以上功能已基本实现。

  1. 支持跨行取词
  2. 跨行时,自动去除首行末尾的连字符

已提交pull require,见此

justzx2011 commented 9 years ago

更改已经merge到master分支