public class HunspellLibrary extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
HunspellLibrary.Hunhandle
This interface is simply here to allow BridJ to maintain type-safety.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MAXWORDUTF8LEN |
| Constructor and Description |
|---|
HunspellLibrary() |
| Modifier and Type | Method and Description |
|---|---|
static int |
Hunspell_add_dic(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<Byte> dpath)
Add dictionary (.dic file only)
|
static int |
Hunspell_add_with_affix(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<Byte> word,
org.bridj.Pointer<Byte> example)
add word to the run-time dictionary with affix flags of the example (a
dictionary word): Hunspell will recognize affixed forms of the new word,
too.
|
static int |
Hunspell_add(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<Byte> word)
add word to the run-time dictionary
|
static int |
Hunspell_analyze(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst,
org.bridj.Pointer<Byte> word)
morphological analysis of the word
|
static org.bridj.Pointer<HunspellLibrary.Hunhandle> |
Hunspell_create_key(org.bridj.Pointer<Byte> affpath,
org.bridj.Pointer<Byte> dpath,
org.bridj.Pointer<Byte> key)
This constructor must be used if the dictionary/affix files were compressed/encrypted
using the Hunspell hzip program.
|
static org.bridj.Pointer<HunspellLibrary.Hunhandle> |
Hunspell_create(org.bridj.Pointer<Byte> affpath,
org.bridj.Pointer<Byte> dpath)
This will instantiate the Hunspell object and return a handle to it.
|
static void |
Hunspell_destroy(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell)
This calls the destructor on the Hunspell object.
|
static void |
Hunspell_free_list(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst,
int n)
free suggestion lists
|
static int |
Hunspell_generate(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst,
org.bridj.Pointer<Byte> word,
org.bridj.Pointer<Byte> word2)
morphological generation by example(s)
|
static int |
Hunspell_generate2(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst,
org.bridj.Pointer<Byte> word,
org.bridj.Pointer<org.bridj.Pointer<Byte>> desc,
int n)
generation by morph.
|
static org.bridj.Pointer<Byte> |
Hunspell_get_dic_encoding(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell)
This retrieves the encoding of the dictionary that the Hunspell instance
was instantiated with.
|
static int |
Hunspell_remove(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<Byte> word)
remove word from the run-time dictionary
|
static int |
Hunspell_spell(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<Byte> word)
spellcheck word
|
static int |
Hunspell_stem(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst,
org.bridj.Pointer<Byte> word)
stemmer function
|
static int |
Hunspell_stem2(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst,
org.bridj.Pointer<org.bridj.Pointer<Byte>> desc,
int n)
get stems from a morph.
|
static int |
Hunspell_suggest(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell,
org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst,
org.bridj.Pointer<Byte> word)
search suggestions
|
public static final int MAXWORDUTF8LEN
public static org.bridj.Pointer<HunspellLibrary.Hunhandle> Hunspell_create(org.bridj.Pointer<Byte> affpath, org.bridj.Pointer<Byte> dpath)
This will instantiate the Hunspell object and return a handle to it.
Original signature :Hunhandle* Hunspell_create(const char*, const char*)affpath - the path to the affix filedpath - the path to the dictionary filepublic static org.bridj.Pointer<HunspellLibrary.Hunhandle> Hunspell_create_key(org.bridj.Pointer<Byte> affpath, org.bridj.Pointer<Byte> dpath, org.bridj.Pointer<Byte> key)
This constructor must be used if the dictionary/affix files were compressed/encrypted using the Hunspell hzip program.
Original signature :Hunhandle* Hunspell_create_key(const char*, const char*, const char*)
affpath - the path to the affix filedpath - the path to the dictionary filekey - the key to decrypt encrypted dictionary filespublic static void Hunspell_destroy(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell)
This calls the destructor on the Hunspell object.
Original signature :void Hunspell_destroy(Hunhandle*)pHunspell - the handle on the hunspell objectpublic static int Hunspell_add_dic(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<Byte> dpath)
Add dictionary (.dic file only)
Original signature :int Hunspell_add_dic(HunHandle*, const char*)pHunspell - the handle on the hunspell objectdpath - The path of the dictionary filepublic static int Hunspell_spell(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<Byte> word)
spellcheck word
Original signature :int Hunspell_spell(Hunhandle*, const char*)pHunspell - the handle on the hunspell objectword - the word to checkpublic static org.bridj.Pointer<Byte> Hunspell_get_dic_encoding(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell)
This retrieves the encoding of the dictionary that the Hunspell instance was instantiated with.
Original signature :char* Hunspell_get_dic_encoding(Hunhandle*)pHunspell - the handle on the hunspell objectpublic static int Hunspell_suggest(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst, org.bridj.Pointer<Byte> word)
search suggestions
Original signature :int Hunspell_suggest(Hunhandle*, char***, const char*)pHunspell - the handle on the hunspell objectslst - an out param used to return the suggestionsword - the bad word that you need suggestions forslstpublic static int Hunspell_analyze(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst, org.bridj.Pointer<Byte> word)
morphological analysis of the word
Original signature :int Hunspell_analyze(Hunhandle*, char***, const char*)pHunspell - the handle on the hunspell objectslst - an out param used to return the analysis of the wordword - the word to analyzeslstpublic static int Hunspell_stem(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst, org.bridj.Pointer<Byte> word)
stemmer function
Original signature :int Hunspell_stem(Hunhandle*, char***, const char*)pHunspell - the handle on the hunspell objectslst - an out param used to return the possible stems of the wordword - the word to stemslstpublic static int Hunspell_stem2(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst, org.bridj.Pointer<org.bridj.Pointer<Byte>> desc, int n)
get stems from a morph. analysis
Original signature :int Hunspell_stem2(Hunhandle*, char***, char**, int)pHunspell - the handle on the hunspell objectslst - an out param used to return the suggestionsdesc - the output from Hunspell_analyze(Pointer, Pointer, Pointer) for the word you want to stemn - the number of results in descslstpublic static int Hunspell_generate(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst, org.bridj.Pointer<Byte> word, org.bridj.Pointer<Byte> word2)
morphological generation by example(s)
Original signature :int Hunspell_generate(Hunhandle*, char***, const char*, const char*)
pHunspell - the handle on the hunspell objectslst - an out param used to return the possible stems of the wordword - the word to generate forword2 - the word to use as an example to generate withslstpublic static int Hunspell_generate2(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst, org.bridj.Pointer<Byte> word, org.bridj.Pointer<org.bridj.Pointer<Byte>> desc, int n)
generation by morph. description(s)
Original signature :int Hunspell_generate2(Hunhandle*, char***, const char*, char**, int)
pHunspell - the handle on the hunspell objectslst - an out param used to return the suggestionsword - the word to generate fromdesc - the output from Hunspell_analyze(Pointer, Pointer, Pointer) for the word you want to use as an example for generationn - the number of results in descslstpublic static int Hunspell_add(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<Byte> word)
add word to the run-time dictionary
Original signature :int Hunspell_add(Hunhandle*, const char*)pHunspell - the handle on the hunspell objectword - the word to add to the runtime dictionarypublic static int Hunspell_add_with_affix(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<Byte> word, org.bridj.Pointer<Byte> example)
add word to the run-time dictionary with affix flags of the example (a dictionary word): Hunspell will recognize affixed forms of the new word, too.
Original signature:int Hunspell_add_with_affix(Hunhandle*, const char*, const char*)
pHunspell - the handle on the hunspell objectword - the word to add to the runtime dictionaryexample - the word to use as an example to figure out which affix flags apply to the added wordpublic static int Hunspell_remove(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<Byte> word)
remove word from the run-time dictionary
Original signature :int Hunspell_remove(Hunhandle*, const char*)pHunspell - the handle on the hunspell objectword - the word to remove from the runtime dictionarypublic static void Hunspell_free_list(org.bridj.Pointer<HunspellLibrary.Hunhandle> pHunspell, org.bridj.Pointer<org.bridj.Pointer<org.bridj.Pointer<Byte>>> slst, int n)
free suggestion lists
Original signature :void Hunspell_free_list(Hunhandle*, char***, int)pHunspell - the handle on the hunspell objectslst - the returned list that you want to clearn - the number of items in the listCopyright © 2012-2016 Atlas Copco Drilling Solutions. All Rights Reserved.