[libvoikko] Libvoikko compiled for Android

Harri Pitkänen hatapitk at iki.fi
Mon Aug 6 22:57:44 EEST 2012

On Monday 06 August 2012, Harri Pitkänen wrote:
> On Monday 06 August 2012, Sjur Moshagen wrote:
> > > Only backends that do not require any external libraries (VFST and
> > > Malaga) have been built for now. Supporting other backends is slightly
> > > more complicated but definitely possible. Is anyone interested in
> > > having HFST spellers for Android? This is mostly useful for recent
> > > Androids (4.0 or later) since these have a system spell checker
> > > framework that can be extended with custom implementations.
> > 
> > HFST spellers for Android - what can I say... we couldn't be more happy
> > :)
> Ok, I'll check if it is easy to build hfst-ospell on Android as a part of
> the combined libvoikko binary.

hfst-ospell seems to depend unconditionally on zip and xml libraries that are 
not part of Android and would need to be ported first to make this work. 
That's a bit too much for me right now.

On the other hand it looks like the current code in hfst-ospell and libvoikko 
still supports reading spellers in legacy format (without zip).

Question to those of you who know the code: How hard would it be to change 
hfst-ospell so that all dependencies were optional? If libarchive was disabled 
read_zhfst would just immediately throw hfst_ol::ZHfstZipReadingError. And 
something similar for the XML stuff. Much of that metadata needs to be 
duplicated in AndroidManifest.xml and spellchecker.xml anyway. I know this is 
sort of a step backwards but developing for mobile devices seems to require 
adapting to platform conventions.

I was able to compile hfst-optimized-lookup into libvoikko with only trivial 
changes so the code itself does not seem to have problems.


More information about the Libvoikko mailing list