Document Classifiers - Classify Document From Stream
ドキュメント分類子を使用してドキュメントを分類します。
POST {endpoint}/documentintelligence/documentClassifiers/{classifierId}:analyze?api-version=2024-07-31-preview
POST {endpoint}/documentintelligence/documentClassifiers/{classifierId}:analyze?api-version=2024-07-31-preview&stringIndexType={stringIndexType}&split={split}&pages={pages}
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
classifier
|
path | True |
string |
一意のドキュメント分類子名。 正規表現パターン: |
endpoint
|
path | True |
string uri |
ドキュメント インテリジェンス サービス エンドポイント。 |
api-version
|
query | True |
string |
この操作に使用する API バージョン。 |
pages
|
query |
string |
分析する 1 から始まるページ番号の一覧。 旧。 "1-3,5,7-9" 正規表現パターン: |
|
split
|
query |
ドキュメント分割モード。 |
||
string
|
query |
文字列のオフセットと長さを計算するために使用されるメソッド。 |
要求本文
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 |
要求は処理のために受け入れ済みですが、処理はまだ完了していません。 ヘッダー
|
|
Other Status Codes |
予期しないエラー応答。 |
セキュリティ
Ocp-Apim-Subscription-Key
型:
apiKey
/:
header
OAuth2Auth
型:
oauth2
フロー:
accessCode
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
Token URL (トークン URL):
https://login.microsoftonline.com/common/oauth2/token
スコープ
名前 | 説明 |
---|---|
https://cognitiveservices.azure.com/.default |
例
Classify Document from Url
要求のサンプル
POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/classifierId:analyze?api-version=2024-07-31-preview&stringIndexType=textElements
"{binaryFile}"
応答のサンプル
Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/customClassifier/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2024-07-31-preview
定義
名前 | 説明 |
---|---|
Error |
エラー オブジェクト。 |
Error |
エラー応答オブジェクト。 |
Inner |
エラーに関するより具体的な情報を含むオブジェクト。 |
Split |
ファイル分割の動作。 |
String |
文字列のオフセットと長さを計算するために使用されるメソッド。 |
Error
エラー オブジェクト。
名前 | 型 | 説明 |
---|---|---|
code |
string |
サーバー定義の一連のエラー コードの 1 つ。 |
details |
Error[] |
この報告されたエラーの原因となった特定のエラーに関する詳細の配列。 |
innererror |
エラーに関する現在のオブジェクトよりも具体的な情報を含むオブジェクト。 |
|
message |
string |
エラーの人間が判読できる表現。 |
target |
string |
エラーのターゲット。 |
ErrorResponse
エラー応答オブジェクト。
名前 | 型 | 説明 |
---|---|---|
error |
エラー情報。 |
InnerError
エラーに関するより具体的な情報を含むオブジェクト。
名前 | 型 | 説明 |
---|---|---|
code |
string |
サーバー定義の一連のエラー コードの 1 つ。 |
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 によって使用されます。 |