Spellchecking using Hunspell
| Spell | Spellchecking using Hunspell |
| AddCustomWord | Add a word to a custom dictionary file. |
| GetEncoding | Get dictonary encoding |
| Init | Initialise the spellcheck engine, |
| InitCustom | Add words from a custom dictionary file to the dictionary. |
| PutWord | Add word to dictionary. |
| Spell | Spellcheck word |
| Suggest | Suggest words for word. |
| Unint | Frees the spell object and the memory allocated to the DLL (unless the DLL was loaded outside of this function library). |
| Example | |
| About |
Spell_AddCustomWord( p_CustomDic, p_Word, p_EOL = "`r`n" )
Add a word to a custom dictionary file.
| p_CustomDic | Path to a custom dictionary file. |
| p_Word | Word to add. |
| p_EOL | End-Of-Line (EOL) characters. [Optional] The default is CR+LF. |
TRUE if successful, otherwise FALSE.
Spell_Init( ByRef hSpell, aff, dic, CustomDic = "", DLLPath = "hunspelldll.dll" )
Initialise the spellcheck engine,
| hSpell | Variable that contains the current dictionary information. |
| aff | Path to affinity file. |
| dic | Path to dictionary file. |
| CustomDic | Path to a custom dictionary file [Optional]. |
| DLLPath | Path and file name for the hunspelldll.dll file. [Optional] If not defined, the DLL file must be located in the local folder or in the path. |
Offset Description ------ ----------- 0 Handle to the spell object 4 Handle to the Hunspell DLL library module 8 Address to the hunspell_initialize function 12 Address to the hunspell_uninitialize function 16 Address to the hunspell_spell function 20 Address to the hunspell_suggest function 24 Address to the hunspell_suggest_auto function 28 Address to the hunspell_suggest_free function 32 Address to the hunspell_get_dic_encoding function 36 Address to the hunspell_put_word function -- 40 Total bytes
Spell_InitCustom( ByRef hSpell, p_CustomDic )
Add words from a custom dictionary file to the dictionary. Words are valid until spell object is destroyed.
The number of words loaded to the spell object.
Add a word to a custom dictionary file.
Spell_AddCustomWord( p_CustomDic, p_Word, p_EOL = "`r`n" )
Get dictonary encoding
Spell_GetEncoding( ByRef hSpell )
Initialise the spellcheck engine,
Spell_Init( ByRef hSpell, aff, dic, CustomDic = "", DLLPath = "hunspelldll.dll" )
Add words from a custom dictionary file to the dictionary.
Spell_InitCustom( ByRef hSpell, p_CustomDic )
Add word to dictionary.
Spell_PutWord( ByRef hSpell, word )
Spellcheck word
Spell_Spell( ByRef hSpell, word )
Suggest words for word.
Spell_Suggest( ByRef hSpell, word, ByRef sList )