[libvoikko] VoikkoSpellService + hfst questions

Harri Pitkänen hatapitk at iki.fi
Thu Sep 8 17:45:38 EEST 2011

On Thursday 08 September 2011, Sjur Moshagen wrote:
> In ALL these cases the system preferences (Language & text > Text > Speller
> langauges > Setup) did display one and only one language - Suomi - which I
> assume is the Malaga-based ones. This is true also in the case where I
> deleted ALL languages. It STILL listed Suomi (Voikko) (in parallel to
> Suomi (Soikko)) as the one and only Voikko language, even thoug there
> should be no such language to my knowledge.

This is because VoikkoSpellService does not query libvoikko for available 
languages. It just assumes that Finnish (but nothing else) is available.

As I wrote on Monday, among the publicly available frontends so far only 
OOo/LibreOffice take advantage of support for multiple languages in libvoikko. 
For anything else you still need to resort to the old hack: modify voikko-
fi_FI.pro and change

  info: Language-Code: se


  info: Language-Code: fi_FI

We need to update the application support but for me it is more important to 
first get at least one non-Finnish dictionary to releasable state, integrate 
it into our automated tests and promote the necessary backend code from 
experimental to production state.

In case others (Marko for example) wish to start working on the application 
code: What is needed in VoikkoSpellService and mozvoikko is a lazily 
initialized pool of handles for each supported language and some calls to 
voikko_list_dicts, voikko_dict_language and voikko_free_dicts to query for the 
available dictionaries. SVN /trunk/ooovoikko/src/VoikkoHandlePool.cxx is an 
example of a pool implementation. For VoikkoSpellService and mozvoikko 
something slightly simpler will do since I believe they don't offer any on-
the-fly configuration capabilities for spell checking. In other words, there 
is some but not too much work needed to support this.

Updating Enchant should be easier since it comes with its own speller pool 


More information about the Libvoikko mailing list