Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Working With A Dictionary (Deprecated)

This topic has been deprecated. Refer to Programming with Leadtools .NET OCR

The checking subsystem is responsible for checking spelling, checking the user dictionary for acceptable words during recognition, provided a user dictionary has been set, and using a user-written callback function. To use a user dictionary during recognition, one must be created/set using SetUserDictionary before calling Recognize. To get the name of the current user dictionary, call DictionaryFileName property

A new user dictionary can be created or an existing dictionary loaded from a file by calling SetUserDictionary. To create a new user dictionary, call SetUserDictionary with the createUD parameter set to true. This will save the current user dictionary to a file and disable that user dictionary.

While the user dictionary is being used, it may have material added or removed. The DictionaryState indicates whether the user dictionary has been changed while it has been open.

A user dictionary consists of one or more sections (folders or categories) and each section can have one or more items (folder contents). When the user dictionary is opened or created, the user dictionary is opened to a specific default section, specified in the DictionaryFileName property.

Individual items within a section can be obtained using GetUserDictionarySectionItem. Items can be added to or removed from a section using AddItemToUserDictionary and RemoveItemFromUserDictionary.