rime / ibus-rime

【中州韻】Rime for Linux/IBus
https://rime.im
GNU General Public License v3.0
734 stars 105 forks source link

wubi table not found #13

Closed sillykelvin closed 8 years ago

sillykelvin commented 8 years ago

My system is Archlinux, I install the package ibus-rime with pacman, and I copied the following files:

cp /usr/share/rime-data/wubi86.dict.yaml ~/.config/ibus/rime/
cp /usr/share/rime-data/wubi86.schema.yaml ~/.config/ibus/rime/

Also, I added - schema: wubi86 to schema_list in default.yaml, however, when I choose wubi input, I cannot type any Chinese character, and I find the following errors in /tmp/rime.ibus.ERROR:

E1224 11:30:41.592962   396 mapped_file.cc:112] attempt to open non-existent file '/home/xxx/.config/ibus/rime/wubi86.table.bin'.
E1224 11:30:41.593025   396 table.cc:326] Error opening table file '/home/xxx/.config/ibus/rime/wubi86.table.bin'.
E1224 11:30:41.593032   396 dictionary.cc:266] Error loading table for dictionary 'wubi86'.
E1224 11:30:41.594399   396 mapped_file.cc:112] attempt to open non-existent file '/home/xxx/.config/ibus/rime/wubi86.reverse.bin'.
E1224 11:30:41.594408   396 reverse_lookup_dictionary.cc:43] Error opening reversedb '/home/xxx/.config/ibus/rime/wubi86.reverse.bin'

It complains that the table cannot be found, I searched /usr/share/rime-data/ and other related places, and cannot find such files.

Any ideas?

Thanks, Kelvin

sillykelvin commented 8 years ago

I guess I need to configure wubi86.dict.yaml as my dictionary, but I have no idea how to do this...

osfans commented 8 years ago

執行這個看看: rime_deployer --build ~/.config/ibus/rime /usr/share/rime-data/

sillykelvin commented 8 years ago

Yeah, thanks for your great help! After this command, the required binary files are created! and after restart ibus I can use wubi now!

Really appreciate your help, 谢谢!

lotem commented 8 years ago

In case you missed it, this guide documents the proper way to deploy data: https://github.com/rime/home/wiki/CustomizationGuide#%E9%87%8D%E6%96%B0%E4%BD%88%E7%BD%B2%E7%9A%84%E6%93%8D%E4%BD%9C%E6%96%B9%E6%B3%95

sillykelvin commented 8 years ago

Thanks for your great help, I have read the wiki pages, I just cannot figure out how to generate the bin files...

After that, I tried several times, and figured out that if I put the new schema in default.yaml, nothing happens if I restart ibus, but if I put it in default.custom.yaml and delete default.yaml, after ibus restarted, the bin files are automatically generated. I thought that there are no difference between the two, but now it seems there is a big difference in the back.

I suggest that we might make it clear in the wiki: modification to default.yaml is STRONGLY NOT recommend, all customizations should go into xxx.custom.yaml.

lotem commented 8 years ago

@kelvinh The point is not where you put your new schema, but whether you delete default.yaml.

The reason why you can do this trick is that on program start, Rime performs a quick test to see if the user copy of default.yaml is the newest version, in order to rebuild data files when Rime itself has been upgraded. But I didn't design this to be the way how users manually deploy data.

I said to delete default.yaml, because when default.yaml is missing, Rime would assume that it's the first time you start Rime, and an initial deployment is needed.

Also, changes to default.custom.yaml happen to update the version number in default.yaml. So when the user enables a new schema via default.custom.yaml, Rime detects this change and acts as if there is an upgrade.

But when you edit default.yaml directly, the program is not able to tell that you've made any changes, because there is no previous copy to compare to.

sillykelvin commented 8 years ago

Okay, thanks for your great explanation, it's clear now, and thanks for your great input method engine!