Introducing spellchecking support for TextView widget in Java-gnome

I was working on spellcheckers in Linux for quite a long time. My interest comes from another project that I’m involved in,  Zemberek, a Turkish NLP library which also includes a spellchecker. For Linux part, I was involved in developing its DBus interface as well as porting Enchant plugin to this new interface. I’m also maintaining Gentoo ebuilds for Zemberek packages and helping with Enchant package.

As a result, I gained experience with spellcheckers. At first, I started investigating GtkSpell to add bindings for Java, but I was unable to created usable .defs file from the headers. And after investigating Python bindings and seeing that it was hand-written, I examined another possibility, LibSexy. I started implementing LibSexy Java bindings which is still not complete. And main motivation was SexySpellEntry included in the library. I unfortunately hit a bug with text segmentation with it along with another bug causing a critical error (which ends up in an unchecked Exception in Java) which occurs in GtkSpell as well. (See Gentoo bugs #270179 and #270177) Anyway, later on Andrew helped to start-up the GtkSpell coverage with hand-crafted .defs file.

After a few weeks of development spelling branch is now merged to mainline which will make its way into 4.0.12 release. During the development I discovered that GtkSpell has a fallback mechanism for language of the spellchecker. The order is

  • lang peremeter passed to functions
  • LANG environment variable
  • English if none of the above is set.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: