Self-made Linux Pinyin Wubi input method

  

Recently worked in linux, using ubuntu version of linux. All kinds of work can be carried out, the scim input method under ubuntu is very good, comes with five pens, pinyin and other input methods. However, in the previous windows system, it has been using the universal five strokes or the extreme five strokes. The most convenient place for the Universal Wubi is that you can use the Pinyin input method directly when you encounter a word that you can't hit, without switching to the Pinyin input method. Now there are no such functions in the scim of linux under linux. Every time you encounter a word that you can't hit, you have to switch to the pinyin input method to type, which is very troublesome. I also searched online for a long time and did not find the ideal input method. I remembered that I had done the peninsula five under Windows a few years ago, I think it should be possible under Linux. I tried it and I finally got it.

The home page must have pinyin and five strokes of the input code table

one, pinyin code table

1, under the windows system

I use the full under windows The code table, because I did not find the code table of the intelligent ABC pinyin, I had to use the full block code table. It is not difficult to get the full-code table of windows, which can be done by the code table generator that comes with windows. Run the IMEGEN.EXE program to reverse convert WINPY.MB to a winpy.txt file. This gives the pinyin code table file. This is just a code table file in windows format. If you want to be used by scim, you need to convert it to scim format.

2, under the Linux system

The mb2scim tool can be used to convert the winpy.txt file into a scim format code table file. Download address: http://down.csdn.net/html/2006-09/21/159348.html

After unpacking the mb2scim tool, go to mb2scim and execute the following command: chmod +x mb2scim. Set mb2scim as an executable.

Then execute: ./mb2scim WINPY.TXT winpyx.txt. This will get the pinyin code table file winpyx.txt that supports the scim format.


Two or five code table

It is very simple to get a five-chart file, just convert the five-code table in the scim. Go to the directory where the SCIM code table is stored: /usr/share/scim/tables and execute scim-make-table Wubi.bin -o Wubi.txt. In this way, the inverse five-stroke code table is obtained.

Three, merge code table file

Open gypsy code table file winpyx.txt and Wubi code file Wubi.txt with gedit under Linux, integrate the contents of winpyx.txt into In the Wubi.txt file.

In the winpyx.txt file:

BEGIN_CHAR_PROMPTS_DEFINITION .... What to copy... END_CHAR_PROMPTS_DEFINITIO

Copy the contents to this area of ​​Wubi.txt and put it in front of the line END_CHAR_PROMPTS_DEFINITIO . In the winpyx.txt file, the code table square area:

BEGIN_TABLE .... the content to be copied... END_TABLE

is copied to this area of ​​Wubi.txt, it is recommended to put it in the END_TABLE line. front.

Fourth, re-edit the value of the UUID of the Wubi.txt file

Execute in the terminal: uuidgen. You will get a text string that will replace the value of the UUID in the Wubi.txt file. Please change the value of MAX_KEY_LENGTH to 12, which turns out to be 4. If you change it, you can type more words.

V. Modifying the input name and icon

You can change the ICON, NAME, NAME.zh_CN values ​​to the name you want.

Six, generate scim input method executable code table file

Complete the above five processes, your Pinyin Wubi input method is basically completed. This time it will be executed: scim-make-table Wubi.txt -b -o /usr/share/scim/tables/XWubi.bin. The Pinyin Wubi input method was generated. Restart x-window, try it out, there is one more input in the system that can input five strokes, or you can input the pinyin five-stroke input method.

Copyright © Windows knowledge All Rights Reserved