次の方法で共有


Document Models - Analyze Document

ドキュメント モデルを使用してドキュメントを分析します。

POST {endpoint}/formrecognizer/documentModels/{modelId}:analyze?api-version=2022-08-31
POST {endpoint}/formrecognizer/documentModels/{modelId}:analyze?pages={pages}&locale={locale}&stringIndexType={stringIndexType}&api-version=2022-08-31

URI パラメーター

名前 / 必須 説明
endpoint
path True

string

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

modelId
path True

string

一意のドキュメント モデル名。

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

api-version
query True

ApiVersion

要求された API バージョン。

locale
query

string

テキスト認識とドキュメント分析のロケール ヒント。 値には言語コード ("en" や "fr" など) または BCP 47 言語タグ ("en-US" など) が含まれていることがあります。

pages
query

string

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

Regex pattern: ^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$

stringIndexType
query

StringIndexType

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

要求ヘッダー

Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif"

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

string

要求本文

Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif"

名前 説明
base64Source

string

分析するドキュメントの Base64 エンコード

urlSource

string

分析するドキュメント URL

応答

名前 説明
202 Accepted

要求は正常にキューに入れられます。

Headers

Operation-Location: string

Other Status Codes

ErrorResponse

エラーが発生しました。

セキュリティ

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

AnalyzeDocument_Base64
AnalyzeDocument_Url

AnalyzeDocument_Base64

Sample Request

POST {endpoint}/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31

{
  "base64Source": ""
}

Sample Response

Operation-Location: {endpoint}/formrecognizer/documentModels/prebuilt-layout/analyzeResults/{resultId}?api-version=2022-08-31

AnalyzeDocument_Url

Sample Request

POST {endpoint}/formrecognizer/documentModels/customModel:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31

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

Sample Response

Operation-Location: {endpoint}/formrecognizer/documentModels/customModel/analyzeResults/{resultId}?api-version=2022-08-31

定義

名前 説明
AnalyzeDocumentRequest

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

ApiVersion

API バージョン。

Error

エラー情報。

ErrorResponse

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

InnerError

詳細なエラー。

StringIndexType

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

AnalyzeDocumentRequest

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

名前 説明
base64Source

string

分析するドキュメントの Base64 エンコード

urlSource

string

分析するドキュメント URL

ApiVersion

API バージョン。

名前 説明
2022-08-31

string

Error

エラー情報。

名前 説明
code

string

エラー コード。

details

Error[]

詳細なエラーの一覧。

innererror

InnerError

詳細なエラー。

message

string

エラー メッセージ。

target

string

エラーのターゲット。

ErrorResponse

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

名前 説明
error

Error

エラー情報。

InnerError

詳細なエラー。

名前 説明
code

string

エラー コード。

innererror

InnerError

詳細なエラー。

message

string

エラー メッセージ。

StringIndexType

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

名前 説明
textElements

string

unicodeCodePoint

string

utf16CodeUnit

string