L_Doc2AddItemToUserDictionary

NOTE: User words and dictionaries are no longer supported in the OCR Professional Engine.

#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2AddItemToUserDictionary(hDoc, pSection, pUDitem, uMask)

L_HDOC2 hDoc;

handle to the OCR document

L_CHAR * pSection;

section name

L_WCHAR * pUDitem;

UNICODE string, containing the section item to be added

L_UINT32 uMask;

mask

Adds a new section item to the specified section in the User dictionary.

Parameter Description
hDoc Handle to the OCR document.
pSection 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 Pointer to a UNICODE string containing the item to be added.
uMask Value that indicates the type of expression to be added. Possible values are:
  Value Meaning
  DOC2_USER_DICT_LITERAL [0x0000] Use the literal expression. This is the default value.
  DOC2_USER_DICT_REGULAR_EXPRESSION [0x0001] Use the regular expression.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function can be used to add a new User dictionary item (a literal or a regular expression), to the User dictionary that is currently open.

The item will be added to the section of the User dictionary specified by pSection.

User dictionary items are UNICODE strings and they must be no longer than DOC2_MAX_UD_ITEM_LENGTH characters, the function will ignore the extra characters (including the terminating zero). They may contain spaces and punctuation characters.

When adding a new User dictionary item its uMask also has to be specified. An item can be added either as a literal or as a regular expression. When uMask is DOC2_USER_DICT_REGULAR_EXPRESSION, the User dictionary item will be evaluated for conformance during the checking of the recognized result.

Required DLLs and Libraries

LTDOC2

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Professional OCR C API Help