enum L_OcrSpellCheckEngine
{
L_OcrSpellCheckEngine_None,
L_OcrSpellCheckEngine_Native,
L_OcrSpellCheckEngine_OS,
L_OcrSpellCheckEngine_Hunspell
};
typedef enum L_OcrSpellCheckEngine L_OcrSpellCheckEngine;
OCR spell checker type.
Value | Meaning |
---|---|
L_OcrSpellCheckEngine_None | No spell checker. |
L_OcrSpellCheckEngine_Native | Uses LEADTOOLS Native engine spell checker. |
L_OcrSpellCheckEngine_OS | Uses the operating system spell checker. |
L_OcrSpellCheckEngine_Hunspell | Uses Hunspell spell checker. |
Set Spell check engine to L_OcrSpellCheckEngine_None to disable the spell checking via a call to L_OcrSpellCheckManager_SetSpellCheckEngine method.
LEADTOOLS OCR Advantage engine supports all the above spell checking types. User words and dictionaries are supported and the engine automatically loads the dictionaries based on the language(s) currently enabled.
All OCR Advantage spell checker engines support adding user words to create custom dictionaries through L_OcrSpellCheckManager_AddUserWords.
The L_OcrSpellCheckEngine_Native engine uses the internal LEADTOOLS cross-platform spell checker. The dictionary files ship with LEADTOOLS in the Advantage runtime in the following format Advantage.[Language].dic where [Language] is the specific language such as "en" for English or "de" for German. This engine has no extra dependencies besides the dictionary files.
The L_OcrSpellCheckEngine_OS engine uses the Operating System specific spell checker if any. In the Windows environment, this is the .NET spell checker (requires .NET 3.0 or later to be installed on the machine) and supports English, French, German and Spanish only. In order to use this engine, LtSpellCheckOSu.dll (win32) or LtSpellCheckOSx.dll (x64) must exist in your Bin folder next to Ltocru.dll (Win32) or Ltocrx.dll (x64).
The L_OcrSpellCheckEngine_Hunspell uses the popular Hunspell spell checker (through the standard .NET NHunspell wrapper). LEADTOOLS setup does not contain the NHunspell binaries or any language dictionaries. You must download the required assemblies from the NHunspell page as well as the dictionaries for the languages you are interested in. Visit the NHunspell home page at https://www.nuget.org/packages/NHunspell/ for more information.
The following prerequisites must exist in order for you to use the Hunspell engine with LEADTOOLS Advantage OCR engine:
"<LEADTOOLS_INSTALLDIR>\\Bin\\Common\\OcrAdvantageRuntime"
The dictionary file must reside in the OCR Advantage runtime folder. By default, the location is:
"<LEADTOOLS_INSTALLDIR>\Bin\Common\OcrAdvantageRuntime"