Working with a Dictionary
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 L_DocSetUserDictionary before calling L_DocRecognize. To get the name of the current user dictionary, call L_DocGetUserDictionary.
A new user dictionary can be created or an existing dictionary loaded from a file by calling L_DocSetUserDictionary. To create a new user dictionary, call L_DocSetUserDictionary with the bCreateUD 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 L_DocGetUserDictionaryState 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 pszDefSection member of the pUDOpts parameter of the L_DocSetUserDictionary function. To get the name of that section, use L_DocGetUserDictionarySection.
Individual items within a section can be obtained using L_DocGetUserDictionarySectionItem. Items can be added to or removed from a section using L_DocAddItemToUserDictionary and L_DocRemoveItemFromUserDictionary.