次の方法で共有


Document Models - Compose Model

既存のドキュメント モデルのドキュメントの種類から新しいドキュメント モデルを作成します。

POST {endpoint}/documentintelligence/documentModels:compose?api-version=2024-11-30

URI パラメーター

名前 / 必須 説明
endpoint
path True

string (uri)

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

api-version
query True

string

minLength: 1

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

要求本文

名前 必須 説明
classifierId True

string

入力ファイルを分割して分類するカスタム分類子。

docTypes True

<string,  DocumentTypeDetails>

サポートされている docTypes を対応するドキュメント モデルにディクショナリ マッピングします。

modelId True

string

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

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

description

string

maxLength: 4096

ドキュメント モデルの説明。

split

SplitMode

ファイル分割の動作。

tags

object

ドキュメント モデルに関連付けられているキーと値のタグ属性の一覧。

応答

名前 説明
202 Accepted

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

ヘッダー

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

DocumentIntelligenceErrorResponse

予期しないエラー応答。

セキュリティ

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

Compose Document Model

要求のサンプル

POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels:compose?api-version=2024-11-30

{
  "modelId": "composedModel",
  "description": "Composed model description",
  "classifierId": "customClassifier",
  "docTypes": {
    "formA": {
      "modelId": "model1"
    },
    "formB": {
      "modelId": "model2"
    }
  }
}

応答のサンプル

Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2024-11-30

定義

名前 説明
ComposeDocumentModelRequest

コンポーネント ドキュメント モデルから構成済みドキュメント モデルを作成するための要求本文。

DocumentAnalysisFeature

有効にするドキュメント分析機能。

DocumentBuildMode

カスタム ドキュメント モデルのビルド モード。

DocumentFieldSchema

JSON スキーマ スタイル構文を使用したフィールド セマンティック スキーマの説明。

DocumentFieldType

フィールド値のセマンティック データ型。

DocumentIntelligenceError

エラー オブジェクト。

DocumentIntelligenceErrorResponse

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

DocumentIntelligenceInnerError

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

DocumentTypeDetails

ドキュメントの種類の情報。

SplitMode

ファイル分割の動作。

ComposeDocumentModelRequest

コンポーネント ドキュメント モデルから構成済みドキュメント モデルを作成するための要求本文。

名前 規定値 説明
classifierId

string

入力ファイルを分割して分類するカスタム分類子。

description

string

maxLength: 4096

ドキュメント モデルの説明。

docTypes

<string,  DocumentTypeDetails>

サポートされている docTypes を対応するドキュメント モデルにディクショナリ マッピングします。

modelId

string

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

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

split

SplitMode

none

ファイル分割の動作。

tags

object

ドキュメント モデルに関連付けられているキーと値のタグ属性の一覧。

DocumentAnalysisFeature

有効にするドキュメント分析機能。

説明
barcodes

ドキュメント内のバーコードの検出を有効にします。

formulas

ドキュメント内の数式の検出を有効にします。

keyValuePairs

ドキュメント内の一般的なキー値ペア (フォーム フィールド) の検出を有効にします。

languages

テキスト コンテンツ言語の検出を有効にします。

ocrHighResolution

より高い解像度で OCR を実行して、細かい印刷でドキュメントを処理します。

queryFields

queryFields クエリ パラメーターを使用して、追加のフィールドの抽出を有効にします。

styleFont

さまざまなフォント スタイルの認識を有効にします。

DocumentBuildMode

カスタム ドキュメント モデルのビルド モード。

説明
neural

多様なビジュアル テンプレートを使用してドキュメントをサポートします。

template

類似のビジュアル テンプレートを使用してドキュメントをターゲットに設定します。

DocumentFieldSchema

JSON スキーマ スタイル構文を使用したフィールド セマンティック スキーマの説明。

名前 説明
description

string

maxLength: 4096

フィールドの説明。

example

string

フィールドの内容の例。

items

DocumentFieldSchema

各配列要素のフィールド型スキーマ。

properties

<string,  DocumentFieldSchema>

オブジェクト フィールドの名前付きサブフィールド。

type

DocumentFieldType

フィールド値のセマンティック データ型。

DocumentFieldType

フィールド値のセマンティック データ型。

説明
address

解析されたアドレス。

array

同じ型のサブフィールドの一覧。

boolean

true または false に正規化されたブール値。

countryRegion

ISO 3166-1 alpha-3 形式 (米国など) に正規化された国/地域。

currency

オプションの通貨記号と単位を含む通貨金額。

date

ISO 8601 (YYYY-MM-DD) 形式に正規化された日付。

integer

64 ビット符号付き整数に正規化された整数。

number

倍精度浮動小数点に正規化された浮動小数点数。

object

潜在的に異なる型のサブフィールドの名前付きリスト。

phoneNumber

E.164 (+{CountryCode}{SubscriberNumber}) 形式に正規化された電話番号。

selectionGroup

選択した文字列値の配列。

selectionMark

フィールドは選択されていますか?

signature

署名は存在しますか?

string

プレーン テキスト。

time

ISO 8601 (hh:mm:ss) 形式に正規化された時間。

DocumentIntelligenceError

エラー オブジェクト。

名前 説明
code

string

サーバー定義の一連のエラー コードの 1 つ。

details

DocumentIntelligenceError[]

この報告されたエラーの原因となった特定のエラーに関する詳細の配列。

innererror

DocumentIntelligenceInnerError

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

message

string

エラーの人間が判読できる表現。

target

string

エラーのターゲット。

DocumentIntelligenceErrorResponse

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

名前 説明
error

DocumentIntelligenceError

エラー情報。

DocumentIntelligenceInnerError

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

名前 説明
code

string

サーバー定義の一連のエラー コードの 1 つ。

innererror

DocumentIntelligenceInnerError

内部エラー。

message

string

エラーの人間が判読できる表現。

DocumentTypeDetails

ドキュメントの種類の情報。

名前 説明
buildMode

DocumentBuildMode

カスタム ドキュメント モデルのビルド モード。

confidenceThreshold

number (float)

docType の信頼度がしきい値を超えている場合にのみ、分析を実行します。

description

string

maxLength: 4096

ドキュメント モデルの説明。

features

DocumentAnalysisFeature[]

オプションの分析機能の一覧。

fieldConfidence

object

各フィールドの推定信頼度。

fieldSchema

<string,  DocumentFieldSchema>

JSON スキーマ スタイル構文を使用したドキュメント セマンティック スキーマの説明。

maxDocumentsToAnalyze

integer (int32)

分析する指定した種類のドキュメントの最大数。 Default=all。

modelId

string

maxLength: 64
pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

指定した型のドキュメントの分析に使用するドキュメント モデル。

queryFields

string[]

抽出する追加フィールドの一覧。 旧。 "NumberOfGuests,StoreNumber"

SplitMode

ファイル分割の動作。

説明
auto

ファイルをドキュメントに自動的に分割します。

none

ファイル全体を 1 つのドキュメントとして扱います。

perPage

ファイル内の各ページを個別のドキュメントとして扱います。