Introducing ibus-cangjie

Hong Kong people write (mostly) Traditional Chinese. On a computer, most of them use the Cangjie and Quick input methods.

In the IBus platform, these were implemented through ibus-table, with dedicated tables.

Unfortunately, this led to a suboptimal user experience for Cangjie and Quick, and as a result Hong Kong people have been turning themselves to other input method frameworks like GCIN or SCIM.

This is a problem for GNOME (starting with version 3.6), because GNOME integrates IBus out of the box. What this means is that Hong Kong people cannot have an excellent user experience on GNOME out of the box, because they need to choose between a rock and a hard place:

  • using a poor implementation of Cangjie and Quick, provided by ibus-table
  • spending time fiddling with their system and installing non-default components to end up with a better inputting experience, but not properly integrated with the rest of the OS

I love GNOME, and I want Hong Kong people to love it too. And for that, GNOME (through IBus), needs a first class user experience for Cangjie and Quick.

That's what we set out to achieve with Wan Leung Wong a couple of months ago, and the result is ibus-cangjie, a dedicated IBus engine for Cangjie and Quick.

Wan Leung has been writing libcangjie, a low-level library to handle the complex mappings between English letters and Chinese characters, as defined by the Cangjie and Quick input methods.

At the same time, I've been wrapping that in a Python cangjie module, which is then reused in ibus-cangjie.

We're not yet to a point where we can get it included in Linux distributions and used by all, but I think we recently reached that sweet moment where we can be confident enough to announce it publicly. Consider this our call for testing and wider contribution. (or our Christmas / New Year gift, if you celebrate these :-) )

Given the target audience of this announcement, here are a couple of technical highlights first:

  • libcangjie is a native library written in C++, as the goal was to be as portable as possible. We absolutely want other platforms to reuse libcangjie and help us improve it, be it on other OSes than Linux or with engines for other input method frameworks
  • both cangjie and ibus-cangjie are full Python 3 modules. I tried to keep compatibility with Python 2 for some time, but it became too hard to do so I dropped it. I'll accept patches to restore it, as long as it's not at the expense of the Python 3 code.
  • I wrote above that we started ibus-cangjie to make GNOME a great desktop for Hong Kong people, and our current focus is on GNOME integration, but that's only because we use GNOME ourselves. If you use another desktop and want to help us get ibus-cangjie in tip-top shape for it, we will gladly welcome your patches!

But that's all boring behind-the-scenes details, what about the user-facing features?

At the moment, here's what ibus-cangjie can do:

  • input Traditional Chinese (by default, but we have an option to also input Simplified Chinese) with Cangjie, both in its versions 3 and 5
  • provide a user experience which is more in line with what users expect of the Cangjie input method which, we believe, is better than what ibus-table could offer.

That's not bad, but it's obviously not enough. Here's what's known to be missing, and on what we'll be hard at work:

  • input with Quick is still completely missing (this will be my number one priority from now on, any help is of course welcome)
  • wildcard support for Cangjie is missing (it needs to go in libcangjie, and is a pre-requisite for implementing Quick)
  • we need an icon for the settings application
  • we need a way to let the user input full- and half-width punctuation and numbers
  • we need to make a kickass ordering of candidates, so that the most frequently used are always on the first page (right now, stuff is ordered alphabetically by the input sequence, which is just terrible)
  • we want to provide adaptive ordering of candidates, based on some fancy frecency algorithm (in option, the default will be the static ordering)
  • we want to allow suggestions for "next possible characters" based on the whole sentence

That's our plan, and we're hoping you will help us move things forward so that GNOME (or your favourite desktop using IBus) finally becomes a compelling operating system for Hong Kong people.

Cangjie should be in a testable state at the moment, so your general testing, as well as specific feedback on the user experience will be warmly welcome.

If you can help us with the code, get to the GitHub pages and hack away. Alternatively, if you're in Hong Kong, I'll be organizing a workshop/hackfest on ibus-cangjie in the next few weeks.

Finally, if you want to talk to us, hop on #linux-hk on Freenode, or join the Hong Kong Linux User Group mailing-list. We don't have dedicated communication media at the moment, so we'll use these for now.