Document Models - Get Model
Mendapatkan informasi model dokumen terperinci.
GET {endpoint}/formrecognizer/documentModels/{modelId}?api-version=2023-07-31
Parameter URI
Nama | Dalam | Diperlukan | Jenis | Deskripsi |
---|---|---|---|---|
endpoint
|
path | True |
string url |
Titik akhir Cognitive Services yang didukung (protokol dan nama host, misalnya: https://westus2.api.cognitive.microsoft.com). |
model
|
path | True |
string |
Nama model dokumen unik. Regex pattern: |
api-version
|
query | True |
string |
Versi API yang diminta. |
Header Permintaan
Nama | Diperlukan | Jenis | Deskripsi |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Kunci rahasia untuk langganan Azure Cognitive Services Anda. |
Respons
Nama | Jenis | Deskripsi |
---|---|---|
200 OK |
OK. |
|
Other Status Codes |
Terjadi kesalahan. |
Keamanan
Ocp-Apim-Subscription-Key
Kunci rahasia untuk langganan Azure Cognitive Services Anda.
Type:
apiKey
In:
header
Contoh
Get Custom Document Model |
Get Prebuilt Document Model |
Get Custom Document Model
Sample Request
GET https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/myCustomModel?api-version=2023-07-31
Sample Response
{
"modelId": "myCustomModel",
"description": "Custom model description",
"createdDateTime": "2021-09-24T12:54:35Z",
"expirationDateTime": "2023-01-01T00:00:00Z",
"apiVersion": "2023-07-31",
"docTypes": {
"myForm": {
"fieldSchema": {
"Name": {
"type": "string"
},
"Date": {
"type": "date"
},
"Amount": {
"type": "number"
}
},
"buildMode": "template",
"fieldConfidence": {
"Name": 0.9,
"Date": 0.95,
"Amount": 0.93
}
}
},
"tags": {
"createdBy": "myUserId"
}
}
Get Prebuilt Document Model
Sample Request
GET https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-invoice?api-version=2023-07-31
Sample Response
{
"modelId": "prebuilt-invoice",
"description": "Prebuilt model to extract key information from English invoices, including customer, vendor, invoice ID, due date, total, and more.",
"createdDateTime": "2021-07-30T00:00:00Z",
"apiVersion": "2023-07-31",
"docTypes": {
"prebuilt:invoice": {
"fieldSchema": {
"CustomerName": {
"type": "string"
},
"CustomerId": {
"type": "string"
},
"PurchaseOrder": {
"type": "string"
},
"InvoiceId": {
"type": "string"
},
"InvoiceDate": {
"type": "date"
},
"DueDate": {
"type": "date"
},
"VendorName": {
"type": "string"
},
"VendorAddress": {
"type": "string"
},
"VendorAddressRecipient": {
"type": "string"
},
"CustomerAddress": {
"type": "string"
},
"CustomerAddressRecipient": {
"type": "string"
},
"BillingAddress": {
"type": "string"
},
"BillingAddressRecipient": {
"type": "string"
},
"ShippingAddress": {
"type": "string"
},
"ShippingAddressRecipient": {
"type": "string"
},
"SubTotal": {
"type": "number"
},
"TotalTax": {
"type": "number"
},
"InvoiceTotal": {
"type": "number"
},
"AmountDue": {
"type": "number"
},
"PreviousUnpaidBalance": {
"type": "number"
},
"RemittanceAddress": {
"type": "string"
},
"RemittanceAddressRecipient": {
"type": "string"
},
"ServiceAddress": {
"type": "string"
},
"ServiceAddressRecipient": {
"type": "string"
},
"ServiceStartDate": {
"type": "date"
},
"ServiceEndDate": {
"type": "date"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Amount": {
"type": "number"
},
"Date": {
"type": "date"
},
"Description": {
"type": "string"
},
"Quantity": {
"type": "number"
},
"ProductCode": {
"type": "string"
},
"Tax": {
"type": "number"
},
"Unit": {
"type": "string"
},
"UnitPrice": {
"type": "number"
}
}
}
}
}
}
},
"tags": {}
}
Definisi
Nama | Deskripsi |
---|---|
Document |
Mode build model dokumen kustom. |
Document |
Deskripsi skema semantik bidang menggunakan sintaks gaya Skema JSON. |
Document |
Jenis data semantik dari nilai bidang. |
Document |
Info model dokumen. |
Document |
Info jenis dokumen. |
Error |
Info kesalahan. |
Error |
Objek respons kesalahan. |
Inner |
Kesalahan terperinci. |
DocumentBuildMode
Mode build model dokumen kustom.
Nama | Jenis | Deskripsi |
---|---|---|
neural |
string |
Dokumen dukungan dengan templat visual yang beragam. |
template |
string |
Menargetkan dokumen dengan templat visual serupa. |
DocumentFieldSchema
Deskripsi skema semantik bidang menggunakan sintaks gaya Skema JSON.
Nama | Jenis | Deskripsi |
---|---|---|
description |
string |
Deskripsi bidang. |
example |
string |
Contoh konten bidang. |
items |
Skema jenis bidang dari setiap elemen array. |
|
properties |
<string,
Document |
Sub-bidang bernama dari bidang objek. |
type |
Jenis data semantik dari nilai bidang. |
DocumentFieldType
Jenis data semantik dari nilai bidang.
Nama | Jenis | Deskripsi |
---|---|---|
address |
string |
Alamat yang diurai. |
array |
string |
Daftar subbidang dengan jenis yang sama. |
boolean |
string |
Nilai Boolean, dinormalisasi menjadi benar atau salah. |
countryRegion |
string |
Negara/wilayah, dinormalisasi ke format ISO 3166-1 alpha-3 (mis. AS). |
currency |
string |
Jumlah mata uang dengan simbol dan unit mata uang opsional. |
date |
string |
Tanggal, dinormalisasi ke format ISO 8601 (YYYY-MM-DD). |
integer |
string |
Bilangan bulat, dinormalisasi menjadi bilangan bulat bertanda 64-bit. |
number |
string |
Jumlah titik float, dinormalisasi ke titik mengambang presisi ganda. |
object |
string |
Daftar subbidang bernama dari jenis yang berpotensi berbeda. |
phoneNumber |
string |
Nomor telepon, dinormalisasi ke format E.164 (+{CountryCode}{SubscriberNumber}). |
selectionMark |
string |
Apakah bidang dipilih? |
signature |
string |
Apakah tanda tangan ada? |
string |
string |
Teks biasa. |
time |
string |
Waktu, dinormalisasi ke format ISO 8601 (hh:mm:ss). |
DocumentModelDetails
Info model dokumen.
Nama | Jenis | Deskripsi |
---|---|---|
apiVersion |
string |
Versi API yang digunakan untuk membuat model dokumen ini. |
createdDateTime |
string |
Tanggal dan waktu (UTC) saat model dokumen dibuat. |
description |
string |
Deskripsi model dokumen. |
docTypes |
<string,
Document |
Jenis dokumen yang didukung. |
expirationDateTime |
string |
Tanggal dan waktu (UTC) ketika model dokumen akan kedaluwarsa. |
modelId |
string |
Nama model dokumen unik. |
tags |
object |
Daftar atribut tag nilai kunci yang terkait dengan model dokumen. |
DocumentTypeDetails
Info jenis dokumen.
Nama | Jenis | Deskripsi |
---|---|---|
buildMode |
Mode build model dokumen kustom. |
|
description |
string |
Deskripsi model dokumen. |
fieldConfidence |
object |
Estimasi keyakinan untuk setiap bidang. |
fieldSchema |
<string,
Document |
Deskripsi skema semantik dokumen menggunakan sintaks gaya Skema JSON. |
Error
Info kesalahan.
Nama | Jenis | Deskripsi |
---|---|---|
code |
string |
Kode Kesalahan. |
details |
Error[] |
Daftar kesalahan terperinci. |
innererror |
Kesalahan terperinci. |
|
message |
string |
Pesan kesalahan. |
target |
string |
Target kesalahan. |
ErrorResponse
Objek respons kesalahan.
Nama | Jenis | Deskripsi |
---|---|---|
error |
Info kesalahan. |
InnerError
Kesalahan terperinci.
Nama | Jenis | Deskripsi |
---|---|---|
code |
string |
Kode Kesalahan. |
innererror |
Kesalahan terperinci. |
|
message |
string |
Pesan kesalahan. |