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 = LeadtoolsExamples.Common.ImagesPath.Path + "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 = LeadtoolsExamples.Common.ImagesPath.Path + "test.rdf"; rasterDocument.Recognize(0, 1, null); } rasterDocument.Shutdown(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also