ImageGear Professional v18.2 > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > User Dictionary Functions > IG_REC_UD_set |
Specifies a User dictionary and its default section for the checking subsystem.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_UD_set( LPCSTR pFilename, LPCSTR pDefaultSection ); |
Name | Type | Description |
pFilename | LPCSTR | Name of the User dictionary file. If it is NULL, a new and empty User dictionary will be created in memory. |
pDefaultSection | LPCSTR | Name of the default section in the User dictionary. If it is NULL, the default section will be the first section of the dictionary, if any. |
This function does not process image pixels.
Copy Code
|
|
---|---|
AT_ERRCOUNT ErrCount = 0; ErrCount += IG_REC_UD_set(NULL, NULL); |
This function can also be used to initiate the creation of a new and empty User dictionary in memory.
Once the checking subsystem has been enabled, it can be further configured to use any combination of these three possible checking methods.
A call to this function is also necessary to first define a User dictionary, in order to allow the application to maintain it (to create, add, or remove items, etc.) with (IG_REC_UD_edit_open).
A UDitem is always associated with an item attribute. Depending on their attributes, items are added to the User dictionary either as literals (the item attribute is zero, 0) or as regular expressions (the item attribute is 1). Literal-type UDitems can be used as conventional User dictionary items. The use of the regular expressions is documented in the topic Regular expressions.
User dictionary items are UNICODE strings, and they must be no longer than AM_MAX_UD_ITEM_LEN characters (including the terminating zero). They may contain spaces and punctuation characters.
A word-list file is a text file; it contains words, one in each line. Regular expressions and sections are not supported. The checking subsystem loads Unicode based word-list files properly, while 8-bit code page based files are treated as Windows ANSI based ones.
Note that the UDCREATE tool used in the previous toolkit version to convert word-list files to native dictionary files is not distributed any more. (To create a native dictionary from a word-list file, simply load it and save the file to have it converted.)