xiuzheng (zhengma revised) is a shape-based input method based on zhengma. those not already familiar with zhengma would do well to look first at the guides linked at the bottom of this page. those not familiar with rime will need to look up a guide to install it and add a new schema.
xiuzheng’s design goals are as follows:
- xiuzheng should be fast for a skilled typist.
- like zhengma, it uses a maximum of 4 keys/char, fewer keystrokes than its better-known rival cangjie @ 5 keys/char.
- because of its many briefs for common phrases, it requires fewer keystrokes than the best pinyin IME (viz. double pinyin with tones @ 3 keys/char).
- it aims to match the english average rate of 4.79 letters/word, although this has not yet been measured.
- xiuzheng should be low-ambiguity and suitable for blind typing through muscle memory without producing errors.
- phonetic input methods (pinyin/zhuyin) depend on a feedback loop in which the user stops typing to look at a list of word matches and choose the one they intend. this is often acceptable to people who don’t know any better, as long as they can type full phrases and rely on the software to predict what word they want based on context. however, it is much slower and more error-prone than touch-typing a language like english in phonetic script, where the user can build muscle memory and trust that what you type is what you get.
- like zhengma and cangjie, xiuzheng makes all commonly-used single characters touch-typable, because you type the character shape, not the sound.
- unlike zhengma and cangjie, xiuzheng also makes commonly-used words and phrases touch-typable, by assigning them low-ambiguity shortcuts.
- xiuzheng should be intuitive.
- like in zhengma and unlike cangjie, the method to type a character is predictable based on the stroke order for writing it.
- xiuzheng should be familiar and easy to adjust to for existing users of zhengma, because it retains the same 4-key character codes and makes shortcuts more predictable.
- xiuzheng should support multiple regions and languages.
- like zhengma and cangjie, the low ambiguity of xiuzheng is suited to typing classical chinese.
- unlike zhengma, xiuzheng provides separate word-dictionaries for traditional and simplified characters, so that you don’t have to choose from a suggestion list to avoid typing the simplified version of a word.
- in the hope of enabling some of the same stylistic freedom available in handwriting, some common variant characters are supported: 臺/台、對/対、個/亇、第/㐧、聽/咡、點/奌,etc.
- in future, i would like to produce dictionaries for east asian languages besides mandarin, but i am not as familiar with those and will need to go about it carefully.
this is a new project, and i am very open to comments or suggestions for refining the system.
xiuzheng retains zhengma’s original system of character decomposition and 4-key character codes, but alters the system of briefs for typing the most commonly-used characters and long words.
the original version of zhengma assigns long words to 4-key codes, resulting in many collisions between different dictionary entries.
by my calculations, if you were to type the dictionary with your eyes closed using zhengma, unable to choose the correct list from the suggestion dropdown, you would get at least 44% of words wrong.
by using longer codes for longer words, xiuzheng reduces this error rate to ~6%.
to compensate for the use of longer codes, many common words are also assigned shortcuts: unt 為什麼、 ae 一直、 jc 嗎,etc.
here, CamelCase is used to indicate different roots.
thus the root 女 is written Zm, the root 生 is written Mc, and the sequence of roots for 姓 is ZmMc.
in practice, everything is typed in lowercase.
examples:
| phrase | zhengma code | xiuzheng code |
| 姓 | ZmMc | ZmMc |
| 女生 | ZmMc | ZmMcV |
| 報導 | BUWU | BW, BYXWUN |
| 報道 | BUWU | BYXWND |
| 騙子 | CWYa | CWLYa |
| 駝子 | CWYa | CWRYa |
xiuzheng also makes the process for deriving 3-key shortcuts more intuitive, by making them more similar to 4-key long codes. in a 4-key long code, the most important roots are the first, last, and penultimate. zhengma 3-key shortcuts use the first three roots. this is confusing, because second and third codes may not appear in the long code at all. xiuzheng 3-key shortcuts instead retain the first, last, and penultimate.
| character | full code sequence | four-code | zhengma shortcut | xiuzheng shortcut |
| 黨 | KoWwJLkBUo | KoBU | KW(J) | K(B)U |
another benefit to this change is that the combination of first and last codes differentiates characters with less ambiguity than the combination of the first few codes, producing fewer collisions.
| original code | full code | short code | very short code |
|---|---|---|---|
| A | A | A | A |
| Ab | Ab | Ab | Ab |
| ACd | ACd | ACd | AC |
| AbcD | AbcD | AbD | AD |
| AC(d)Ef | ACEf | ACE | AE |
| AbCd | AbCd | AbC | AC |
| AbC(d)E(f) | AbCE | ACE | AE |
| AbcD(e)Fg | AbcF | AbF | AF |
| Ab(Cd)E(f)Gh | AbEG | AEG | AG |
2-char codes may take the forms 2+2+v=5, 2+3=5, 3+2=5, or 3+3=6, meaning the codes are 5–6 characters long. 3-char codes likewise range from 2+2+2=6 to 3+3+3=9 characters long. longer words use only the two keys per character: the first letter of the first root and the first letter of the last root. thus 4 chars × 2 roots = 8 keys, 5 chars × 2 roots = 10 keys, etc.
| # of chars | long code | shortcut |
| 1 | A(B)CD | AD or ACD |
| 2 | AB + CD = ABCDV | AC(V) |
| 2 | AB(C) + DE(F) = AB(C)DE(F) | AD(V) |
| 3 | AB(C) + DE(F) + GH(I) = AB(C)DE(F)GH(I) | ADG |
| 4+ | A(BC)D + E(FG)H + I(JK)L + M(NO)P + … = ADEHILMP… |
it may seem odd that 3-char words take up to 9 keys, while 4-char words only take 8. however, 4-char words are rarer and so can afford shorter codes without becoming ambiguous. 3 chars × 3 keys and 4 chars × 2 keys makes for more intuitive arithmetic than any other option i have experimented with.
| code length | result | example |
| 1 | 1-char word shortcut | l 用 (LdBi) |
| 2 | 1-char full code | ko 小 (Ko) |
| 2 | 1-char word shortcut | pe 針 (PEd) |
| 2 | 2-char word shortcut | pz 所以 (pxp+zso) |
| 3 | 2-char word shortcut + v | gjv 歷史 (gmi+jos+v) |
| 3 | 1-char full code | fka 查 |
| 3 | 1-char word shortcut | wdz 安 (WdZm) |
| 3 | 3-char word shortcut | efi 基本上 (ecb+fa+ida) |
| 4 | 1-char full code | zmmc 姓 (ZmMc) |
| 5 | 2-char word (2+2+v) | zmmcv 女生 (zm+mc+v) |
| 5 | 2-char word (2+3) | kokbd 小時 (ko+kbd) |
| 6 | 2-char word (3+3) | pxpzso 所以 (pxp+zso) |
| 6 | 3-char word (2+2+2) | giaawd 不一定 (gi+aa+wd) |
| 7 | 3-char word (2*2+3) | greckai 尤其是 (gr+ec+kai) |
| 8 | 3-char word (2+2*3) | gdkomocy 大少爺 (gd+kom+ocy) |
| 8 | 4-char word (2+2+2+2) | agchbyrs 天長地久 (ag+ch+by+rs) |
| 9 | 3-char word (3+3+3) | uyunedtzz 為什麼 (uyu+ned+tzz) |
| 10+ | 5+-char word (2×5+) | klnbcbdxja 常任理事國 (kl+nb+cb+dx+ja) |
| A 一 | B 都 | C 長 | D 把 | E 著 |
| F 要 | G 在 | H 到 | I 上 | J 中 |
| K 是 | L 用 | M 我 | N 的 | O 會 |
| P 所 | Q 月 | R 亇 | S 就 | T 次 |
| U 為 | V 沒 | W 這 | X 又 | Y 了 |
| Z 將 |
| A 一 | B 都 | C 长 | D 把 | E 其 |
| F 要 | G 在 | H 到 | I 上 | J 中 |
| K 是 | L 用 | M 我 | N 的 | O 个 |
| P 所 | Q 月 | R 比 | S 就 | T 次 |
| U 为 | V 没 | W 這 | X 对 | Y 了 |
| Z 將 |
| symbols | decomposition | latin hint |
| ㄅ | Ry | b |
| ㄆ | Rs | p |
| ㄇ | Ld | m |
| ㄈ | H | f |
| ㄪ | AYm | v |
| ㄉ | MYd | d |
| ㄊ | Hd | t |
| ㄋ | Y | n |
| ㄌ | MYm | l |
| ㄍ | Zd | g |
| ㄎ | AZ | k |
| ㄫ | Gr | ng |
| ㄏ | Gg | h |
| ㄐ | Zi | j |
| ㄑ | Z | q |
| ㄬ | T | gn |
| ㄒ | AI | x |
| ㄓ | ZiA | zh |
| ㄔ | Oi | ch |
| ㄕ | Xm | sh |
| ㄖ | JdS | r |
| ㄗ | Y | z |
| ㄘ | AZX | c |
| ㄙ | Zs | s |
| ㄚ | UdI | a |
| ㄛ | AIH | o |
| ㄜ | EdH | e |
| ㄝ | EdZ | ie |
| ㄞ | AZM | ai |
| ㄟ | Yda | ei |
| ㄠ | ZZs | ao |
| ㄡ | Xs | ou |
| ㄢ | XZX | an |
| ㄣ | ZX | en |
| ㄤ | Gr | ang |
| ㄥ | Z | eng |
| ㄦ | Nd | er |
| ㄧ | A | yi |
| ㄨ | Os | wu |
| ㄩ | Zi | yu |
| ㄭ | ALi | (z)i |
| ㆠ | RyJ | bb |
| ㆣ | ZdJ | gg |
| ㆢ | ZiJ | jj |
| ㆡ | YJ | zz |
| ㆨ | OsA | ir |
| ㆦ | AIZm | oo |
| ㆤ | YZA | e |
| ㆩ | UdIJ | na |
| ㆧ | AIZmJ | no |
| ㆥ | YZAJ | ne |
| ㆪ | AJ | ni |
| ㆳ | IJ | ni |
| ㆫ | OsJ | nu |
| ㆮ | AZMJ | nai |
| ㆯ | ZZJ | nau |
| ㆰ | UdLdI | am |
| ㆱ | ALdIH | om |
| ㆲ | Bi | ong |
| ㆬ | LdI | m |
| ㆭ | GrI | ng |
| ㆴ | Ry | -p |
| ㆵ | MYd | -t |
| ㆻ | Zd | -k |
| ㆶ | AZ | -k* |
| ㆷ | Gg | -h |
| ㆼ | Zm | gw |
| ㆽ | AZm | kw |
| ㆾ | ZA | eo |
| ㆿ | O | a |
| Ø | k | s | t | n | h | m | y | r | w | |||||||||||
| a | ア | YM | カ | Ym | サ | EdM | タ | Rs | ナ | Gd | ハ | O | マ | YS | ヤ | YI | ラ | AY | ワ | IY |
| i | イ | N | キ | Bi | シ | TdA | チ | MGd | ニ | Bd | ヒ | Rr | ミ | V | リ | Kd | ヰ | Mb | ||
| u | ウ | IIY | ク | R | ス | RsA | ツ | TdM | ヌ | Xs | フ | Y | ム | Zs | ユ | X | ル | Rd | ||
| e | エ | Bi | ケ | MaM | セ | YzA | テ | BdM | ネ | Ws | ヘ | Yda | メ | Xo | レ | Z | ヱ | YIA | ||
| o | オ | DM | コ | X | ソ | Td | ト | Id | ノ | Y | ホ | F | モ | AHd | ヨ | Xb | ロ | J | ヲ | YA |
| n | ン | SA |
- Zhengma practice tool
- Zhengma roots chart by Trotimus on Wikimedia Commons
- Megatron Cookie, “ZHENGMA (郑码): A Brief Introduction for English Speakers” (en)
- Zhengma Input on Wikibooks (en)
- use new word priority list
- detailed installation instructions
- support region-specific decompositions (e.g. 儿
Rdvs 八Oin 空WdRdBi/WdOBi) - mandarin (tc/sc) versions of this page
- rip wiktionary/kaikki for dictionary
- support more obscure variant and vietnamese characters (many had incorrect codes in the old zhengma file and were collectively struck until they can be checked carefully)
- hokkien/hk-canto/vietnamese/japanese support?
- codes for 3-char words vary at 6–9 keys instead of strictly 9. this proves significantly more intuitive.
- added 2 key + v shortcuts for more 2-char words
- added full reverse lookup dictionaries
- fix: words with 用 were not receiving codes
- fix: 同 appeared as
ldajalone butldin words (nowlajin words) - handle terms with latin letters in them: AA 制 =
A+A+MbLiKd=aamlk; CP 值 =C+P+NEdLo=cpnel - codes for roots are demoted to make room for more useful shortcuts (e.g. 有 =
gqso the root for 豕 has to be assignedgqainstead) - some very WIP code for japanese mode
fixed phrase encoder
added simplified chinese
initial release