---
sourceDocument: オーストラリア API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/api-reference

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリア API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# EncoderStore - グローバル

# EncoderStore - グローバル {#ariaid-title1}

* リリースバージョン: Australia
* 
* 更新日 2026年03月12日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：6分

EncoderStore API は、エンコーダーを格納および取得するためのメソッドを提供します。

この API には 予測インテリジェンス プラグイン (com.glide.platform_ml) が必要で、 `sn_ml` 名前空間内で提供されます。

## EncoderStore - add(Object mlEncoder) {#ariaid-title2}

新しいエンコーダーを追加します オブジェクトをストアに追加し、一意の名前を返します。
注:  
ラベル値は一意である必要はありません。たとえば、同じラベルでこのメソッドを 10 回実行すると、このメソッドは一意の名前を持つ 10 個の異なるオブジェクトをストアに追加します。
{#EncoderStore-add_O__table_vwy_1fr_llb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| mlEncoder | [エンコーダー](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#EncoderAPI "エンコーダー API は、予測インテリジェンス ストアで使用されるスクリプト可能なオブジェクトを提供します。このオブジェクトは、エンコーダー固有の目標と構成に基づいて、入力データを数値のベクトルに変換します。エンコーダーは、エンコーディングを実行するために個別に使用することも、テキスト列をエンコードするソリューションの一部として構成することもできます。") | [エンコーダー()](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#Encoder-Encoder_O "エンコーダーを作成します。") ストアに追加するオブジェクト。 |
[表 : 1. パラメーター]

{#EncoderStore-add_O__table_vwy_1fr_llb} {#EncoderStore-add_O__table_wwy_1fr_llb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | システム生成ソリューション名。 |
[表 : 2. 返される内容]

{#EncoderStore-add_O__table_wwy_1fr_llb}  
次の例は、 エンコーダー ストアに エン [コーダーを使用 - submitTrainingJob()](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#Encoder-submitTrainingJob "トレーニングジョブを送信します。") して、ストアに追加した後にトレーニングジョブを実行します。

    // Create a dataset 
    var myData = new sn_ml.DatasetDefinition({

      'tableName' : 'incident',
      'fieldNames' : ['assignment_group', 'short_description', 'description'],
      'encodedQuery' : 'activeANYTHING'

    });

    // Create a solution 
    var myEncoder = new sn_ml.Encoder({

      'label': "my encoder definition",
      'datasets' : [myData],
      'predictedFieldName' : 'assignment_group',
      'inputFieldNames':['short_description']

    });

    // Add the encoder to the store to later be able to retrieve it.
    var my_unique_name = sn_ml.EncoderStore.add(myEncoder);

## EncoderStore - deleteObject(文字列名) {#ariaid-title3}

指定されたエンコーダーオブジェクトをストアから削除します。
{#EncoderStore-deleteObject_S__table_rmj_lfr_llb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| name | 文字列 | [Encoder()](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#Encoder-Encoder_O "エンコーダーを作成します。") 削除するオブジェクト。 の名前 |
[表 : 3. パラメーター]

{#EncoderStore-deleteObject_S__table_rmj_lfr_llb} {#EncoderStore-deleteObject_S__table_smj_lfr_llb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 4. 返される内容]

{#EncoderStore-deleteObject_S__table_smj_lfr_llb}  
次の例は、ストアからエンコーダーを削除する方法を示しています。

    sn_ml.EncoderStore.deleteObject("ml_sn_global_global_encoder");

## EncoderStore - get(文字列名) {#ariaid-title4}

ストアからエンコーダーオブジェクトを取得します。
{#EncoderStore-get_S__table_zvw_v2r_llb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| name | 文字列 | ストア内のエンコーダーの名前。 |
[表 : 5. パラメーター]

{#EncoderStore-get_S__table_zvw_v2r_llb} {#EncoderStore-get_S__table_aww_v2r_llb__entry__2}

| タイプ | 説明 |
|-|-|
| オブジェクト | [エンコーダー](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#EncoderAPI "エンコーダー API は、予測インテリジェンス ストアで使用されるスクリプト可能なオブジェクトを提供します。このオブジェクトは、エンコーダー固有の目標と構成に基づいて、入力データを数値のベクトルに変換します。エンコーダーは、エンコーディングを実行するために個別に使用することも、テキスト列をエンコードするソリューションの一部として構成することもできます。") オブジェクト。オブジェクトが存在しない場合はエラーを返します。 |
[表 : 6. 返される内容]

{#EncoderStore-get_S__table_aww_v2r_llb}  
次の例は、 get() メソッドを使用してストアからエンコーダー オブジェクトを取得し、 [エンコーダー:getActiveVersion()](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#Encoder-getActiveVersion "アクティブを取得します EncoderVersion オブジェクト。") メソッドと [EncoderVersion - getStatus()](https://servicenow-prod.fluidtopics.net/hAmejPDblpeVfQ1eSiS3Lw#EncoderV-getStatus_B "トレーニング完了ステータスを取得します。") メソッドを使用してそのトレーニング状態を表示する方法を示しています。

    // Get status
    var myEncoder = sn_ml.EncoderStore.get('ml_incident_categorization');

    gs.print(JSON.stringify(JSON.parse(myEncoder.getActiveVersion().getStatus(), null, 2)));

出力:

    {
     "state":"solution_complete",
     "percentComplete":"100",
     "hasJobEnded":"true"
    }

## EncoderStore - getAllNames(オブジェクトオプション) {#ariaid-title5}

ストア内のすべてのエンコーダー定義レコードの名前を取得します。
{#EncoderStore-getAllNames__id_bfn_kwh_wnb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| オプション | オブジェクト | 指定したプロパティ内で結果を制限するためのオプション。 { "label": "String", "domainName": "String", "scope": "String" }; |
| options.label | 文字列 | オプション。ソリューションオブジェクトのラベル。 |
| options.domainName | 文字列 | オプション。ソリューションオブジェクトのドメインの名前。参照先 [ドメインセパレーションと 予測インテリジェンス](https://www.servicenow.com/docs/access?context=domain-separation-predictive-intelligence&version=australia&pubname=australia-intelligent-experiences&ft:locale=en-US). |
| options.scope | 文字列 | オプション。ソリューションオブジェクトの [アプリケーションスコープ](https://www.servicenow.com/docs/access?context=c_ApplicationScope&version=australia&pubname=australia-application-development&ft:locale=en-US) の名前。 |
[表 : 7. パラメーター]

{#EncoderStore-getAllNames__id_bfn_kwh_wnb} {#EncoderStore-getAllNames__table_aww_v2r_llb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | ストア内のエンコーダーオブジェクト名を表す文字列のリスト。 |
[表 : 8. 返される内容]

{#EncoderStore-getAllNames__table_aww_v2r_llb}  
次の例では、 getAllNames() メソッドがストア内のすべての名前のリストを返します。

    gs.print(JSON.stringify(JSON.parse(sn_ml.EncoderStore.getAllNames()), null, 2));

出力:

    [
      "ml_x_snc_global_global_classification_word_corpus",
      "ml_x_snc_global_global_predictability_estimate",
      "GloVe",
      "ml_x_snc_global_global_encoder",
      "ml_x_snc_global_global_predictability_estimate_1"
    ]

次の例では、 getAllNames() メソッドは options パラメーターで設定された値に関連付けられた名前のみを返します。

    var options = {
      'label' : 'my encoder definition',
      'domainName' : 'global',
      'scope' : 'global'
    };
    var solNames = sn_ml.EncoderStore.getAllNames(options);
    gs.print(JSON.stringify(JSON.parse(solNames), null, 2));

出力：

    [
      "ml_x_snc_global_global_my_encoder_definition"
    ]

## EncoderStore - update(文字列名, オブジェクト mlEncoder) {#ariaid-title6}

ストア内のエンコーダーオブジェクトを更新します。
{#EncoderStore-update_S_O__table_v5p_wxr_llb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| name | 文字列 | 更新するエンコーダーの名前。 |
| mlEncoder | [エンコーダー](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#EncoderAPI "エンコーダー API は、予測インテリジェンス ストアで使用されるスクリプト可能なオブジェクトを提供します。このオブジェクトは、エンコーダー固有の目標と構成に基づいて、入力データを数値のベクトルに変換します。エンコーダーは、エンコーディングを実行するために個別に使用することも、テキスト列をエンコードするソリューションの一部として構成することもできます。") | [エンコーダー()](https://servicenow-prod.fluidtopics.net/3wkxwjgt1W9OU2MIP~fozA#Encoder-Encoder_O "エンコーダーを作成します。") 更新するオブジェクトプロパティ。 |
[表 : 9. パラメーター]

{#EncoderStore-update_S_O__table_v5p_wxr_llb} {#EncoderStore-update_S_O__table_w5p_wxr_llb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 10. 返される内容]

{#EncoderStore-update_S_O__table_w5p_wxr_llb}  
次の例は、ストア内のエンコーダー オブジェクトを更新する方法を示しています。

    var encoderUpdate = new sn_ml.Encoder({
      'label': 'my encoder definition',
      'dataset' : myData,
      'predictedFieldName' : 'assignment_group',
      'inputFieldNames': ['short_description']
    });

    sn_ml.EncoderStore.update('ml_sn_global_global_incident_service', encoderUpdate);


