Chinese Simplified (简体中文)

TextLanguage Object (ITextLanguage Interface)

This object represents the language of recognition for a text. The text language in general case is a set of base languages or languages of a single word. Access to the collection of base languages of a text is provided through the BaseLanguages property. Besides, this object exposes methods for accessing different text language attributes such as its internal name, groups of letter sets, etc.

The TextLanguage object is a persistent object. This means that the object's current state can be written to persistent storage on disk. Later, the object can be re-created by reading the object's state from persistent storage. The following methods provide persistence of the object: SaveToFile, and LoadFromFile.

Properties

Name Type Description
Application Engine, read-only Returns the Engine object.
Main attributes
InternalName BSTR

Stores the internal name of the text language. As the internal name may be used to identify the language, it is better be unique.

After a new object of the TextLanguage type is created, this property stores empty string. You may assign it some unique value to identify your text language among others.

By default, this property contains an empty string.

LetterSet BSTR Sets additional letter sets for the text language.
RecognitionSet BSTR, read-only Returns the full letter set used for recognition with this TextLanguage, combining all letter sets of its base languages and additional letter sets.
BaseLanguages BaseLanguages, read-only Returns a reference to the collection of base languages of the current text language. This collection always exists though contains no elements by default.
ProhibitingDictionaries DictionaryDescriptions, read-only Returns a reference to the collection of prohibiting dictionaries.
Additional attributes
ImpliedTextCategory TextCategoryEnum

Specifies the category of text for which the current text language is designed.

By default, this property contains the TC_Unknown value, which means that the text language can be used for recognition of all types of text.

UserProperty VARIANT Allows you to associate any user-defined information with an object of the TextLanguage type.

Methods

Name Description
CopyFrom Initializes properties of the current object with values of similar properties of another object.
LoadFromFile Restores the object contents from a file on disk.
SaveToFile Saves the object contents into a file on disk.

Related objects

Object Diagram

Output parameter

This object is the output parameter of the CreateTextLanguage, CreateCompoundTextLanguage method of the LanguageDatabase object.

Samples

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

See also

Working with Languages

Working with Properties

03.07.2024 8:50:25

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.