Class Hunspell


  • public class Hunspell
    extends Object
    A spell checker based on Hunspell dictionaries. This class can be used in place of native Hunspell for many languages for spell-checking and suggesting purposes. Note that not all languages are supported yet. For example:
    • Hungarian (as it doesn't only rely on dictionaries, but has some logic directly in the source code
    • Languages with Unicode characters outside of the Basic Multilingual Plane
    • PHONE affix file option for suggestions

    The objects of this class are thread-safe.

    • Constructor Detail

      • Hunspell

        public Hunspell​(Dictionary dictionary)
      • Hunspell

        public Hunspell​(Dictionary dictionary,
                        TimeoutPolicy policy,
                        Runnable checkCanceled)
        Parameters:
        policy - a strategy determining what to do when API calls take too much time
        checkCanceled - an object that's periodically called, allowing to interrupt spell-checking or suggestion generation by throwing an exception