> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BaseLanguage オブジェクト（IBaseLanguage インターフェイス）

> ABBYY FineReader Engine API の BaseLanguage オブジェクト（IBaseLanguage インターフェイス）。基本認識言語を表し、その内部名、文字セット、辞書の種類、その他の基本言語属性へのアクセスを提供します。永続オブジェクトであり、ファイルまたはメモリへの保存と、そこからのロードが可能です。

このオブジェクトは、基本認識言語を表します。[TextLanguage](/ja/fine-reader/engine/api-reference/language-related-objects/textlanguage) オブジェクト (テキストの認識言語) には、基本言語のコレクションが含まれます。たとえば、英語やフランス語は基本言語として表現できます。このオブジェクトを使用すると、基本言語の属性にアクセスでき、内部名、文字セット、辞書の種類などを取得または設定できます。

BaseLanguage オブジェクトは永続オブジェクトです。つまり、オブジェクトの現在の状態を永続ストレージに書き込むことができます。その後、永続ストレージからオブジェクトの状態を読み取ることで、オブジェクトを再作成できます。次のメソッドは、オブジェクトの永続化に使用されます。

Linux: [SaveToFile](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method)、および [LoadFromFile](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)

Windows: [SaveToFile](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method)、[LoadFromFile](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)、[SaveToMemory](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method)、および [LoadFromMemory](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method)。

<div id="properties">
  ## プロパティ
</div>

<table>
  <thead>
    <tr>
      <th>
        <p>
          <strong>Name</strong>
        </p>
      </th>

      <th>
        <p>
          <strong>Type</strong>
        </p>
      </th>

      <th>
        <p>
          <strong>Description</strong>
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <strong>Application</strong>
        </p>
      </td>

      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/api-reference/engine-object-iengine-interface">
              Engine
            </a>
          </strong>

          ,{" "}

          <a href="/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">
            read-only
          </a>
        </p>
      </td>

      <td>
        <p>
          Returns the <strong>Engine</strong> object.
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="3">
        <p>
          <em>Main attributes</em>
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <a name="languageid" />

          <strong>LanguageId</strong>
        </p>
      </td>

      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/api-reference/enumerations/languageidenum">
              LanguageIdEnum
            </a>
          </strong>
        </p>
      </td>

      <td>
        <p>
          Defines the ID of the language. To convert it to Win32 LCID use the{" "}

          <strong>
            <a href="/ja/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/convertlanguageidtolcid-method">
              IEngine::ConvertLanguageIdToLCID
            </a>
          </strong>

          {" "}

          method.
        </p>

        <p>
          By default, this property is initialized with the system default
          language ID.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <strong>InternalName</strong>
        </p>
      </td>

      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">
              BSTR
            </a>
          </strong>
        </p>
      </td>

      <td>
        <p>
          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.
        </p>

        <p>The property is an empty string by default.</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/api-reference/language-related-objects/baselanguage/letterset-property">
              LetterSet
            </a>
          </strong>
        </p>
      </td>

      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">
              BSTR
            </a>
          </strong>
        </p>
      </td>

      <td>
        <p>Provides access to the specified letter set of the base language.</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <a name="dictionarydescriptions" />

          <strong>DictionaryDescriptions</strong>
        </p>
      </td>

      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/api-reference/language-related-objects/dictionarydescriptions">
              DictionaryDescriptions
            </a>
          </strong>

          ,{" "}

          <a href="/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">
            read-only
          </a>
        </p>
      </td>

      <td>
        <p>Returns a reference to the dictionary collection.</p>
      </td>
    </tr>

    <tr>
      <td colspan="3">
        <p>
          <em>Additional attributes</em>
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <a name="isnaturallanguage" />

          <strong>IsNaturalLanguage</strong>
        </p>
      </td>

      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">
              VARIANT\_BOOL
            </a>
          </strong>
        </p>
      </td>

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

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

        <p>デフォルトでは、このプロパティの値は FALSE です。</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <a name="allowwordsfromdictionaryonly" />

          <strong>AllowWordsFromDictionaryOnly</strong>
        </p>
      </td>

      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">
              VARIANT\_BOOL
            </a>
          </strong>
        </p>
      </td>

      <td>
        <p>
          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.
        </p>

        <p>By default, the value of this property is FALSE.</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <strong>
            <a href="/ja/fine-reader/engine/api-reference/language-related-objects/baselanguage/userproperty-property">
              UserProperty
            </a>
          </strong>
        </p>
      </td>

      <td>
        <p>
          <strong>VARIANT</strong>
        </p>
      </td>

      <td>
        <p>
          Allows you to associate some user-defined information of any type with
          the <strong>BaseLanguage </strong>object.
        </p>
      </td>
    </tr>
  </tbody>
</table>

<div id="methods">
  ## メソッド
</div>

| 名前                                                                                                                                               | 説明                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------- |
| [CopyFrom](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/copyfrom-method)                         | 別のオブジェクトの同名のプロパティの値を使って、現在のオブジェクトのプロパティを初期化します。 |
| [LoadFromFile](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)                                       | ディスク上のファイルからオブジェクトの内容を復元します。                    |
| [LoadFromMemory](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method) <br /><br /> **注:** *Windows のみ。* | グローバルメモリからオブジェクトの内容を復元します。                      |
| [SaveToFile](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method)                                           | オブジェクトの内容をディスク上のファイルに保存します。                     |
| [SaveToMemory](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method) <br /><br /> **注:** *Windows のみ。*     | オブジェクトの内容をグローバルメモリに保存します。                       |

<div id="related-objects">
  ## 関連オブジェクト
</div>

<img src="https://mintcdn.com/abbyy/6udH-pkk8zkVafYH/images/fine-reader/engine/baselanguage.gif?s=c2acab4fc786a6b6c2f35de3fba11b61" alt="BaseLanguage" width="157" height="121" data-path="images/fine-reader/engine/baselanguage.gif" />[](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/element-property)[](/ja/fine-reader/engine/api-reference/language-related-objects/dictionarydescriptions)[](/ja/fine-reader/engine/api-reference/language-related-objects/baselanguages)[](/ja/fine-reader/engine/api-reference/language-related-objects/textlanguage)

[オブジェクト図](/ja/fine-reader/engine/api-reference/object-diagram)

<div id="output-parameter">
  ## 出力パラメーター
</div>

このオブジェクトは、[BaseLanguages](/ja/fine-reader/engine/api-reference/language-related-objects/baselanguages)オブジェクトの[Item](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/item-method)メソッドおよび[AddNew](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/addnew-method)メソッドの出力パラメーターとして返されます。

<div id="samples">
  ## サンプル
</div>

<Accordion title="C# コード">
  ```csharp theme={null}
  // 新しい 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 を認識に使用します
  ...
  ```
</Accordion>

このオブジェクトは、Linux および Windows 向けの次のコード サンプルで使用されています: [CustomLanguage](/ja/fine-reader/engine/guided-tour/samples#customlanguage).

<div id="see-also">
  ## 関連項目
</div>

[BaseLanguages](/ja/fine-reader/engine/api-reference/language-related-objects/baselanguages)

[言語の使用方法](/ja/fine-reader/engine/guided-tour/advanced-techniques/working-with-languages)

[辞書の使用方法](/ja/fine-reader/engine/guided-tour/advanced-techniques/working-with-dictionaries)

[プロパティの使用方法](/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)
