AddWord Method of the Dictionary Object

This method adds a new word to the dictionary.

Syntax

Visual Basic .NET

Sub AddWord( _
  word As String, _
  weight As Integer _
)
    

C++

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 200. 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. Visual Basic users see this parameter as having default value of 100. The weight assigned to the word in the dictionary may have a set of discrete values only. These values are 25, 50, 100, 200. 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 FlexiCapture SDK 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

Dictionary

IDictionary::AddWords

8/15/2023 1:19:30 PM

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.