←Select platform

SpellCheckManager Property

Summary
Manages the spell checking subsystem.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public IOcrSpellCheckManager SpellCheckManager { get; } 
@property (nonatomic, strong, readonly) LTOcrSpellCheckManager *spellCheckManager 
public OcrSpellCheckManager getSpellCheckManager() 
property IOcrSpellCheckManager^ SpellCheckManager { 
   IOcrSpellCheckManager^ get(); 
} 
SpellCheckManager # get  (IOcrEngine) 

Property Value

The instance of the IOcrSpellCheckManager object used to manage the spell checking system.

Remarks

The spell checking system contains three parts:

  1. The use of the language dictionary in spell checking.
  2. The user dictionary setting.

For more information, refer to IOcrSpellCheckManager.

You must call the Startup method before you can use the SpellCheckManager.

Note: The SpellCheckManager state is also saved when the engine settings are saved. For more information, refer to IOcrSettingManager.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Drawing; 
 
public void OcrSpellCheckManagerExample() 
{ 
   // Create an instance of the engine 
   using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD)) 
   { 
      // Start the engine using default parameters 
      ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir); 
 
      IOcrSpellCheckManager spellCheckManager = ocrEngine.SpellCheckManager; 
 
      // Get the spell language supported (languages with a dictionary) 
      string[] spellLanguages = spellCheckManager.GetSupportedSpellLanguages(); 
      foreach (string spellLanguage in spellLanguages) 
         Console.WriteLine(spellLanguage); 
 
      // Check if English is supported 
      string language = "en"; 
      if (spellCheckManager.IsSpellLanguageSupported(language)) 
      { 
         // Yes, set it 
         spellCheckManager.SpellLanguage = language; 
         Console.WriteLine("Current spell language: {0}", spellCheckManager.SpellLanguage); 
      } 
 
      // Enable the spell checking system 
      spellCheckManager.SpellCheckEngine = OcrSpellCheckEngine.Native; 
 
      // Now perform other OCR functions here 
 
      // Shutdown the engine 
      // Note: calling Dispose will also automatically shutdown the engine if it has been started 
      ocrEngine.Shutdown(); 
   } 
} 
 
static class LEAD_VARS 
{ 
   public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS22\Bin\Common\OcrLEADRuntime"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Ocr Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.