Dictionary Object (IDictionary Interface)

This object is designed for working with user dictionaries and dictionary extensions. User dictionaries are dictionaries that contain word forms of words of a certain language. Each word form in the dictionary has its own weight that defines its priority when there appear several variants for a word during recognition. The weight may have a set of discrete values. The range of values is from 0 to 100. User dictionaries may be connected to the BaseLanguage object — object representing one base recognition language. Dictionary extensions may exist only for those languages which have standard dictionary support.

A pointer to the Dictionary object interface may be obtained from the CreateNewDictionary, OpenExistingDictionary, or OpenDictionaryExtension methods of the LanguageDatabase object. The OpenExistingDictionary method can open dictionaries created with the help of the CreateNewDictionary method. The OpenDictionaryExtension provides access to the interface of a dictionary extension.

The Edit method displays the Dictionary dialog box that allows a user to edit the dictionary and to import any text file in Windows ANSI- and Unicode-encoding (the only requirement is that words must be separated by spaces or other non-alphabetic characters).


Name Type Description
Application Engine, read-only Returns the Engine object.
Name BSTR Stores the name of the dictionary. It is this name that is displayed at the caption of the Dictionary dialog box that is displayed when calling the Edit method. After creation of the Dictionary object this property stores the name of the dictionary file (without path and extension). You may assign it any other value. This property is not saved into the file associated with the dictionary, and should be initialized every time the dictionary is edited.
WordsCount int, read-only Returns the number of words in the dictionary.


Name Description
AddWord Adds a word to the dictionary.
AddWords Adds a group of words to the dictionary.
DeleteAllWords Deletes all words from the dictionary.
DeleteWord Deletes a word from the dictionary.
DeleteWords Deletes a group of words from the dictionary.
Edit Displays the Dictionary dialog box that allows a user to edit the dictionary.
EnumWords Returns an object of the EnumDictionaryWords type that allows you to iterate through the words in the dictionary.

Output parameter

This object is the output parameter of the CreateNewDictionary, OpenExistingDictionary, OpenDictionaryExtension methods of the LanguageDatabase object.


C# code

The object is used in the following code samples: CustomLanguage.

See also


Working with Dictionaries

Working with Properties

24.03.2023 8:51:52

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.