Compiling and changing a User dictionary requires that the application specify a User dictionary file with the ImGearRecUserDictionary.Load Method or create a new dictionary using the Create Method. At this point the content of the User dictionary can be listed, and items can be added or removed on request. Accessing the contents of the User dictionary or performing editing operations will open it for maintenance. If the User dictionary has been opened for maintenance, the user must call the Close Method before performing recognition.
The Modified Property can be used to learn whether there has been any change since the User dictionary was last opened for maintenance.
Changes can be made permanent by calling the Save Method.
This topic provides information about how to...
A new User dictionary can be created by calling the Create Method followed by the Save Method as follows:
A list of sections in the currently opened User dictionary can be retrieved with the GetSections Method.
A list of UDitems (the elements or entries) of the currently opened User dictionary can be retrieved with the GetItems Method. This method returns a list of the UDitems belonging to the specified section of the User dictionary with their attribute(s). The ImGearRecUDItem.IsRegExp Property denotes whether or not the item is a regular expression.
Elements can be added to the User dictionary with the AddItem Method. When adding a new UDitem with a non-existing section specified, the section will be automatically created. Existing UDitems can be deleted from the User dictionary with the DeleteItem Method. Sections are automatically removed as soon as their last UD item is deleted.