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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
Hunspell_add(com.sun.jna.Pointer pHunspell, byte[] word)
Add a word to the run-time dictionary.com.sun.jna.Pointer
Hunspell_create(java.lang.String affpath, java.lang.String dpath)
Create the hunspell instancevoid
Hunspell_destroy(com.sun.jna.Pointer pHunspell)
Destroy him my robots...java.lang.String
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 Detail
-
Hunspell_create
com.sun.jna.Pointer Hunspell_create(java.lang.String affpath, java.lang.String dpath)
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
java.lang.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_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.
-
-