ImageGear Professional v18.2 > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > User Dictionary Functions > IG_REC_UD_item_add |
Adds a new User dictionary item.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_UD_item_add( LPCSTR pSection, LPCWSTR pUDitem, enumIGRecUDItemAttribute itemattrib ); |
Name | Type | Description |
pSection | LPCSTR | Name of the section where the word should be added. If the specified section does not exist, a new section will be created automatically. |
pUDitem | LPCWSTR | Pointer to a UNICODE string containing the item to be added. |
itemattrib | enumIGRecUDItemAttribute | Attribute for the UDitem to be added. See enumIGRecUDItemAttribute for possible values. |
This function does not process image pixels.
Copy Code
|
|
---|---|
AT_ERRCOUNT ErrCount = 0; ErrCount += IG_REC_UD_set(NULL, NULL); ErrCount += IG_REC_UD_edit_open(); ErrCount += IG_REC_UD_item_add("LiteralSection", L"Heereswaffenamt", IG_REC_UD_ITEM_ATTR_LITERAL_STRING); ErrCount += IG_REC_UD_item_add("RegexpSection", L"[A-Z]", IG_REC_UD_ITEM_ATTR_REGULAR_EXPRESSION); ErrCount += IG_REC_UD_edit_close(); |
The function appends a new User dictionary item (or simply UDitem), that is a literal or a regular expression, to the User dictionary currently opened for editing by the IG_REC_UD_edit_open function. The item will be added to the pSection of the User dictionary.
Maximal length of the dictionary item is AM_MAX_UD_ITEM_LEN.