2013년 7월 15일 월요일

중국어 입력기

개발자의 입장에서 보자면
한글도 Latin계열의 문자들에 비해, 자소들을 조합해서 음절을 만들어야 하니 어렵다고 볼 수 있겠으나,
일본어, 중국어는 그 이상이다.
일본어는 차치하고 중국어 입력기만 한 번 정리해보자

중국 본토에서 사용하느냐, 홍콩, 대만 등지에서 사용하거나에 따라 사전에 포함되어야 하는 글자다 달라진다.
또한 상당한 수의 낱자들 중에서 입력할 글자를 골라야 하기에 추천 기능이 필수적이다.

중국어의 여러 입력법들은 사용자가 입력하는 Key가 다를 뿐이지 기본 동작은 같다.
사용자가 Key를 입력하면, Key에 맞는 낱자 혹은 단어를 사전에서 찾아 목록을 만들고, 사용자는 그 중 하나를 선택해 입력하는 방식이다.
다음은 주로 사용되는 입력 방식들이다.

Pinyin 입력법

  • 병음이 검색의 Key가 되며, 병음은 영문 키보드로 입력한다.
  • 각 글자의 병음 첫 알파벳만 입력해도 해당 단어가 추천되어 입력 가능하다.
  • 输入法의 경우 sherufa로 전체 병음을 모두 입력해도 되지만 한자의 병음에 해당하는 첫 알파벳(SRF)만 입력하면 병음에 해당하는 한자가 히트된다.
  • 대부분의 중국 본토(간체 입력시)에서 사용하는 입력법이다.
  • Sogou 입력기

Cangjie 입력법

  • wiki::Cangjie input method
  • 창제 코드가 각인된 키보드를 통해 창제 코드를 입력한다.
  • 예들 들면 車를 입력하기 위해 十 田 十 를 입력해야 한다.
  • 따라서 사전에 포함된 낱자들의 창제코드가 필요해진다.
GroupKeyNamePrimary meaning
Philosophical groupA日 sun日, 曰, 90° rotated 日 (as in 巴)
B月 moonthe top four strokes of 目, 冂, 爫, 冖, the top and top-left part of 炙, 然, and 祭, the top-left four strokes of 豹 and 貓, and the top four strokes of 骨
C金 golditself, 丷, 八, and the penultimate two strokes of 四 and 匹
D木 wooditself, the first two strokes of 寸 and 才, the first two strokes of 也 and 皮
E水 water氵, the last five strokes of 暴 and 康, 又
F火 firethe shape 小, 灬, the first three strokes in 當 and 光
G土 earth
Stroke groupH竹 bambooThe slant and short slant, the Kangxi radical 竹, namely the first four strokes in 笨 and 節
I戈 weaponThe dot, the first three strokes in 床 and 庫, and the shape 厶
J十 tenThe cross shape and the shape 宀
K大 bigThe X shape, including 乂 and the first two strokes of 右, as well as 疒
L中 centreThe vertical stroke, as well as 衤 and the first four strokes of 書 and 盡
M一 oneThe horizontal stroke, as well as the final stroke of 孑 and 刁, the shape 厂, and the shape 工
N弓 bowThe crossbow and the hook
Body parts groupO人 personThe dismemberment, the Kangxi radical 人, the first two strokes of 丘 and 乓, the first two strokes of 知, 攻, and 氣, and the final two strokes of 兆
P心 heartThe Kangxi radical 忄, the second stroke in 心, the last four strokes in 恭, 慕, and 忝, the shape 匕, the shape 七, the penultimate two strokes in 代, and the shape 勹
Q手 handThe Kangxi radical 手
R口 mouthThe Kangxi radical 口
Character shapes groupS尸 corpse匚, the first two strokes of 己, the first stroke of 司 and 刀, the third stroke of 成 and 豕, the first four strokes of 長 and 髟
T廿 twentyTwo vertical strokes connected by a horizontal stroke; the Kangxi radical 艸 when written as 艹 (whether the horizontal stroke is connected or broken)
U山 mountainThree-sided enclosure with an opening on the top
V女 womanA hook to the right, a V shape, the last three strokes in 艮, 衣, and 長
W田 fieldItself, as well as any four-sided enclosure with something inside it, including the first two strokes in 母 and 毋
Y卜 fortune tellingThe 卜 shape and rotated forms, the shape 辶, the first two strokes in 斗
Collision/Difficult key*X重/難 collision/difficult(1) disambiguation of Cangjie code decomposition collisions, (2) code for a "difficult-to-decompose" part
Special character key*Z(See note)Auxiliary code used for entering special characters (no meaning on its own). In most cases, this key combined with other keys will produce Chinese punctuations (such as 。,、,「 」,『 』).
Note: Some variants use Z as a collision key instead of X. In those systems, Z has the name "collision" (重) and X has the name "difficult" (難); but the use of Z as a collision key is neither in the original Cangjie nor used in the current mainstream implementations. In other variants, Z may have the name "user-defined" (造) or some other name.

Zhuyin 입력법

  • Bopomofo 입력법이라고도 한다.
  • 법체 입력시 사용되는 입력법이다.
  • 주음 기호가 각인된 키보드를 통해 발음을 입력한다.
  • 맞지 않는 주음 기호 조합인 경우 입력이 사전에 차단된다.
  • wiki::Zhuyin table로 주음 기호를 병음기호로 변경가능 해 보인다.
  • Pynyin입력 모듈을 재사용 할 수 있겠다.

획 입력법

  • 필기구로 글자를 쓸 때처럼 5가지의 획을 순서대로 입력한다.
  • 해당 글자의 모든 획을 다 입력하지 않아도 글자는 추천된다.
  • 순서대로 입력하지 않으면 추천되지 않는다.
  • 5 종류의 획을 key가 아닌 drawing으로 입력 받으면 handwriting으로 보여질 것 같다.

댓글 2개: