Sdílet prostřednictvím


Document Classifiers - Build Classifier

Vytvoří vlastní klasifikátor dokumentů.

POST {endpoint}/documentintelligence/documentClassifiers:build?api-version=2024-02-29-preview

Parametry identifikátoru URI

Name V Vyžadováno Typ Description
endpoint
path True

string

Koncový bod služby Document Intelligence.

api-version
query True

string

Verze rozhraní API, která se má použít pro tuto operaci.

Text požadavku

Name Vyžadováno Typ Description
classifierId True

string

Jedinečný název klasifikátoru dokumentu.

docTypes True

<string,  ClassifierDocumentTypeDetails>

Seznam typů dokumentů, které se mají klasifikovat.

baseClassifierId

string

Založte classifierId, nad kterým chcete vytrénovat klasifikátor.

description

string

Popis klasifikátoru dokumentu

Odpovědi

Name Typ Description
202 Accepted

Žádost byla přijata ke zpracování, ale zpracování ještě nebylo dokončeno.

Headers

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

ErrorResponse

Neočekávaná chybová odpověď.

Zabezpečení

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

Name Description
https://cognitiveservices.azure.com/.default

Příklady

Build Document Classifier

Sample Request

POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers:build?api-version=2024-02-29-preview

{
  "classifierId": "myClassifier",
  "description": "Classifier description",
  "docTypes": {
    "formA": {
      "azureBlobSource": {
        "containerUrl": "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken",
        "prefix": "formADocs/"
      }
    },
    "formB": {
      "azureBlobFileListSource": {
        "containerUrl": "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken",
        "fileList": "formB.jsonl"
      }
    }
  }
}

Sample Response

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

Definice

Name Description
AzureBlobContentSource

Azure Blob Storage obsah.

AzureBlobFileListContentSource

Seznam souborů v Azure Blob Storage.

BuildDocumentClassifierRequest

Text žádosti o vytvoření nového vlastního klasifikátoru dokumentů

ClassifierDocumentTypeDetails

Informace o typu dokumentu klasifikátoru

ContentSourceKind

Typ zdroje obsahu.

Error

Objekt chyby.

ErrorResponse

Objekt odpovědi na chybu.

InnerError

Objekt obsahující konkrétnější informace o chybě.

AzureBlobContentSource

Azure Blob Storage obsah.

Name Typ Description
containerUrl

string

Azure Blob Storage adresu URL kontejneru.

prefix

string

Předpona názvu objektu blob.

AzureBlobFileListContentSource

Seznam souborů v Azure Blob Storage.

Name Typ Description
containerUrl

string

Azure Blob Storage adresu URL kontejneru.

fileList

string

Cesta k souboru JSONL v kontejneru určující podmnožinu dokumentů

BuildDocumentClassifierRequest

Text žádosti o vytvoření nového vlastního klasifikátoru dokumentů

Name Typ Description
baseClassifierId

string

Založte classifierId, nad kterým chcete vytrénovat klasifikátor.

classifierId

string

Jedinečný název klasifikátoru dokumentu.

description

string

Popis klasifikátoru dokumentu

docTypes

<string,  ClassifierDocumentTypeDetails>

Seznam typů dokumentů, které se mají klasifikovat.

ClassifierDocumentTypeDetails

Informace o typu dokumentu klasifikátoru

Name Typ Description
azureBlobFileListSource

AzureBlobFileListContentSource

Azure Blob Storage seznam souborů určující trénovací data pro typ dokumentu klasifikátoru. Je nutné zadat azureBlobSource nebo azureBlobFileListSource.

azureBlobSource

AzureBlobContentSource

Azure Blob Storage umístění obsahující trénovací data pro typ dokumentu klasifikátoru. Je nutné zadat azureBlobSource nebo azureBlobFileListSource.

sourceKind

ContentSourceKind

Typ zdroje trénovacích dat

ContentSourceKind

Typ zdroje obsahu.

Name Typ Description
azureBlob

string

Soubory v cestě v rámci kontejneru Azure Blob Storage.

azureBlobFileList

string

Seznam souborů určující jednotlivé soubory v kontejneru Azure Blob Storage.

base64

string

Obsah reprezentovaný kódováním Base64

url

string

Obsah na konkrétní adrese URL

Error

Objekt chyby.

Name Typ Description
code

string

Jeden ze serverem definovaných chybových kódů.

details

Error[]

Pole podrobností o konkrétních chybách, které vedly k této nahlášené chybě.

innererror

InnerError

Objekt obsahující konkrétnější informace o chybě než aktuální objekt.

message

string

Lidsky čitelná reprezentace chyby.

target

string

Cíl chyby.

ErrorResponse

Objekt odpovědi na chybu.

Name Typ Description
error

Error

Informace o chybě.

InnerError

Objekt obsahující konkrétnější informace o chybě.

Name Typ Description
code

string

Jeden ze serverem definovaných chybových kódů.

innererror

InnerError

Vnitřní chyba.

message

string

Lidsky čitelná reprezentace chyby.