[libvoikko] Test cases for libvoikko/HFST needed

Krister Lindén krister.linden at helsinki.fi
Tue Jan 19 21:09:12 EET 2010


On Tuesday 19, January 2010, Harri Pitkänen wrote:
> On Tuesday 19 January 2010, Flammie Pirinen wrote:
>> Ah yes, that's one thing that isn't entirely trivial, or at least,
>> ideal solution exceeds my C++ skills. Since HFST is just a bridge-like
>> wrapper over underlying libraries, and currently it includes the
>> external libraries in source tree, and some of the definitions leak to
>> public installed headers of hfst. Easy way out would be to fix
>> underlying libraries from using e.g. deprecated data structures in
>> their respective public interfaces, but I suppose there must be
>> something in the proper bridge etc. design patterns that do the hiding
>> more elegantly without need to modify the external library code.
> 
> I think the correct solution depends on what sort of applications are supposed 
> to use this API. If the applications do not need to know anything about the 
> underlying libraries you can just remove all the functionality that depends on 
> SFST/OpenFST headers and stop including those headers. This is most certainly 
> the case for libvoikko since we basically do only lookups and nothing else.
> 
> If on the other hand HFST is acting as a helper library for applications that 
> need to perform operations with specific backends then including the headers 
> as is done in the current version may be OK. This has serious disadvantages 
> though because then your API and ABI will break whenever any of the underlying 
> libraries changes their API/ABI.

The header problems should, of course, be taken care of and will 
hopefully go away in version 3.0 of the HFST library, which will be a 
more object-oriented revamp of the HFST library API to allow easier 
inclusion of other specialized finite-state libraries into HFST.

However, the dependence on external libraries is only temporary for the 
speller functions. We are developing a specialized stand-alone library 
that will implement the speller functions without external dependences.

--
Krister




More information about the Libvoikko mailing list