[libvoikko] Grammar checkers, hyphenators and libreoffice-voikko
Harri Pitkänen
hatapitk at iki.fi
Thu Oct 10 20:19:37 EEST 2013
Using the latest sources for libvoikko and libreoffice-voikko you should now
be able to use grammar checkers made for different languages in LibreOffice
without changing the language code to "fi". Previously this only worked for
spellers. I made the same improvement for hyphenators as well although right
now we only have a hyphenator for Finnish.
You can also use voikkospell to list the supported capabilities for different
languages:
$ voikkospell -L
spell:en
spell:fi
spell:mhr
spell:sma
spell:tt
hyphen:fi
grammar:fi
This listing should match the view LibreOffice has about language tools
available through Voikko.
Note that there is one corner case issue that can show up on developer systems
but not likely on end user systems. If you have multiple dictionary variants
for some languages and they support different capabilities it is possible that
LibreOffice ends up using a variant that does not have the requested
capability. The variant is of course not selected randomly. The one that is
selected in the preferences will be used.
In order to implement this new API some changes were made to dictionary
loaders. There is a new class called BackendProperties that holds three
properties. Name and path of the backend existed already before as attributes
of the Dictionary object. The third property is a boolean property
isAdvertised which can be used to specify if the backend should be advertised
in the list of supported capabilities. Usually this property is false for null
backends and true for "real" backends.
Harri
More information about the Libvoikko
mailing list