> ## 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.

# Dictionary オブジェクトの AddWords メソッド

このメソッドは、単語のグループを辞書に追加します。

## 構文

```vb Visual Basic .NET theme={null}
Sub AddWords( _
  words As StringsCollection, _
  weights As IntCollection _
)
```

```cpp C++ theme={null}
HRESULT AddWords(
  IStringsCollection* words,
  IIntsCollection*   weights
);
```

## パラメーター

**words**

\[in] [**StringsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/stringscollection.md) 型のパラメーターで、新たに追加する単語のコレクションを格納します。

**weights**

\[in] [**IntsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/intscollection.md) 型のパラメーターで、新たに追加する単語の重みに関する情報を渡すために使用します。このコレクションのサイズは、単語のコレクションと同じである必要があります。単語の重みは 1 ～ 200 の範囲で指定する必要があります。このパラメーターには 0 を渡すこともできます。その場合、すべての単語はデフォルトの重み 100 で辞書に登録されます。辞書内の単語に割り当てられる重みは、25、50、100、200 のいずれかの離散値のみです。このパラメーターで渡された値は、これらの離散値のうち最も近い値に丸められます。

## 戻り値

このメソッドには固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## 備考

* 処理効率を高めるため、追加する単語はあらかじめアルファベット順に並べ替えておくことをお勧めします。
* 辞書に単語を 1 つだけ追加する場合は、[**IDictionary::AddWord**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/dictionary-addword.md) メソッドを使用できます。

## 関連項目

[**Dictionary**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/dictionary.md)

[**IDictionary::AddWord**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/dictionary-addword.md)
