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 |
model
|
path | True |
string |
一意のドキュメント モデル名。 正規表現パターン: |
api-version
|
query | True |
要求された API バージョン。 |
|
locale
|
query |
string |
テキスト認識とドキュメント分析のロケール ヒント。 値には言語コード ("en" や "fr" など) または BCP 47 言語タグ ("en-US" など) が含まれていることがあります。 |
|
pages
|
query |
string |
分析する 1 から始まるページ番号の一覧。 例: "1-3,5,7-9" 正規表現パターン: |
|
string
|
query |
文字列のオフセットと長さを計算するために使用されるメソッド。 |
要求ヘッダー
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 |
要求は正常にキューに入れられます。 ヘッダー Operation-Location: string |
|
Other Status Codes |
エラーが発生しました。 |
セキュリティ
Ocp-Apim-Subscription-Key
型:
apiKey
/:
header
例
Analyze |
Analyze |
AnalyzeDocument_Base64
要求のサンプル
POST {endpoint}/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31
{
"base64Source": ""
}
応答のサンプル
Operation-Location: {endpoint}/formrecognizer/documentModels/prebuilt-layout/analyzeResults/{resultId}?api-version=2022-08-31
AnalyzeDocument_Url
要求のサンプル
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"
}
応答のサンプル
Operation-Location: {endpoint}/formrecognizer/documentModels/customModel/analyzeResults/{resultId}?api-version=2022-08-31
定義
名前 | 説明 |
---|---|
Analyze |
ドキュメント分析パラメーター。 |
Api |
API バージョン。 |
Error |
エラー情報。 |
Error |
エラー応答オブジェクト。 |
Inner |
詳細なエラー。 |
String |
文字列のオフセットと長さを計算するために使用されるメソッド。 |
AnalyzeDocumentRequest
ドキュメント分析パラメーター。
名前 | 型 | 説明 |
---|---|---|
base64Source |
string |
分析するドキュメントの Base64 エンコード |
urlSource |
string |
分析するドキュメント URL |
ApiVersion
API バージョン。
名前 | 型 | 説明 |
---|---|---|
2022-08-31 |
string |
Error
エラー情報。
名前 | 型 | 説明 |
---|---|---|
code |
string |
エラー コード。 |
details |
Error[] |
詳細なエラーの一覧。 |
innererror |
詳細なエラー。 |
|
message |
string |
エラー メッセージ。 |
target |
string |
エラーのターゲット。 |
ErrorResponse
エラー応答オブジェクト。
名前 | 型 | 説明 |
---|---|---|
error |
エラー情報。 |
InnerError
詳細なエラー。
名前 | 型 | 説明 |
---|---|---|
code |
string |
エラー コード。 |
innererror |
詳細なエラー。 |
|
message |
string |
エラー メッセージ。 |
StringIndexType
文字列のオフセットと長さを計算するために使用されるメソッド。
名前 | 型 | 説明 |
---|---|---|
textElements |
string |
|
unicodeCodePoint |
string |
|
utf16CodeUnit |
string |