[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
关于占内存问题, 太同感了

这个能不能改成监视剪贴板, 这样就能用 Ctrl+C, 很方便, 同时可能需要设计一个便捷的开关可以用来关掉监视

TOP

本帖最后由 aa77dd@163.com 于 2015-6-14 08:42 编辑

回复 4# 523066680

NICE!

我在找怎么能支持 长了空白尾巴的单词, 比如 "word ",  "hello ", "perl "

我有个习惯: 在浏览器(也包括 windows 记事本)里一段英文句子里某个单词上双击, 但选词结果就经常包括了后面的空白字符, 比如有 空格, TAB 字符, 等

我想应该是修改这行的正则表达式:
  1. if ( $text =~ /\p{IsWord}/ )
复制代码

TOP

回复 6# 523066680

ha ha  那就私人定制了

我改成了:
  1. if ($text !~ /^\s*[a-z]+\s*$|^\s*[a-z]+\s*[a-z]+\s*$|^\s*[a-z]+\s*[a-z]+\s*[a-z]+\s*$/i) { return; }
复制代码
可以最多支持包含三个单词的短语, 单词前后有空白字符都不会被拒绝翻译了

TOP

做了个简单的测试对比

[Perl]在线查询dict.cn英汉对译 V1.6 VS Lingoes 2.9.2 Home - 绿色便捷版

对比内容: 内存占用
以下 7 次 输出按先后顺序分别是 刚启动程序, 对剪贴板取词翻译 1次, 2次, ...6次 的内存占用
单词依次为: clip, text, decode, class, strong, print
  1. (tasklist | findstr "perl.exe") & (tasklist | findstr "Lingoes.exe")
  2. perl.exe                      4216 Console                    1     19,248 K
  3. Lingoes.exe                   7660 Console                    1     30,476 K
  4. (tasklist | findstr "perl.exe") & (tasklist | findstr "Lingoes.exe")
  5. perl.exe                      4216 Console                    1     28,948 K
  6. Lingoes.exe                   7660 Console                    1     50,268 K
  7. (tasklist | findstr "perl.exe") & (tasklist | findstr "Lingoes.exe")
  8. perl.exe                      4216 Console                    1     29,392 K
  9. Lingoes.exe                   7660 Console                    1     50,592 K
  10. (tasklist | findstr "perl.exe") & (tasklist | findstr "Lingoes.exe")
  11. perl.exe                      4216 Console                    1     29,392 K
  12. Lingoes.exe                   7660 Console                    1     50,920 K
  13. (tasklist | findstr "perl.exe") & (tasklist | findstr "Lingoes.exe")
  14. perl.exe                      4216 Console                    1     29,680 K
  15. Lingoes.exe                   7660 Console                    1     51,900 K
  16. (tasklist | findstr "perl.exe") & (tasklist | findstr "Lingoes.exe")
  17. perl.exe                      4216 Console                    1     29,668 K
  18. Lingoes.exe                   7660 Console                    1     52,056 K
  19. (tasklist | findstr "perl.exe") & (tasklist | findstr "Lingoes.exe")
  20. perl.exe                      4216 Console                    1     29,768 K
  21. Lingoes.exe                   7660 Console                    1     52,484 K
复制代码

TOP

回复 11# 523066680

音频和纯文本的翻译内容比起来, 相对就超大了, 文本内容出来时不用等音频到位吧, 不然可能会被音频下载速度拖得卡住吧

考虑了本地音频库, 显然音频库也会占用较庞大的磁盘空间, 而且从加载速度考虑可能需要数据索引, 更麻烦了

TOP

回复 10# 523066680

感觉翻译软件通常都会用 tooltip 的形式即时显示翻译结果, 不知 Perl 来实现这个会不会搞得太大, 太大就不好了.

TOP

本帖最后由 aa77dd@163.com 于 2015-6-19 11:43 编辑

回复 14# 523066680

不知道这些地方能不能找到些资源

http://www.pdawiki.com/forum/thread-10267-1-1.html

http://www.lingoes.cn/zh/dictionary/dict_format.php

http://www.octopus-studio.com/download.cn.htm

http://www.pdawiki.com/forum/forum.php

TOP

返回列表