UiPath Documentation
ai-center
2023.10
false
AI Center ガイド
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

Multilingual Text Classification (多言語テキスト分類)

MultiLingualTextClassification (多言語テキスト分類): AI Center のすぐに使える ML パッケージです。複数の言語でテキストを分類するための再トレーニング可能なモデルです。

[すぐに使えるパッケージ] > [UiPath Language Analysis (UiPath 言語分析)] > [MultiLingual Text Classification (他言語テキスト分類)]

これは、テキストの分類のための一般的で再トレーニング可能なモデルです。この ML パッケージはトレーニングする必要があります。デプロイする前にトレーニングしていないと、モデルがトレーニングされていないことを示すエラーが表示され、デプロイが失敗します。また、このパッケージは、自然言語処理システムを事前にトレーニングするための自己教師あり学習の手法である BERT に基づいています。トレーニング中は特に GPU が推奨されます。GPU によって、速度が 5 倍から 10 倍程度向上します。

言語​

この多言語モデルは、次の一覧の言語をサポートしています。これらの言語が選ばれたのは、ウィキペディアが最大の上位100言語であるためです。

  • アフリカーンス語
  • アルバニア語
  • アラビア語
  • アラゴン語
  • アルメニア語
  • アストゥリアス語
  • アゼルバイジャン語
  • バシキール語
  • バスク語
  • バイエルン語
  • ベラルーシ語
  • ベンガル語
  • ビシュヌプリヤ・マニプリ語
  • ボスニア語
  • ブルトン語
  • ブルガリア語
  • ビルマ語
  • カタロニア語
  • セブアノ語
  • チェチェン語
  • 中国語 (簡体)
  • 中国語 (繁体)
  • チュヴァシ語
  • クロアチア語
  • チェコ語
  • デンマーク語
  • オランダ語
  • 英語
  • エストニア語
  • フィンランド語
  • フランス語
  • ガリシア語
  • グルジア語
  • ドイツ語
  • ギリシャ語
  • グジャラート語
  • ハイチ語
  • ヘブライ語
  • ヒンディー語
  • ハンガリー語
  • アイスランド語
  • イド語
  • インドネシア語
  • アイルランド語
  • イタリア語
  • 日本語
  • ジャワ語
  • カンナダ語
  • カザフ語
  • キルギス語
  • 韓国語
  • ラテン語
  • ラトビア語
  • リトアニア語
  • ロンバード語
  • 低地ドイツ語
  • ルクセンブルク語
  • マケドニア語
  • マダガスカル語
  • マレー語
  • マラヤーラム語
  • マラーティー語
  • ミナンカバウ語
  • ネパール語
  • ネワール語
  • ノルウェー語 (ブークモール)
  • ノルウェー語 (ニーノシュク)
  • オック語
  • ペルシア語 (ファールシー)
  • ピエモンテ語
  • ポーランド語
  • ポルトガル語
  • パンジャブ語
  • ルーマニア語
  • ロシア語
  • スコットランド語
  • セルビア語
  • セルビア・クロアチア語
  • シチリア語
  • スロバキア語
  • スロベニア語
  • 南アゼルバイジャン語
  • スペイン語
  • スンダ語
  • スワヒリ語
  • スウェーデン語
  • タガログ語
  • タジク語
  • タミール語
  • タタール語
  • テルグ語
  • タイ語
  • トルコ語
  • ウクライナ語
  • ウルドゥ語
  • ウズベク語
  • ベトナム語
  • ヴォラピュク
  • ワライ語
  • ウェールズ語
  • 西フリジア語
  • 西パンジャブ語
  • ヨルバ語

モデルの詳細​

入力の種類​

JSON

入力の説明​

文字列に分類されるテキスト: 'I loved this movie.'

出力の説明​

予測されたクラス名を伴う JSON、そのクラス予測に対する関連付けられた信頼度 (0~1)。

例:

{
  "prediction": "Positive", 
  "confidence": 0.9422031841278076
}
{
  "prediction": "Positive", 
  "confidence": 0.9422031841278076
}

GPU の推奨​

既定では、GPU が推奨されます。

トレーニングが有効​

既定では、トレーニングは有効化されています。

パイプライン​

このパッケージでは、3 つの種類のパイプライン (フル トレーニング、トレーニング、評価) がすべてサポートされています。ほとんどのユース ケースでは、パラメーターを指定する必要がなく、モデルは高度な手法を使用して高性能なモデルを検出します。2 回目以降のトレーニングでは、モデルは増分学習を使用します (トレーニングの実行の最後で、その前にトレーニングされたバージョンが使用されます)。

データセットの形式​

このモデルのデータセットを構成するために、JSON、CSV、 AI Center の JSON 形式 (ラベル付けツールのエクスポート形式でもあります) の 3 つのオプションを使用できます。このモデルは、指定したディレクトリ内のすべての CSV ファイルと JSON ファイルを読み取ります。このモデルでは、すべての形式に対して 2 つの列または 2 つのプロパティが必要です dataset.input_column_nameと dataset.target_column_name既定です。これら 2 つの列および/またはディレクトリの名前は、環境変数を使用して設定できます。

CSV ファイル形式​

各 CSV ファイルには任意の数の列を含めることができますが、モデルで使用されるのは dataset.input_column_name と dataset.target_column_name パラメーターで指定された 2 列のみです。

CSV ファイル形式の例については、次のサンプルと環境変数を確認してください。

text, label
I like this movie, 7
I hated the acting, 9
text, label
I like this movie, 7
I hated the acting, 9

前の例の環境変数は次のようになります。

  • dataset.input_format: auto
  • dataset.input_column_name: text
  • dataset.output_column_name: label
JSON ファイル形式​

複数のデータポイントを同じ JSON ファイルに含めることができます。

JSON ファイル形式の例については、次のサンプルと環境変数を確認してください。

[
  {
    "text": "I like this movie",
    "label": "7"
  },
  {
    "text": "I hated the acting",
    "label": "9"
  }
]
[
  {
    "text": "I like this movie",
    "label": "7"
  },
  {
    "text": "I hated the acting",
    "label": "9"
  }
]

前の例の環境変数は次のようになります。

  • dataset.input_format: auto
  • dataset.input_column_name: text
  • dataset.output_column_name: label
ai_center ファイル形式​

これは、設定できる環境変数の既定値です。このモデルは、指定されたディレクトリにある、 .json の拡張子を持つすべてのファイルを読み取ります。

ai_center ファイル形式の例については、次のサンプルと環境変数を確認してください。

{
    "annotations": {
        "intent": {
            "to_name": "text",
            "choices": [
                "TransactionIssue",
                "LoanIssue"
            ]
        },
        "sentiment": {
            "to_name": "text",
            "choices": [
                "Very Positive"
            ]
        },
        "ner": {
            "to_name": "text",
            "labels": [
                {
                    "start_index": 37,
                    "end_index": 47,
                    "entity": "Stakeholder",
                    "value": " Citi Bank"
                },
                {
                    "start_index": 51,
                    "end_index": 61,
                    "entity": "Date",
                    "value": "07/19/2018"
                },
                {
                    "start_index": 114,
                    "end_index": 118,
                    "entity": "Amount",
                    "value": "$500"
                },
                {
                    "start_index": 288,
                    "end_index": 293,
                    "entity": "Stakeholder",
                    "value": " Citi"
                }
            ]
        }
    },
    "data": {
        "cc": "",
        "to": "xyz@abc.com",
        "date": "1/29/2020 12:39:01 PM",
        "from": "abc@xyz.com",
        "text": "I opened my new checking account with Citi Bank in 07/19/2018 and met the requirements for the promotion offer of $500 . It has been more than 6 months and I have not received any bonus. I called the customer service several times in the past few months but no any response. I request the Citi honor its promotion offer as advertised."
{
    "annotations": {
        "intent": {
            "to_name": "text",
            "choices": [
                "TransactionIssue",
                "LoanIssue"
            ]
        },
        "sentiment": {
            "to_name": "text",
            "choices": [
                "Very Positive"
            ]
        },
        "ner": {
            "to_name": "text",
            "labels": [
                {
                    "start_index": 37,
                    "end_index": 47,
                    "entity": "Stakeholder",
                    "value": " Citi Bank"
                },
                {
                    "start_index": 51,
                    "end_index": 61,
                    "entity": "Date",
                    "value": "07/19/2018"
                },
                {
                    "start_index": 114,
                    "end_index": 118,
                    "entity": "Amount",
                    "value": "$500"
                },
                {
                    "start_index": 288,
                    "end_index": 293,
                    "entity": "Stakeholder",
                    "value": " Citi"
                }
            ]
        }
    },
    "data": {
        "cc": "",
        "to": "xyz@abc.com",
        "date": "1/29/2020 12:39:01 PM",
        "from": "abc@xyz.com",
        "text": "I opened my new checking account with Citi Bank in 07/19/2018 and met the requirements for the promotion offer of $500 . It has been more than 6 months and I have not received any bonus. I called the customer service several times in the past few months but no any response. I request the Citi honor its promotion offer as advertised."

前のサンプル JSON を利用するには、環境変数を次のように設定する必要があります。

  • dataset.input_format: ai_center
  • dataset.input_column_name: data.text
  • dataset.output_column_name: annotations.intent.choices

GPU または CPU に対するトレーニング​

トレーニングには GPU または CPU を使用できます。より高速な GPU を使用することをお勧めします。

環境変数​

  • dataset.input_column_name
    • テキストが含まれる入力列の名前です。
    • 既定値は data.text です。
    • この変数は、お使いの入力 JSON または CSV ファイルに従って設定します。
  • dataset.target_column_name
    • テキストが含まれるターゲット列の名前です。
    • 既定値は annotations.intent.choices です。
    • この変数は、お使いの入力 JSON または CSV ファイルに従って設定します。
  • dataset.input_format
    • トレーニング データの入力形式です。
    • 既定値は ai_center です。
    • サポートされている値は ai_center または auto です。
    • ai_center を選択した場合は、JSON ファイルのみがサポートされます。また、ai_center を選択した場合は、dataset.target_column_nameの値を annotations.sentiment.choices に変更します。
    • auto を選択した場合は、CoNLL ファイルと JSON ファイルの両方がサポートされます。
  • model.epochs
    • エポック数です。
    • 既定値は 100 です。

成果物​

混同行列​

分類レポート​
precision    recall  f1-score   support
         positive     0.94      0.94      0.94     10408
         negative     0.93      0.93      0.93      9592
    accuracy                              0.94     20000
   macro avg          0.94      0.94      0.94     20000
weighted avg          0.94      0.94      0.94     20000
precision    recall  f1-score   support
         positive     0.94      0.94      0.94     10408
         negative     0.93      0.93      0.93      9592
    accuracy                              0.94     20000
   macro avg          0.94      0.94      0.94     20000
weighted avg          0.94      0.94      0.94     20000

データ​

評価 CSV ファイル​

これは、評価に使用されるテスト セットに関する予測を含む CSV ファイルです。

text,label,predict,confidence
I like this movie, positive, positive, 0.99
I hated the acting, negative, negative, 0.98
text,label,predict,confidence
I like this movie, positive, positive, 0.99
I hated the acting, negative, negative, 0.98

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得