AddWord Method of the Dictionary Object
This method adds a new word to the dictionary. If the word you are adding already exists in the dictionary, no duplicate will be created, but the weight of this word will be equal to the maximum of the weight specified in dictionary and the weight you pass in call to this method.
Syntax
HRESULT AddWord(
BSTR Word,
int Weight
);
Parameters
- Word
- [in] This parameter contains the newly added word.
- Weight
- [in] The weight assigned to the word in the dictionary. Must be in the range from 1 to 100. The higher the weight for a word is, the more likely this word will be taken as a variant during recognition. The normal value for this parameter is 100, this value is used by default. The weight assigned to the word in the dictionary may have a set of discrete values only. The value passed in this parameter is rounded to the nearest of the discrete set of values.
Return values
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
Remarks
It is not recommended to use this method for adding a large number of words to the dictionary, because after adding each word the dictionary is rebuilt, and thus the operation takes a rather long time. For adding a group of words into the dictionary, use the IDictionary::AddWords method instead.
See also
03.07.2024 8:50:10