[libvoikko] Libvoikko compiled for Android

Flammie Pirinen flammie at iki.fi
Mon Aug 13 13:19:09 EEST 2012

2012-08-06, Harri Pitkänen sanoi:
> 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?

It is relatively trivial, I'll see what I can do to it now (I thought I
already made it so, tbh).

One thing to note though, the read_legacy code had even less error and
exception checking than zhfst one, so it'll segfault on all stranger
conditions, but this should be easy to avoid by test running all
dictionary packages (and easy to implement more properly, if I had

> 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.

Yeah, and I'd reckon that lots of zhfst benefits are towards
traditional platforms, e.g. it'd be very simple to bind zhfst suffix
and filetype to a very simple zhfst-installer gui, to have clickable
dictionaries/URLs/autodiscovery etc., and this doesn't seem to apply for
android dictionaries with different installation and autoupdate
approach (from play market?).

Also, I think it should also be possible to just upgrade zhfst's into
vfst's for android and work with that. Even though most android 4
devices will already be more powerful than the minilaptop I'm using now
with zhfst dictionaries, the lower memory foot print and all is very
much appreciated in mobile devices. It'd be very nice to have vfst as
one of the backends in libhfst, even if just for write-only support.

Flammie, computer scientist bachelor, linguist master, free software
Finnish localiser, and more! <http://www.iki.fi/flammie/>

More information about the Libvoikko mailing list