次の方法で共有


Prediction - Get Version Prediction

アプリケーション バージョンの予測を取得します。

POST {Endpoint}/luis/prediction/v3.0/apps/{appId}/versions/{versionId}/predict
POST {Endpoint}/luis/prediction/v3.0/apps/{appId}/versions/{versionId}/predict?verbose={verbose}&show-all-intents={show-all-intents}&log={log}

URI パラメーター

名前 / 必須 説明
appId
path True

string (uuid)

アプリケーション ID。

Endpoint
path True

string

サポートされている Cognitive Services エンドポイント (プロトコルとホスト名、例: https://westus.api.cognitive.microsoft.com)。

versionId
path True

string

アプリケーション バージョン ID。

log
query

boolean

エンドポイント クエリをログに記録するかどうかを示します。

show-all-intents
query

boolean

応答内のすべての意図を返すか、上位の意図だけを返すかを示します。

verbose
query

boolean

エンティティ予測の追加メタデータを取得するかどうかを示します。

要求ヘッダー

名前 必須 説明
Ocp-Apim-Subscription-Key True

string

要求本文

名前 必須 説明
query True

string

予測するクエリ。

dynamicLists

DynamicList[]

この要求に対して動的に作成されたリスト エンティティ。

externalEntities

ExternalEntity[]

この要求の外部予測エンティティ。

options

PredictionRequestOptions

この要求に対して定義されているカスタム オプション。

応答

名前 説明
200 OK

PredictionResponse

指定されたクエリの予測。

Other Status Codes

Error

予期しないエラー。

セキュリティ

Ocp-Apim-Subscription-Key

型: apiKey
/: header

Successful Get Version Predictions From Endpoint Via Post request

要求のサンプル

POST {Endpoint}/luis/prediction/v3.0/apps/{Application Id}/versions/{Version Id}/predict


{
  "query": "forward to frank 30 dollars through HSBC",
  "options": {
    "datetimeReference": "2015-02-13T13:15:00.000Z"
  },
  "externalEntities": [
    {
      "entityName": "Bank",
      "startIndex": 36,
      "entityLength": 4,
      "resolution": {
        "text": "International Bank"
      }
    }
  ],
  "dynamicLists": [
    {
      "listEntityName": "Employees",
      "requestLists": [
        {
          "name": "Management",
          "canonicalForm": "Frank",
          "synonyms": []
        }
      ]
    }
  ]
}

応答のサンプル

{
  "query": "forward to frank 30 dollars through HSBC",
  "prediction": {
    "topIntent": "give",
    "intents": {
      "give": {
        "score": 0.943442
      }
    },
    "entities": {
      "Employees": [
        [
          "frank"
        ]
      ],
      "number": [
        30
      ],
      "money": [
        {
          "units": "Dollar",
          "value": 30
        }
      ],
      "Bank": [
        {
          "text": "International Bank"
        }
      ]
    },
    "sentiment": {
      "label": "positive",
      "score": 0.9163064
    }
  }
}

定義

名前 説明
DynamicList

リスト エンティティの拡張機能を定義します。

Error

発生したエラーを表します。

ErrorBody

発生したエラーの定義を表します。

ExternalEntity

既存のエンティティを拡張するユーザー予測エンティティを定義します。

Intent

意図の予測を表します。

Prediction

クエリの予測を表します。

PredictionRequest

予測要求パラメーターを表します。

PredictionRequestOptions

予測要求のカスタム オプション。

PredictionResponse

予測応答を表します。

RequestList

既存のリスト エンティティに追加するサブリストを定義します。

Sentiment

センチメント分析の結果。

DynamicList

リスト エンティティの拡張機能を定義します。

名前 説明
listEntityName

string

拡張するリスト エンティティの名前。

requestLists

RequestList[]

拡張リスト エンティティに追加するリスト。

Error

発生したエラーを表します。

名前 説明
error

ErrorBody

発生したエラーの定義を表します。

ErrorBody

発生したエラーの定義を表します。

名前 説明
code

string

エラー コード。

message

string

エラー メッセージ。

ExternalEntity

既存のエンティティを拡張するユーザー予測エンティティを定義します。

名前 説明
entityLength

integer (int32)

予測されるエンティティの長さ。

entityName

string

拡張するエンティティの名前。

resolution

ユーザーがエンティティの予測として返すカスタム解決を指定しました。

score

number (float)

エンティティの予測スコアとして返されるユーザー指定のスコア。

startIndex

integer (int32)

予測されたエンティティの開始文字インデックス。

Intent

意図の予測を表します。

名前 説明
childApp

Prediction

ディスパッチされたアプリケーションの予測。

score

number (float)

発生した意図のスコア。

Prediction

クエリの予測を表します。

名前 説明
alteredQuery

string

スペル チェック後のクエリ。 スペル チェックが有効で、スペル ミスが見つかった場合にのみ設定します。

entities

発生したエンティティを表すディクショナリ。

intents

<string,  Intent>

発生した意図を表すディクショナリ。

sentiment

Sentiment

センチメント分析の結果。

topIntent

string

上位スコア付け意図の名前。

PredictionRequest

予測要求パラメーターを表します。

名前 説明
dynamicLists

DynamicList[]

この要求に対して動的に作成されたリスト エンティティ。

externalEntities

ExternalEntity[]

この要求の外部予測エンティティ。

options

PredictionRequestOptions

この要求に対して定義されているカスタム オプション。

query

string

予測するクエリ。

PredictionRequestOptions

予測要求のカスタム オプション。

名前 説明
datetimeReference

string (date-time)

datetime エンティティの予測に使用される参照 DateTime。

preferExternalEntities

boolean

重複が発生した場合に、外部エンティティを解決して予測をオーバーライドするかどうかを指定します。

PredictionResponse

予測応答を表します。

名前 説明
prediction

Prediction

要求されたクエリの予測。

query

string

予測で使用されるクエリ。

RequestList

既存のリスト エンティティに追加するサブリストを定義します。

名前 説明
canonicalForm

string

サブリストの正規形式。

name

string

サブリストの名前。

synonyms

string[]

正規形式のシノニム。

Sentiment

センチメント分析の結果。

名前 説明
label

string

センチメント分析結果のラベル。

score

number (float)

クエリのセンチメント スコア。