メインコンテンツへスキップ
このオブジェクトは、基本認識言語を表します。TextLanguage オブジェクト (テキストの認識言語) には、基本言語のコレクションが含まれます。たとえば、英語やフランス語は基本言語として表現できます。このオブジェクトを使用すると、基本言語の属性にアクセスでき、内部名、文字セット、辞書の種類などを取得または設定できます。 BaseLanguage オブジェクトは永続オブジェクトです。つまり、オブジェクトの現在の状態を永続ストレージに書き込むことができます。その後、永続ストレージからオブジェクトの状態を読み取ることで、オブジェクトを再作成できます。次のメソッドは、オブジェクトの永続化に使用されます。 Linux: SaveToFile、および LoadFromFile Windows: SaveToFileLoadFromFileSaveToMemory、および LoadFromMemory

プロパティ

,read-only

Returns the Engine object.

Defines the ID of the language. To convert it to Win32 LCID use themethod.

By default, this property is initialized with the system default language ID.

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.

Provides access to the specified letter set of the base language.

,read-only

Returns a reference to the dictionary collection.

この基本言語が自然言語かどうかを指定します。自然言語は一般的なテキストの認識を目的として設計されています。形式言語は自然言語ではありません。

このプロパティが TRUE の場合、ABBYY FineReader Engine は認識時に言語に関する追加情報を使用します (たとえば、言語にアルファベット文字だけでなく、電話番号や URL などの構造も含まれる可能性があると推定できます) 。プロパティが FALSE の場合、ABBYY FineReader Engine は言語プロパティで指定された属性のみを使用し、その他の情報は使用されません。

デフォルトでは、このプロパティの値は FALSE です。

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.

Allows you to associate some user-defined information of any type with the BaseLanguage object.

メソッド

名前説明
CopyFrom別のオブジェクトの同名のプロパティの値を使って、現在のオブジェクトのプロパティを初期化します。
LoadFromFileディスク上のファイルからオブジェクトの内容を復元します。
LoadFromMemory <Note> : Windows のみ。 </Note>グローバルメモリからオブジェクトの内容を復元します。
SaveToFileオブジェクトの内容をディスク上のファイルに保存します。
SaveToMemory <Note> : Windows のみ。 </Note>オブジェクトの内容をグローバルメモリに保存します。
BaseLanguage オブジェクト図

出力パラメーター

このオブジェクトは、BaseLanguagesオブジェクトのItemメソッドおよびAddNewメソッドの出力パラメーターとして返されます。

サンプル

// 新しい TextLanguage オブジェクトが作成され、
// そのすべての属性が定義済み言語からコピーされているものとします
// TextLanguage 内の最初の BaseLanguage オブジェクトを取得します
BaseLanguage baseLanguage = textLanguage.BaseLanguages[0];
// 内部言語名をユーザー定義のものに変更します
baseLanguage.InternalName = "SampleBaseLanguage";
// 基本言語にユーザー辞書を設定します
IDictionaryDescriptions dictionaryDescriptions = baseLanguage.DictionaryDescriptions;
dictionaryDescriptions.DeleteAll();
IDictionaryDescription dictionaryDescription = dictionaryDescriptions.AddNew( DictionaryTypeEnum.DT_UserDictionary );
IUserDictionaryDescription userDictionaryDescription = dictionaryDescription.GetAsUserDictionaryDescription();
userDictionaryDescription.FileName = "D:\\SampleDictionary.amd";
// この TextLanguage を認識に使用します
...
このオブジェクトは、Linux および Windows 向けの次のコード サンプルで使用されています: CustomLanguage.

関連項目

BaseLanguages 言語の使用方法 辞書の使用方法 プロパティの使用方法