A new pinyin input method that might be slightly better than sunpinyin

What do I mean when I say “slightly better”?

First of all, thanks to sunpinyin’s open-gram, I can use its data for free. So, on the pinyin side, libime IS using the exact same data from sunpinyin. So what’s the difference?

  1. By default, it learns user input faster (you can do that by tuning sunpinyin option, though).
  2. As a library, it supports multiple dictionary.
  3. It gives you more “candidate phrase” by default.
    I guess I need to explain this a little. So in sunpinyin, many common multiple character words are not represented as a single phrase, but as an ngram. By default, it seems that sunpinyin does not provide enough phrase in such form, while libime will try to provides more ngram phrases as candidates.
  4. It has less bug when you try to modify pinyin in the middle of your input.
  5. Its data file is smaller in size. Thanks to the highly compressed format provided by kenlm.
    $ ls /usr/share/sunpinyin/lm_sc.t3g -lh
    -rw-r–r– 1 root root 38M 3月  23 19:51 /usr/share/sunpinyin/lm_sc.t3g
    $ ls ~/Develop/build/fcitx5/share/libime/sc.lm -lh
    -rw-r–r– 1 saber saber 17M 5月  19 17:59 /home/saber/Develop/build/fcitx5/share/libime/sc.lm
  6. It does not have problem about upgrade dictionary because history stores word directly instead of word id, which may be a problem across different version of data.

I’m using this new pinyin powered by lining daily right now. It just simply “feels” slightly better.

For those who interested: https://github.com/fcitx/libime

Also, FAQ:

– Will I have this with fcitx4 in the future?

No, this is designed to replace the default pinyin and table in fcitx 4 and will only be used for fcitx 5. If you want you can still work on your own solution for fcitx 4.

– How can I use it now?

Build fcitx5 and fcitx5-chinese-addons, you’ll need fcitx5-gtk and fcitx5-qt too, however, I never tried to clean up the optional dependency for it because it’s not the main task right now. So you probably need to have/build everything in dependency. Especially, xcb-imdkit needs to be built. Also please aware that UI of fcitx 5 is still in an extremely poor state. Also you’ll needi to write a config file manually and place it under ~/.config/fcitx5/profile .

[Profile]
# CurrentGroup
CurrentGroup=Default

[Profile/GroupOrder]
0=Default

[Profile/Groups/0]
# Default Input Method
DefaultIM=pinyin
# Layout
Default Layout=us
# Group Name
Name=Default

[Profile/Groups/0/Items/1]
# Layout
Layout=
# Name
Name=pinyin

[Profile/Groups/0/Items/0]
# Layout
Layout=
# Name
Name=keyboard-us

 

This entry was posted in fcitx development and tagged , . Bookmark the permalink.

One Response to A new pinyin input method that might be slightly better than sunpinyin

  1. Pingback: 尝鲜可能比 sunpinyin 好一点的新拼音输入法 | Felix's Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).