Leadtools.Forms.Ocr Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Use Method
See Also 
Leadtools.Forms.Ocr Namespace > IOcrUserDictionary Interface : Use Method



fileName
Name of the user dictionary file, must not be null (Nothing in Visual Basic).
defaultSectionName
Name of the default section in the user dictionary. If it is null (Nothing in Visual Basic), the default section will be the first section of the dictionary, if any.

Note: This parameter is not supported in the LEADTOOLS OCR Advantage Engine and it should be null.

fileName
Name of the user dictionary file, must not be null (Nothing in Visual Basic).
defaultSectionName
Name of the default section in the user dictionary. If it is null (Nothing in Visual Basic), the default section will be the first section of the dictionary, if any.

Note: This parameter is not supported in the LEADTOOLS OCR Advantage Engine and it should be null.

Specify a user dictionary and the default section in it for the checking subsystem.

Syntax

Visual Basic (Declaration) 
Overridable Sub Use( _
   ByVal fileName As String, _
   ByVal defaultSectionName As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As IOcrUserDictionary
Dim fileName As String
Dim defaultSectionName As String
 
instance.Use(fileName, defaultSectionName)
C# 
virtual void Use( 
   string fileName,
   string defaultSectionName
)
C++/CLI 
virtual void Use( 
   String^ fileName,
   String^ defaultSectionName
) 

Parameters

fileName
Name of the user dictionary file, must not be null (Nothing in Visual Basic).
defaultSectionName
Name of the default section in the user dictionary. If it is null (Nothing in Visual Basic), the default section will be the first section of the dictionary, if any.

Note: This parameter is not supported in the LEADTOOLS OCR Advantage Engine and it should be null.

Example

For an example, refer to IOcrUserDictionary.

Remarks

A user dictionary typically consists of different sections, the sections may contain one or more specified items (IOcrUserDictionaryItem). You can enumerate the sections in the User dictionary with the GetFirstSectionName and GetNextSectionName methods.

Each zone can be linked to a section in the User dictionary using the OcrZone.UserDictionarySectionName property.

User dictionary items are strings and they must be no longer than MaximumItemLength characters. They may contain spaces and punctuation characters.

If there is no default section specified, in the methods that expects a defaultSectionName parameter, the first section of the User dictionary will be the default.

You can set the current user dictionary to use in the checking subsystem with the Use method. If no user dictionary has been set, no checking through the user dictionary will be performed.

You can use the Create method to create a new user dictionary and the Open method to open for edit an existing dictionary. You can then iterate through the sections and items as well as adding new sections and items to the dictionary. When you are done, you must call Save to save any changes you made to the dictionary and finally Close to close it.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Use requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features