document-understanding
2.2610
true
Document Understanding api guide
- 基本情報
- Examples Using the Document Understanding™ API v1
- ライセンス
- トラブルシューティング
ドキュメントを分類する
curl example for submitting a document classification POST request to the Document Understanding API using the project ID from the Discovery Service.
ドキュメントの分類を開始する
ヒント:
プロジェクト ID は、プロジェクトの情報の取得呼び出しから受け取った応答から取得します。
curl -X 'POST' \
'https://{fqdn}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/classifiers/ml-classification/classification?api-version=1' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"documentId": "25a03e48-cfe8-ed11-9f75-000d3a4964af"
}'
curl -X 'POST' \
'https://{fqdn}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/classifiers/ml-classification/classification?api-version=1' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"documentId": "25a03e48-cfe8-ed11-9f75-000d3a4964af"
}'
ドキュメントの分類の応答
{
"classificationResults": [
{
"documentTypeId": "invoices",
"documentId": "25a03e48-cfe8-ed11-9f75-000d3a4964af",
"confidence": 0.6170391,
"ocrConfidence": -1,
"reference": {
"textStartIndex": 0,
"textLength": 0,
"tokens": []
},
"documentBounds": {
"pageRange": "1",
"pageCount": 1
},
"classifierName": "ML Classification (Preview)"
}
]
}
{
"classificationResults": [
{
"documentTypeId": "invoices",
"documentId": "25a03e48-cfe8-ed11-9f75-000d3a4964af",
"confidence": 0.6170391,
"ocrConfidence": -1,
"reference": {
"textStartIndex": 0,
"textLength": 0,
"tokens": []
},
"documentBounds": {
"pageRange": "1",
"pageCount": 1
},
"classifierName": "ML Classification (Preview)"
}
]
}
注:
この例は、Camelcase プロパティ名を使用する API v1 応答を示しています。API v2 は、すべてのルートで PascalCase のプロパティ名を返します。詳しくは、「 オートメーションを Document Understanding API v1 から v2 に移行する」をご覧ください。
ドキュメントの境界
documentBounds オブジェクトは、分類結果が適用される入力ファイルのページを識別します。
| プロパティ | 入力 | 説明 |
|---|---|---|
pageRange | string | 結果の対象となるページ (1 から番号が付けられます)。1 つのページは "3" として、範囲は "1-3"として表示されます。分類器がファイルを複数のドキュメントに分割する場合、各結果には専用の範囲があります。 |
pageCount | integer | pageRangeのページ数です。 |
注:
startPage、textStartIndex、textLength の各プロパティは非推奨になりました。後方互換性のために応答には引き続きそれらが含まれますが、その値には分割されたドキュメントのページ範囲は反映されません。pageRange と pageCount が置換されます。