[libvoikko] Voikko and upcoming changes to Firefox extensions

Henri Sivonen hsivonen at hsivonen.fi
Wed Mar 29 10:00:02 EEST 2017


On Wed, Mar 29, 2017 at 6:57 AM, Andris Pavenis <andris.pavenis at iki.fi> wrote:
> I guess the best could be change Firefox to use enchant.

How would using Enchant improve things compared to using Voikko
directly besides providing access to the macOS system spell checking
functionality (on Mac)?

Compared to supporting both Hunspell and Voikko directly, Enchant
seems to provide access to legacy spell checkers (aspell and ispell),
access to macOS system spell checking service, and access to spell
checkers specific to Hebrew, Yiddish, and Turkish. Firefox already has
Hunspell dictionaries for Hebrew, Yiddish and Turkish, and at least
the Hebrew one seems to originate from the Hebrew-specific spell
checker that Enchant supports.

What's the quality difference between using Hunspell for Hebrew,
Yiddish and Turkish compared to using the language-specific back ends
that Enchant can support?

As for having a general framework, I did a Google search for
mozISpellCheckingEngine excluding mozilla.org and inspected all the
results (the initial result page suggests that there are a lot of
hits, but there are actually only 5 pages of results) and I did a
search of the code of all the add-ons hosted on addons.mozilla.org
(search interface not publicly available). Based on the results, it
turns out that there exists only three implementations of the
mozISpellCheckingEngine: the one within the Firefox code base for the
Mozilla fork of Hunspell and two libvoikko-based ones (for Finnish and
Greenlandic). This is why I think it makes sense to consider
interfacing with libvoikko directly instead of adding yet another
abstraction layer.

There's also the issue of Linux versus Windows and Mac. On Linux,
libvoikko is an optional system library, so if the licensing works
out, Firefox could dlopen() libvoikko at runtime like it currently
does with PulseAudio, and Mozilla wouldn't need to worry about how
Linux users obtain libvoikko or the dictionaries that libvoikko can
use. This would still leave the problem of Windows and Mac.

After mozISpellCheckingEngine was created, the set of languages
supported by macOS's built-in spell checking service has expanded well
beyond the extremely limited original set. Windows also added a system
spell checking service in Windows 8. I don't know if the Apple and
Microsoft-provided system services support Finnish or Greenlandic (the
two libvoikko languages that currently are supported in Firefox via
XPCOM extensions) or if they do a good job spell checking them. But
even if they did and Firefox added support for macOS and Windows
system spell checkers, it would still leave Windows 7.

How would users of Windows 7 continue to use Finnish or Greenlandic
spell checking in Firefox? Even if Firefox bundled Enchant, the
question of how the users would obtain the actual back end would
remain the same as in the case where Firefox got the code to open
libvoikko itself as a shared library but nothing more than that.

-- 
Henri Sivonen
hsivonen at hsivonen.fi
https://hsivonen.fi/


More information about the Libvoikko mailing list