BaseLanguage Object (IBaseLanguage Interface)
This object represents a base recognition language. The TextLanguage object — a recognition language for a text — contains a collection of base languages. For example, English or French languages may be represented by base languages. This object provides access to a base language attributes and allows you to get/set its internal name, letter sets, dictionary type, etc.
The BaseLanguage 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 | ||
LanguageId | LanguageIdEnum |
Defines the ID of the language. To convert it to Win32 LCID use the IEngine::ConvertLanguageIdToLCID method. By default, this property is initialized with the system default language ID. |
InternalName | BSTR |
Specifies the internal name of the base language. This name appears as an attribute of a character in the recognized text, so it is recommended that it were unique. The property is an empty string by default. |
LetterSet | BSTR | Provides access to the specified letter set of the base language. |
DictionaryDescriptions | DictionaryDescriptions, read-only | Returns a reference to the dictionary collection. |
Additional attributes | ||
IsNaturalLanguage | VARIANT_BOOL |
Specifies if this base language is a natural language. Natural languages are designed for recognizing common texts. Formal languages are not natural ones. Note: If this property is TRUE, ABBYY FineReader Engine uses some additional information about the languages during recognition (for example, it can presume that the language can include not only alphabet characters but some other constructions like telephone numbers or URLs). If the property is FALSE, ABBYY FineReader Engine uses only the attributes specified in the language properties, no other information is used. By default, the value of this property is FALSE. |
AllowWordsFromDictionaryOnly | VARIANT_BOOL |
Specifies if only the dictionary words are allowed during recognition in this base language. If this property is TRUE, a word that is not found in the dictionary of the base language can appear in the recognized text only if ABBYY FineReader Engine found no dictionary variants. If no dictionary is associated with the base language, the language will not be used for recognition. By default, the value of this property is FALSE. |
UserProperty | VARIANT | Allows you to associate some user-defined information of any type with the BaseLanguage object. |
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
Output parameter
This object is the output parameter of the Item, AddNew methods of the BaseLanguages object.
Samples
The object is used in the following code samples: CustomLanguage.
See also
7/3/2024 8:50:25 AM