L_OcrSpellCheckEngine (original) (raw)
Summary
OCR spell checker type.
Syntax
enum L_OcrSpellCheckEngine
{
L_OcrSpellCheckEngine_None,
L_OcrSpellCheckEngine_Native,
L_OcrSpellCheckEngine_OS,
L_OcrSpellCheckEngine_Hunspell
};
typedef enum L_OcrSpellCheckEngine L_OcrSpellCheckEngine;
Members
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.
Comments
Set Spell check engine to L_OcrSpellCheckEngine_None to disable the spell checking via a call to L_OcrSpellCheckManager_SetSpellCheckEngine method.
LEADTOOLS OCR Module - LEAD 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 LEADTOOLS OCR Module - LEAD Engine 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 LEAD runtime in the following format LEAD.[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.
Using the Hunspell Engine with LEADTOOLS OCR Module - LEAD Engine
The following prerequisites must exist in order for you to use the Hunspell engine with LEADTOOLS OCR Module - LEAD Engine:
- The LtSpellCheckHunspellu.dll (Win32) or LtSpellCheckHunspellx.dll (x64) DLLs must be in your Bin folder next to Ltocru.dll (Win32) or Ltocrx.dll (x64).
- NHunspell.dll: NHunspell .NET wrapper. Must be in your bin folder next to LtSpellCheckHunspellu.dll (Win32) or LtSpellCheckHunspellx.dll (x64).
- Hunspellx86.dll or Hunspellx64.dll: Hunspell native DLL. The correct version for your platform must exist in the LEADTOOLS OCR Module - LEAD Engine runtime folder. By default, the location is:
<LEADTOOLS_INSTALLDIR>\\Bin\\Common\\OcrLEADRuntime
- lang.aff and lang.dic dictionary files: Language dictionary files for the Hunspell engine. Visit https://wiki.openoffice.org/wiki/Dictionaries to download the files for the languages you are interested in. You can use the same name as the original dictionary file, for example, "en_US" for English US dictionary. The dictionary file must reside in the LEADTOOLS OCR Module - LEAD Engine runtime folder. By default, the location is:
<LEADTOOLS_INSTALLDIR>\\Bin\\Common\\OcrLEADRuntime