Document Models - Analyze Document
ドキュメント モデルを使用してドキュメントを分析します。
POST {endpoint}/documentintelligence/documentModels/{modelId}:analyze?_overload=analyzeDocument&api-version=2024-02-29-preview
POST {endpoint}/documentintelligence/documentModels/{modelId}:analyze?_overload=analyzeDocument&api-version=2024-02-29-preview&pages={pages}&locale={locale}&stringIndexType={stringIndexType}&features={features}&queryFields={queryFields}&outputContentFormat={outputContentFormat}
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
endpoint
|
path | True |
string |
ドキュメント インテリジェンス サービス エンドポイント。 |
model
|
path | True |
string |
一意のドキュメント モデル名。 Regex pattern: |
api-version
|
query | True |
string |
この操作に使用する API バージョン。 |
features
|
query |
Document |
オプションの分析機能の一覧。 |
|
locale
|
query |
string |
テキスト認識とドキュメント分析のためのロケール ヒント。 値には言語コード ("en" や "fr" など) または BCP 47 言語タグ ("en-US" など) が含まれていることがあります。 |
|
output
|
query |
Content |
分析結果の最上位コンテンツの形式。 |
|
pages
|
query |
string |
分析する 1 から始まるページ番号の一覧。 例: "1-3,5,7-9" Regex pattern: |
|
query
|
query |
string[] |
抽出する追加フィールドの一覧。 例: "NumberOfGuests,StoreNumber" |
|
string
|
query |
String |
文字列のオフセットと長さを計算するために使用されるメソッド。 |
要求本文
名前 | 型 | 説明 |
---|---|---|
base64Source |
string |
分析するドキュメントの Base64 エンコード。 urlSource または base64Source を指定する必要があります。 |
urlSource |
string |
分析するドキュメント URL。 urlSource または base64Source を指定する必要があります。 |
応答
名前 | 型 | 説明 |
---|---|---|
202 Accepted |
要求は処理のために受け入れられますが、処理はまだ完了していません。 Headers
|
|
Other Status Codes |
Error |
予期しないエラー応答。 |
セキュリティ
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 |
例
Analyze Document from Base64 |
Analyze Document from Url |
Analyze Document from Base64
Sample Request
POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-layout:analyze?_overload=analyzeDocument&api-version=2024-02-29-preview&pages=1-2,4&locale=en-US&stringIndexType=textElements
{
"base64Source": "e2Jhc2U2NEVuY29kZWRQZGZ9"
}
Sample Response
Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-layout/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2024-02-29-preview
Analyze Document from Url
Sample Request
POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/customModel:analyze?_overload=analyzeDocument&api-version=2024-02-29-preview&pages=1-2,4&locale=en-US&stringIndexType=textElements
{
"urlSource": "http://host.com/doc.pdf"
}
Sample Response
Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/customModel/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2024-02-29-preview
定義
名前 | 説明 |
---|---|
Analyze |
ドキュメント分析パラメーター。 |
Content |
分析結果のコンテンツの形式。 |
Document |
オプションの分析機能の一覧。 |
Error |
error オブジェクト。 |
Error |
エラー応答オブジェクト。 |
Inner |
エラーに関するより具体的な情報を含むオブジェクト。 |
String |
文字列のオフセットと長さを計算するために使用されるメソッド。 |
AnalyzeDocumentRequest
ドキュメント分析パラメーター。
名前 | 型 | 説明 |
---|---|---|
base64Source |
string |
分析するドキュメントの Base64 エンコード。 urlSource または base64Source を指定する必要があります。 |
urlSource |
string |
分析するドキュメント URL。 urlSource または base64Source を指定する必要があります。 |
ContentFormat
分析結果のコンテンツの形式。
名前 | 型 | 説明 |
---|---|---|
markdown |
string |
セクション見出し、テーブルなどを含むドキュメント コンテンツのマークダウン表現。 |
text |
string |
書式設定のないドキュメント コンテンツのプレーン テキスト表現。 |
DocumentAnalysisFeature
オプションの分析機能の一覧。
名前 | 型 | 説明 |
---|---|---|
barcodes |
string |
ドキュメント内のバーコードの検出を有効にします。 |
formulas |
string |
ドキュメント内の数式の検出を有効にします。 |
keyValuePairs |
string |
ドキュメント内の一般的なキー値ペア (フォーム フィールド) の検出を有効にします。 |
languages |
string |
テキスト コンテンツ言語の検出を有効にします。 |
ocrHighResolution |
string |
高解像度で OCR を実行して、細かい印刷でドキュメントを処理します。 |
queryFields |
string |
queryFields クエリ パラメーターを使用して、追加のフィールドの抽出を有効にします。 |
styleFont |
string |
さまざまなフォント スタイルの認識を有効にします。 |
Error
error オブジェクト。
名前 | 型 | 説明 |
---|---|---|
code |
string |
サーバー定義のエラー コードのセットの 1 つ。 |
details |
Error[] |
この報告されたエラーの原因となった特定のエラーに関する詳細の配列。 |
innererror |
Inner |
エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。 |
message |
string |
エラーの人間が判読できる表現。 |
target |
string |
エラーのターゲット。 |
ErrorResponse
エラー応答オブジェクト。
名前 | 型 | 説明 |
---|---|---|
error |
エラー情報。 |
InnerError
エラーに関するより具体的な情報を含むオブジェクト。
名前 | 型 | 説明 |
---|---|---|
code |
string |
サーバー定義のエラー コードのセットの 1 つ。 |
innererror |
Inner |
内部エラー。 |
message |
string |
エラーの人間が判読できる表現。 |
StringIndexType
文字列のオフセットと長さを計算するために使用されるメソッド。
名前 | 型 | 説明 |
---|---|---|
textElements |
string |
Unicode 8.0.0 で定義されているユーザー認識表示文字 (Grapheme クラスター)。 |
unicodeCodePoint |
string |
1 つの Unicode コード ポイントで表される文字単位。 Python 3 で使用されます。 |
utf16CodeUnit |
string |
16 ビット Unicode コード単位で表される文字単位。 JavaScript、Java、.NET で使用されます。 |