Share via


Document Classifiers - Classify Document From Stream

ドキュメント分類子を使用してドキュメントを分類します。

POST {endpoint}/documentintelligence/documentClassifiers/{classifierId}:analyze?api-version=2024-02-29-preview
POST {endpoint}/documentintelligence/documentClassifiers/{classifierId}:analyze?api-version=2024-02-29-preview&stringIndexType={stringIndexType}&split={split}

URI パラメーター

名前 / 必須 説明
classifierId
path True

string

一意のドキュメント分類子名。

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

endpoint
path True

string

ドキュメント インテリジェンス サービス エンドポイント。

api-version
query True

string

この操作に使用する API バージョン。

split
query

SplitMode

ドキュメント分割モード。

stringIndexType
query

StringIndexType

文字列のオフセットと長さを計算するために使用されるメソッド。

要求本文

Media Types: "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif", "text/html", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.presentationml.presentation"

名前 説明
input

string

入力コンテンツ。

応答

名前 説明
202 Accepted

要求は処理のために受け入れられますが、処理はまだ完了していません。

Headers

  • Operation-Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

予期しないエラー応答。

セキュリティ

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

名前 説明
https://cognitiveservices.azure.com/.default

Classify Document from Url

Sample Request

POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/classifierId:analyze?api-version=2024-02-29-preview&stringIndexType=textElements

"{binaryFile}"

Sample Response

Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/customClassifier/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2024-02-29-preview

定義

名前 説明
Error

error オブジェクト。

ErrorResponse

エラー応答オブジェクト。

InnerError

エラーに関するより具体的な情報を含むオブジェクト。

SplitMode

ドキュメント分割モード。

StringIndexType

文字列のオフセットと長さを計算するために使用されるメソッド。

Error

error オブジェクト。

名前 説明
code

string

サーバー定義のエラー コードのセットの 1 つ。

details

Error[]

この報告されたエラーの原因となった特定のエラーに関する詳細の配列。

innererror

InnerError

エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。

message

string

エラーの人間が判読できる表現。

target

string

エラーのターゲット。

ErrorResponse

エラー応答オブジェクト。

名前 説明
error

Error

エラー情報。

InnerError

エラーに関するより具体的な情報を含むオブジェクト。

名前 説明
code

string

サーバー定義のエラー コードのセットの 1 つ。

innererror

InnerError

内部エラー。

message

string

エラーの人間が判読できる表現。

SplitMode

ドキュメント分割モード。

名前 説明
auto

string

ファイルをドキュメントに自動的に分割します。

none

string

ファイル全体を 1 つのドキュメントとして扱います。

perPage

string

ファイル内の各ページを個別のドキュメントとして扱います。

StringIndexType

文字列のオフセットと長さを計算するために使用されるメソッド。

名前 説明
textElements

string

Unicode 8.0.0 で定義されているユーザー認識表示文字 (Grapheme クラスター)。

unicodeCodePoint

string

1 つの Unicode コード ポイントで表される文字単位。 Python 3 で使用されます。

utf16CodeUnit

string

16 ビット Unicode コード単位で表される文字単位。 JavaScript、Java、.NET で使用されます。