Sunday, July 11, 2010

Chinese Input

Google Translate supplies a clumsy but straightforward means for entering Chinese characters with a US keyboard, especially for those learning the language. Simply type the English meaning, and copy the result. You can check the character is indeed the one you want by clicking on "Show romanization", or on the speaker icon to hear a synthesized reading.
However, sometimes I have a particular character in mind. A short-term solution is to use an online rendition of a traditional dictionary ordered by radical and stroke count, or a pinyin dictionary. Additional speed and convenience requires investment; one must learn one of the many fascinating methods for entering Chinese characters on a computer.
I’ve read that the Wubizixing input method is fastest, though as one might expect, it requires the most investment. Proficiency demands much practice with a suitably annotated keyboard.
For now, I’ve opted for the Wubihua method, which mimics how humans write characters. It may be slower, but it can be learned quickly. Also it applies when sending Chinese text messages on mobile phones.
I supplement Wubihua with a pinyin method, as I’m practically illiterate in Chinese.
Chinese input in Linux
To setup Chinese input methods in Ubuntu, I installed the scim and scim-pinyin packages, then modified my .xsession as follows. I prepended:
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="xim"
and appended:
scim -d
after which pressing Ctrl+Space toggles Chinese input.
"Stroke 5" is Wubihua mode. Stroke types are mapped to 5 keys along the bottom row. From right to left:
/: | (vertical; top-to-bottom)
.: \ (downwards left-to-right)
,: / (downwards right-to-left)
m: - (horizontal; left-to-right)
n: other stroke types, e.g: 乙
Perhaps one can remember this as follows: 乙 looks like a rotated N. A lowercase M takes more horizontal space than most letters, so it corresponds to the horizontal stroke. On the next two keys, the less-than and greater-than signs point left and right, so they correspond to the left and right downward strokes. Lastly, the stem of the question mark suggests a vertical stroke.
Although the pinyin method is found in the Simplified menu (智能拼音; "smart pinyin"), it also offers Traditional characters. I originally learned zhuyin (aka bopomofo), a more traditional pronounciation-based method for producing Traditional characters, but it is ill-suited for a US keyboard. Fortunately converting from zhuyin to pinyin is trivial.
Chinese to English
In a pinch, I’ll use Google Translate to learn Chinese phrases. However, browser plugins are much handier; see the Chrome Zhongwen extension and the Firefox Perapera-kun add-on.

1 comment:

DM said...

Just a side note, you instead of using google translate, you can type the pinyin into a baidu search, it suggests the hanzi for you. In my experience it's almost 100% accurate, no romanization though. Works very well when you are not on your own computer and can't be bother to figure out how to enable chinese in windows...