Interface HunspellLibrary

  • All Superinterfaces:
    com.sun.jna.Library

    public interface HunspellLibrary
    extends com.sun.jna.Library
    Functions from $hunspell/src/hunspell/hunspell.h The Hunspell java bindings are licensed under the same terms as Hunspell itself (GPL/LGPL/MPL tri-license), see the file COPYING.txt in the root of the distribution for the exact terms.
    Author:
    Flemming Frandsen (flfr at stibo dot com)
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.jna.Library

        com.sun.jna.Library.Handler
    • Field Summary

      • Fields inherited from interface com.sun.jna.Library

        OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER
    • Method Detail

      • Hunspell_create

        com.sun.jna.Pointer Hunspell_create​(String affpath,
                                            String dpath)
        Create the hunspell instance
        Parameters:
        affpath - The affix file
        dpath - The dictionary file
        Returns:
        The hunspell object
      • Hunspell_destroy

        void Hunspell_destroy​(com.sun.jna.Pointer pHunspell)
        Destroy him my robots...
        Parameters:
        pHunspell - The Hunspell object returned by Hunspell_create
      • Hunspell_spell

        int Hunspell_spell​(com.sun.jna.Pointer pHunspell,
                           byte[] word)
        spell(word) - spellcheck word
        Parameters:
        pHunspell - The Hunspell object returned by Hunspell_create
        word - The word to spellcheck.
        Returns:
        0 = bad word, not 0 = good word
      • Hunspell_get_dic_encoding

        String Hunspell_get_dic_encoding​(com.sun.jna.Pointer pHunspell)
        Get the dictionary encoding
        Parameters:
        pHunspell - : The Hunspell object returned by Hunspell_create
        Returns:
        The encoding name
      • Hunspell_suggest

        int Hunspell_suggest​(com.sun.jna.Pointer pHunspell,
                             com.sun.jna.ptr.PointerByReference slst,
                             byte[] word)
        Search suggestions
        Parameters:
        pHunspell - The Hunspell object returned by Hunspell_create
        slst - input: pointer to an array of strings pointer and the (bad) word array of strings pointer (here *slst) may not be initialized output: number of suggestions in string array, and suggestions in a newly allocated array of strings (*slts will be NULL when number of suggestion equals 0.)
        word - The word to offer suggestions for.
      • Hunspell_add

        int Hunspell_add​(com.sun.jna.Pointer pHunspell,
                         byte[] word)
        Add a word to the run-time dictionary.
        Parameters:
        pHunspell - The Hunspell object returned by Hunspell_create
        word - The word added to the runtime dictionary.