Gets a list of default Spelling languages.
Syntax
Example
Visual Basic | Copy Code |
---|
Public Sub DefaultSpellLanguagesExample()
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
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