[libvoikko] Lttoolbox - libvoikko backend integration issues?

Harri Pitkänen hatapitk at iki.fi
Sat Mar 27 18:01:22 EET 2010


Hi and welcome to this list!

On Saturday 27 March 2010, David Cheah wrote:
> Are there any other issues with the integration that might need fixing?

Those are the most important and suitable for GSOC project but there are other 
things too that must be done before Lttoolbox spellers could be used in 
production. We need to extend the libvoikko API to allow choosing the language 
to use spell checking and then change OpenOffice.org and Mozilla plug-ins to 
support multiple languages.

The first part (extending the API) is something I indent to do myself within 
the next few months. I have already planned the technical aspects of this 
change and it is not really much work anyway. Therefore I left it out from the 
GSOC wiki page. For now you need to use Finnish as the document language in 
OpenOffice.org if you test the spellers.

Fixing OpenOffice.org and Mozilla plug-ins is something you could do if you 
want to. I did not mention those in the Wiki either because coding at least 
OpenOffice.org extensions in C++ is quite painful and learning to work with 
the SDK might easily take too much time. 

> Or
> perhaps are there any known issues with trying to get the software to work
> in Windows 7/Vista? (my current dev platform)

Which compiler do you want to use? With GCC there are no known problems but 
the resulting library is not fully compatible with some applications, most 
notably OpenOffice.org.

Using MSVC gives you more compatible library but the MSVC build system is not 
up to date with the latest changes and it does not support conditional 
compilation of Lttoolbox analyzer. So the first thing you should do is to 
check out the sources from SVN

  https://voikko.svn.sourceforge.net/svnroot/voikko/trunk/libvoikko

open libvoikko.vcproj and try to build the library. It will most likely fail 
because new source files have been added that are not yet listed in the 
.vcproj file. Add the missing files (and remove any that are no longer 
present) and see if the library builds when support for Lttoolbox is not yet 
configured.

After that you need to add a switch that can be used to enalble Lttoolbox 
support. The switch should
 - Define macro HAVE_LTTOOLBOX when compiling all source files
 - Add src/morphology/LttoolboxAnalyzer.cpp to the set of files to compile and
   link to the library.
 - Dynamically link the resulting libvoikko dll against Lttoolbox dll. I guess
   static linking might be OK as well.

And one thing I forgot is that if you use MSVC then you need to manually run 
this command to generate one source file:

python src/autocorrect/triecompiler.py data/autocorrect/fi_FI.xml 
src/autocorrect/data.hpp

It is needed for grammar checker and it's not really relevant for Lttoolbox 
integration. But the grammar checker cannot be disabled so you need to build 
this for now.


Another issue is that nobody has ever run the complete test suite on Windows. 
If you need to do development in the backend independent parts of the source 
then you need to be able to have the tests passing. There are no instructions 
in English for setting up the test environment but I can write those if this 
becomes necessary.

It may very well be that the only source files you need to modify are 
src/morphology/LttoolboxAnalyzer.{hpp,cpp}. In that case you don't necessarily 
need to be able to run the full test suite at all. Tests for Lttoolbox 
integration are in python/ApertiumIcelandicTest.py and it will be sufficient 
to add new test cases there and make sure they pass.

Harri



More information about the Libvoikko mailing list