Leadtools.Document Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
DefaultSpellLanguages Method
See Also  Example
Leadtools.Document Namespace > RasterDocumentEngine Class : DefaultSpellLanguages Method




Gets a list of default Spelling languages.

Syntax

Visual Basic (Declaration) 
Public Function DefaultSpellLanguages() As RasterDocumentLanguage()
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
Dim value() As RasterDocumentLanguage
 
value = instance.DefaultSpellLanguages()
C# 
public RasterDocumentLanguage[] DefaultSpellLanguages()
Managed Extensions for C++ 
public: RasterDocumentLanguage[] DefaultSpellLanguages(); 
C++/CLI 
public:
array<RasterDocumentLanguage> DefaultSpellLanguages(); 

Example

Visual BasicCopy Code
Public Sub DefaultSpellLanguagesExample()
   ' Note that this is a sample key, which will not work in your toolkit
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")

   Dim rasterDocument As RasterDocumentEngine
   rasterDocument = RasterDocumentEngine.Instance
   rasterDocument.Startup()

   Dim langs As RasterDocumentLanguage() = rasterDocument.DefaultSpellLanguages()
   MessageBox.Show("Totat Default Spell Languages = " & langs.Length)

   If langs.Length > 0 Then
      If rasterDocument.RecognizeModuleTradeoff <> RasterDocumentTradeoff.Accurate Then
         rasterDocument.RecognizeModuleTradeoff = RasterDocumentTradeoff.Accurate
      End If

      rasterDocument.EnableSubsystem = True
      rasterDocument.EnableCorrection = True
      rasterDocument.SpellLanguageId = langs(0)
      rasterDocument.RecognitionDataFileName = "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\test.rdf"

      rasterDocument.Recognize(0, 1, Nothing)
   End If

   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void DefaultSpellLanguagesExample() 

   /// Note that this is a sample key, which will not work in your toolkit 
   RasterSupport.Unlock(RasterSupportType.Ocr, "TestKey"); 
   RasterDocumentEngine rasterDocument; 
   rasterDocument = RasterDocumentEngine.Instance; 
   rasterDocument.Startup(); 
 
   RasterDocumentLanguage[] langs = rasterDocument.DefaultSpellLanguages(); 
   MessageBox.Show("Totat Default Spell Languages = " + langs.Length); 
 
   if (langs.Length > 0) 
   { 
      if (rasterDocument.RecognizeModuleTradeoff != RasterDocumentTradeoff.Accurate) 
          rasterDocument.RecognizeModuleTradeoff = RasterDocumentTradeoff.Accurate; 
 
      rasterDocument.EnableSubsystem = true; 
      rasterDocument.EnableCorrection = true; 
      rasterDocument.SpellLanguageId = langs[0]; 
      rasterDocument.RecognitionDataFileName = @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\test.rdf"; 
 
      rasterDocument.Recognize(0, 1, null); 
   } 
 
   rasterDocument.Shutdown(); 
}

Remarks

The content of the resulting array depends on the configuration of the OCR document engine, i.e. the presence of the Language dictionary files in the engine Binary directory.
For more information, refer to Working with Languages.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Documentrequires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features