Issue 234 in vimim: qq 雲輸入法超級慢的,尤其是qq.fanti,google則已經無法使用

26 views
Skip to first unread message

vi...@googlecode.com

unread,
Jun 11, 2013, 3:59:52 PM6/11/13
to vi...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 234 by cs86...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

What steps will reproduce the problem?
1. 使用雲輸入法,選擇qq或qq.fanti。
2. 輸入時就會發現很不流暢,也許是網路反應不夠快,但是其他輸入法無此問題。

What is the expected output? What do you see instead?
出字要迅速如baidu或是sougou。

What version of the product are you using? On what operating system?
1.0.0.0.0

Please provide any additional information below.
不知道baidu或sougou是否也有繁體輸出?


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

vi...@googlecode.com

unread,
Jun 13, 2013, 8:52:50 AM6/13/13
to vi...@googlegroups.com

Comment #1 on issue 234 by suxp...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

测试了下 QQ 云,或许是因为我在大陆的原因,表现挺正常的。其实,这几个云输入法
是否是因为网络原因造成的缓慢,可以通过它们的线上版本试用下就知道了,比如:
QQ: http://py.qq.com/web/
Sogou: http://pinyin.sogou.com/cloud/
Baidu: www.baidu.com 搜索设置,使用拼音输入法,回到主页搜索框
Google: 很不幸,VimIM 中的 Google 云输入法不能用了,——Google 云早就换接口
了,而 VimIM 还没有更新……试用地
址:http://www.google.com/intl/zh-CN/inputtools/cloud/try/

所有云输入法中,QQ 跟 Google 的最像是个完整的输入法(Google 还有更多输入法支
持,详见我之前发的某帖),尽管搜狗是最早的;而百度的那个应该不算正式发布出
来,功能自然也不多。

目前开发者似乎好久没出现了,功能更新不知道会在什么时候完成,我正在试着翻看源
码,或许在某个不可预知的未来,会有个重构版本的 VimIM 问世 :)

vi...@googlecode.com

unread,
Jun 17, 2013, 12:50:48 AM6/17/13
to vi...@googlegroups.com

Comment #2 on issue 234 by cs86...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

謝謝您的說明,我現在對照網頁來測試有比較正常了,不過偶爾輸入還是會卡
住,Windows版gvim的視窗標題上會出現(沒有反應),等待數十秒後才會彈出候選
字,通常在輸入第一個英文字就會卡住,例如輸入“k”就會停在那裡等上好一陣子才會
出現pop menu,也許是cache的關係,重新再輸入“k”就很快彈出了。

我想這可能是網路socket的部分處理不夠好,也許可以改良一下當發生延遲時,不要讓
整個vim變成沒有反應……

vi...@googlecode.com

unread,
Jun 18, 2013, 4:41:17 AM6/18/13
to vi...@googlegroups.com

Comment #3 on issue 234 by suxp...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

您用的是 vimim.dll 作网络连接?如果是的话,我大约知道是怎么回事了……当年做这
个 dll 的时候曾经考虑过这个问题,winsock 请求没法做到实时,于是这里面会有一
段时间的超时等待,很早版本的时候,连接超时时会有比较长的不响应现象,不过后来
按理说应该有所调整……我记得上次测试网络连接的状态是,如果没有连接会很快回馈找
不到模式,不会等待太长时间,您遇到的数十秒的情况我还没有遇到,能否提供更详细
的信息比如 ping 相关服务器时的反应时间等。

如果在网页中测试的情况比较流畅但 VimIM 中却很卡,那似乎应该是网络模块有些问
题。或者,如果您连接 Google 云的状况比较好的话,可以考虑换用 Google 云,当然
暂时要自己修改下 VimIM,例如,下述为未经优化的临时改造版本 Google 云(繁体中
文拼音)代码,替换 VimIM.vim 中对应的函数即可

function! s:vimim_get_cloud_google(keyboard)
"
https://www.google.com/inputtools/request?text=pinyin&ime=zh-hant-t-i0-pinyin&num=10&cp=0&cs=0&ie=utf-8&oe=utf-8
let input = 'http://www.google.com/inputtools/request?'
let input .= 'text=' . a:keyboard
let
input .= '&ime=zh-hant-t-i0-pinyin&num=20&cp=0&cs=0&ie=utf-8&oe=utf-8'
let output = eval(s:vimim_get_from_http(input,'google'))
" ["SUCCESS",[["ninhao",["您
好","您","拰"],[6,3,3],{"matched_length":[6,3,3]}]]]
let results = output[1][0][1]
let results = s:vimim_cloud_pinyin(a:keyboard, results)
return results
endfunction

vi...@googlecode.com

unread,
Jun 20, 2013, 12:10:58 AM6/20/13
to vi...@googlegroups.com

Comment #4 on issue 234 by cs86...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

感謝提供新版的 Google 雲輸入法的連接方式,速度真的是飛快!

QQ 雲昨天同時在 windows/linux 下測試都有同樣的問題,
偶爾在一開始輸入 k 就會卡住,linux 約卡十來秒,windows 卡住時間再長一些,
但在 QQ 的網頁上測試就不會這樣,一旦出現卡住的情況,
再輸入其他的字情況也會一樣,直到切換其他輸入法才不會卡,
底下是網路的反應時間:
$ ping py.qq.com
PING tdac2.qq.com (112.90.86.97) 56(84) bytes of data.
64 bytes from 112.90.86.97: icmp_req=1 ttl=50 time=44.2 ms
64 bytes from 112.90.86.97: icmp_req=2 ttl=50 time=44.0 ms
64 bytes from 112.90.86.97: icmp_req=3 ttl=50 time=44.2 ms
64 bytes from 112.90.86.97: icmp_req=4 ttl=50 time=43.9 ms
64 bytes from 112.90.86.97: icmp_req=5 ttl=50 time=43.1 ms
64 bytes from 112.90.86.97: icmp_req=6 ttl=50 time=44.6 ms
64 bytes from 112.90.86.97: icmp_req=7 ttl=50 time=43.6 ms
64 bytes from 112.90.86.97: icmp_req=8 ttl=50 time=44.8 ms
64 bytes from 112.90.86.97: icmp_req=9 ttl=50 time=44.0 ms

現在就改用繁體的 Google 雲了,那麼剛好我發現幾個問題,
就直接寫在這裡:
1. function! s:vimim_onekey_evils() 裡面有一行重複判斷或其實是要判斷"'":
舊:if one == '"' || one == '"'
新1:if one == '"'
新2:if one == '"' || one == "'"
2. function! g:vimim_double_quote() 最後一行應該要改成:
舊:sil!exe 'sil!return "' . key . '"'
新:sil!exe "sil!return '" . key . "'"

vi...@googlecode.com

unread,
Aug 13, 2013, 12:31:26 AM8/13/13
to vi...@googlegroups.com

Comment #5 on issue 234 by suxp...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

Google 云貌似又有更新,晚些时候将提供最新版 Google 云的处理函数

vi...@googlecode.com

unread,
Aug 13, 2013, 8:05:36 AM8/13/13
to vi...@googlegroups.com

Comment #6 on issue 234 by suxp...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

先留下几个测试用例,代码抽空再说了:

\>curl -s -o
con "http://inputtools.google.com/request?itc=zh-t-i0-pinyin&num=10&cp=0&cs=1&ie=utf-8&oe=gb2312&text=pinyin"
["SUCCESS",[["pinyin",["拼
音","品","拼","频","贫","聘","嫔","颦","姘","拚"],[6,3
,3,3,3,3,3,3,3,3],{"annotation":["pin
yin","pin","pin","pin","pin","pin","pin","pin","pin","pin"],"matched_length":[6,3,3,3,3,3,3,3,3,3]}]]]
\>curl -s -o
con "http://inputtools.google.com/request?itc=zh-t-i0-pinyin&num=10&cp=0&cs=1&ie=utf-8&oe=gb2312&text=chuan"
["SUCCESS",[["chuan",["穿","传","船","川","串","喘","舛","椽","傳","钏"],[],{"an
notation":["chuan","chuan","chuan","chuan","chuan","chuan","chuan","chuan","chuan","chuan"]}]]]

主要的几点:单字跟多字的返回结果有些不同需要注意,新接口的返回串一直提供
annotation。新版能得到的字符比旧版多了很多,看来 Google inputtools 团队没闲
着。

/* 旧版 */
[ "SUCCESS",
[ [ "pinyin",
["拼音","品","拼","频","聘","贫","嫔","颦","姘","牝"],
[6,3,3,3,3,3,3,3,3,3],
{"matched_length": [6,3,3,3,3,3,3,3,3,3] }
]
]
]

/* 新版 */
[ "SUCCESS",
[ [ "pinyin",
["拼音","品","拼","频","贫","聘","嫔","颦","姘","拚","牝"],
[6,3,3,3,3,3,3,3,3,3,3],
{ "annotation":["pin
yin","pin","pin","pin","pin","pin","pin","pin","pin","pin","pin"],
"matched_length":[6,3,3,3,3,3,3,3,3,3,3]
}
]
]
]

/* 旧版单字 */
[ "SUCCESS",
[ [ "shi",
["是","时","使","市","事","式","石","十","诗","师"]
]
]
]
/* 新版单字 */
[ "SUCCESS",
[ [ "chang",
["常","长","唱","厂","场","昌","尝","肠","畅","偿","娼"],
[],

{ "annotation":["chang","chang","chang","chang","chang","chang","chang","chang","chang","chang","chang"]
}
]
]
]

[ "SUCCESS",
[ [ "duan",
["段","短","断","端","锻","缎","椴","煅","斷","鍛","杜安"],
[],

{ "annotation":["duan","duan","duan","duan","duan","duan","duan","duan","duan","duan","du
an"]
}
]
]
]

vi...@googlecode.com

unread,
Aug 14, 2013, 3:21:27 AM8/14/13
to vi...@googlegroups.com

Comment #7 on issue 234 by cs86...@gmail.com: qq 雲輸入法超級慢的,尤其是
qq.fanti,google則已經無法使用
http://code.google.com/p/vimim/issues/detail?id=234

我開始期待您的新版推出囉;)
Reply all
Reply to author
Forward
0 new messages