次の方法で共有


Document Classifiers - Classify Document

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

POST {endpoint}/documentintelligence/documentClassifiers/{classifierId}:analyze?_overload=classifyDocument&api-version=2024-07-31-preview
POST {endpoint}/documentintelligence/documentClassifiers/{classifierId}:analyze?_overload=classifyDocument&api-version=2024-07-31-preview&stringIndexType={stringIndexType}&split={split}&pages={pages}

URI パラメーター

名前 / 必須 説明
classifierId
path True

string

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

正規表現パターン: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

endpoint
path True

string

uri

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

api-version
query True

string

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

pages
query

string

分析する 1 から始まるページ番号の一覧。 旧。 "1-3,5,7-9"

正規表現パターン: ^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$

split
query

SplitMode

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

stringIndexType
query

StringIndexType

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

要求本文

名前 説明
base64Source

string

分類するドキュメントの Base64 エンコード。 urlSource または base64Source を指定する必要があります。

urlSource

string

分類するドキュメント URL。 urlSource または base64Source を指定する必要があります。

応答

名前 説明
202 Accepted

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

ヘッダー

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

ErrorResponse

予期しないエラー応答。

セキュリティ

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?_overload=classifyDocument&api-version=2024-07-31-preview&stringIndexType=textElements

{
  "urlSource": "http://host.com/doc.pdf"
}

応答のサンプル

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

定義

名前 説明
ClassifyDocumentRequest

ドキュメント分類パラメーター。

Error

エラー オブジェクト。

ErrorResponse

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

InnerError

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

SplitMode

ファイル分割の動作。

StringIndexType

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

ClassifyDocumentRequest

ドキュメント分類パラメーター。

名前 説明
base64Source

string

分類するドキュメントの Base64 エンコード。 urlSource または base64Source を指定する必要があります。

urlSource

string

分類するドキュメント URL。 urlSource または base64Source を指定する必要があります。

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 によって使用されます。