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.
-
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_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
-
Method Summary
Modifier and TypeMethodDescriptionint
Hunspell_add
(com.sun.jna.Pointer pHunspell, byte[] word) Add a word to the run-time dictionary.com.sun.jna.Pointer
Hunspell_create
(String affpath, String dpath) Create the hunspell instancevoid
Hunspell_destroy
(com.sun.jna.Pointer pHunspell) Destroy him my robots...Hunspell_get_dic_encoding
(com.sun.jna.Pointer pHunspell) Get the dictionary encodingint
Hunspell_spell
(com.sun.jna.Pointer pHunspell, byte[] word) spell(word) - spellcheck wordint
Hunspell_suggest
(com.sun.jna.Pointer pHunspell, com.sun.jna.ptr.PointerByReference slst, byte[] word) Search suggestions
-
Method Details
-
Hunspell_create
Create the hunspell instance- Parameters:
affpath
- The affix filedpath
- 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_createword
- The word to spellcheck.- Returns:
- 0 = bad word, not 0 = good word
-
Hunspell_get_dic_encoding
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_createslst
- 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_createword
- The word added to the runtime dictionary.
-