Document Classifiers - Build Classifier

Vytvoří vlastní klasifikátor dokumentů.

POST {endpoint}/formrecognizer/documentClassifiers:build?api-version=2023-07-31

Parametry identifikátoru URI

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

string

url

Podporované koncové body služeb Cognitive Services (protokol a název hostitele, například: https://westus2.api.cognitive.microsoft.com).

api-version
query True

string

Požadovaná verze rozhraní API

Hlavička požadavku

Name Vyžadováno Typ Description
Ocp-Apim-Subscription-Key True

string

Tajný klíč vašeho předplatného služeb Azure Cognitive Services.

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.

description

string

Popis klasifikátoru dokumentu

Odpovědi

Name Typ Description
202 Accepted

Požadavek se úspěšně zařadil do fronty.

Headers

Operation-Location: string

Other Status Codes

ErrorResponse

Došlo k chybě.

Zabezpečení

Ocp-Apim-Subscription-Key

Tajný klíč vašeho předplatného služeb Azure Cognitive Services.

Type: apiKey
In: header

Příklady

Build Document Classifier

Sample Request

POST https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentClassifiers:build?api-version=2023-07-31

{
  "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/formrecognizer/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2023-07-31

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

Error

Informace o chybě.

ErrorResponse

Objekt odpovědi na chybu.

InnerError

Podrobná chyba

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ů pro trénování

BuildDocumentClassifierRequest

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

Name Typ Description
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 buď azureBlobSource, nebo azureBlobFileListSource.

azureBlobSource

AzureBlobContentSource

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

Error

Informace o chybě.

Name Typ Description
code

string

Kód chyby

details

Error[]

Seznam podrobných chyb

innererror

InnerError

Podrobná chyba

message

string

Chybová zpráva.

target

string

Cíl chyby.

ErrorResponse

Objekt odpovědi na chybu.

Name Typ Description
error

Error

Informace o chybě.

InnerError

Podrobná chyba

Name Typ Description
code

string

Kód chyby

innererror

InnerError

Podrobná chyba

message

string

Chybová zpráva.