Article Title: Create a five-character PinYin Input Method in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I have been working in linux recently and use ubuntu linux. All work can be done. The scim input method under ubuntu is very good, and it comes with five input methods, such as pinyin. However, in the past, windows systems used or strokes. The most convenient part of the five strokes is that you can directly use the Pinyin input method when you encounter words that do not need to be played, instead of switching to the Pinyin input method. Currently, scim in linux does not have this function in five strokes. It is very troublesome to switch to the Pinyin Input Method for typing any words that cannot be typed. I have been searching for the Internet for a long time and have not found the ideal input method. I remembered that I had made five pinyin scripts for windows a few years ago. I think it should be fine for linux. I tried to make it and finally I can use it.
The homepage must have a Pinyin and five input methods.
I. Pinyin code table
1. In windows
I used the full spelling code table in windows, because I did not find the intelligent ABC pinyin code table, so I had to use the full spelling code table. It is not difficult to obtain the full-dataset for windows. You can use the built-in Code Generator for windows. Run the IMEGEN. EXE program and convert WINPY. MB to the winpy.txt file. In this way, the pinyin code table file is obtained. This is only a code table file in windows format. If you want to use scim, you also need to convert it to scim format.
2. in linux
You can use the mb2scim tool to convert the winpy.txt file into a code table file in scim format. : Http://down.csdn.net/html/2006-09/21/159348.html
After unlocking the mb2scim tool, go to mb2scim and execute the following command: chmod + x mb2scim. Set mb2scim to an executable file.
Then run:./mb2scim WINPY. TXT winpyx.txt. In this case, winpyx.txt is supported in scimformat.
Ii. Five code tables
It is easy to get the five code tables. You just need to convert the five code tables in scim. Go to the directory where the SCIM code table is stored:/usr/share/scim/tables, and run scim-make-table Wubi. bin-o Wubi.txt. In this way, we can get the five-stroke code table after the inverse conversion.
3. Merge code table files
In linux, use geditto separate the winpyx.txt and wubi.txt files of the pinyin table and combine the content in winpyx.txt into the wubi.txt file.
In the winpyx.txt file:
BEGIN_CHAR_PROMPTS_DEFINITION... content to be copied... END_CHAR_PROMPTS_DEFINITIO
|
Copy the content to the region of wubi.txt. We recommend that you put it in front of the END_CHAR_PROMPTS_DEFINITIO line. Set the square area of the code table in the winpyx.txt file:
BEGIN_TABLE... content to be copied... END_TABLE
|
The content is copied to the region of wubi.txt. We recommend that you put it in front of the END_TABLE row.
Modify the UUID value of wubi.txt.
Run uuidgen on the terminal. Replace the string with the uuid value in the wubi.txt file. Change the value of MAX_KEY_LENGTH to 12, which is 4. After modification, you can enter multiple words.
5. Modify the input name and icon
You can change the ICON, NAME, and NAME. zh_CN values to the names you want.
6. Generate the scim Input Method executable code table File
After completing the above five processes, your pinyin five-stroke input method is basically complete. In this case, run scim-make-table Wubi.txt-B-o/usr/share/scim/tables/XWubi. bin. The pinyin five-stroke input method is generated. Restart x-window and try it. There is one more five input methods in the system, or five input methods for pinyin.