MZhengma

/ 灵感, 编程, lisp, racket, english

Recently I had hacked the Zhengma method to make it more practical for people to input Chinese characters: https://github.com/yanyingwang/mzhengma.

Why do I do this

A day back to after I realize that Chinese is more suitable than English to be the interface for humans to use programming languages, I started to conceive the Ming Programming Language.

If I am right about this, then people who don’t know a single Chinese character should also be possible to use the Chinese language interface to operate the Ming programming language.

Then there comes a question: if they want to use the Ming programing language, should they learn Chinese first?

Yes, they should. But not in a common way. I conceive they don’t need to learn how to listen and speak Chinese, they should just focus on Reading and Writing.

Why is that? Because the Speaking of Chinese has nearly nothing to do with Writing, those two parts can be looked at as two individual systems of Chinese, and not to mention that Writing far outweigh Listening in Chinese.

If you by any chance have seen Japanese characters, the fact is to some degree, the Japanese people were ignoring the speaking of Chinese characters along with borrowing Chinese characters and connotations. And besides, what you might not know is a long time ago, Korean were speaking their own language, while at the same time, some of them had gained the ability to write letters using Chinese characters to communicate with Chinese people with knowing nothing about the pronunciations of these characters.

Nowadays, fortunately, there already are some input methods for people to ignore the pronunciation of Chinese characters and just directly use the English letters as the standings for partitions of Chinese characters to constitute the Chinese character they wanted and input it.

Zhengma(郑码) method is one kind of those method. For those people who have heard of Wibi but not Zhengma, it’s good for you to know that they are very similar things except Zhengma is more powerful to work with a larger set of Chinese characters.

But for practical usage, Zhengma has a vital disadvantage comparing to Wubi, which is the partitions of characters are sorted by alphabet, not by their positions in keyboard, this has made it unintuitive to use. So I change the orders as a new searching DB for the Zhengma input method.

How do I do this

The procedure is fair easy, read in the original searching DB of Zhengma line by line, each line has an English word code and a corresponding Chinese character. For the code, transform each letter of it into numbers by seeing A as 01, B as 02, C as 03, and so forth.

For the keyboard:

Q- W- E- R-  +T Y+  U- I- O- P-
A- S- D- F-  +G H+  J- K- L- ;:
Z- X- C- V-  +B N+  M- .< .> /?

we want the orders of Zhengma to be like below:

18 17 16 15  14 19  20 21 22 23
04 03 02 01  13 09  10 11 12 ;:
08 07 06 05  24 25  26 .< .> /?

So now we have seen the mapping like this: A is 04, S is 03, D is 02, F is 01, and so forth like this we can transform the numbers we transformed before back to letters.