다음을 통해 공유


Document Classifiers - Build Classifier

사용자 지정 문서 분류자를 빌드합니다.

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

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
endpoint
path True

string

Document Intelligence 서비스 엔드포인트입니다.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 본문

Name 필수 형식 Description
classifierId True

string

고유한 문서 분류자 이름입니다.

docTypes True

<string,  ClassifierDocumentTypeDetails>

분류할 문서 형식 목록입니다.

baseClassifierId

string

분류자를 학습시킬 기본 classifierId입니다.

description

string

문서 분류자 설명입니다.

응답

Name 형식 Description
202 Accepted

처리를 위해 요청이 수락되었지만 처리가 아직 완료되지 않았습니다.

Headers

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

ErrorResponse

예기치 않은 오류 응답입니다.

보안

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

예제

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

정의

Name Description
AzureBlobContentSource

콘텐츠를 Azure Blob Storage.

AzureBlobFileListContentSource

Azure Blob Storage 파일 목록입니다.

BuildDocumentClassifierRequest

새 사용자 지정 문서 분류자를 빌드하기 위한 요청 본문입니다.

ClassifierDocumentTypeDetails

문서 형식 정보를 분류합니다.

ContentSourceKind

콘텐츠 원본의 형식입니다.

Error

Error 개체.

ErrorResponse

오류 응답 개체입니다.

InnerError

오류에 대한 보다 구체적인 정보를 포함하는 개체입니다.

AzureBlobContentSource

콘텐츠를 Azure Blob Storage.

Name 형식 Description
containerUrl

string

컨테이너 URL을 Azure Blob Storage.

prefix

string

Blob 이름 접두사입니다.

AzureBlobFileListContentSource

Azure Blob Storage 파일 목록입니다.

Name 형식 Description
containerUrl

string

컨테이너 URL을 Azure Blob Storage.

fileList

string

문서의 하위 집합을 지정하는 컨테이너 내의 JSONL 파일 경로입니다.

BuildDocumentClassifierRequest

새 사용자 지정 문서 분류자를 빌드하기 위한 요청 본문입니다.

Name 형식 Description
baseClassifierId

string

분류자를 학습시킬 기본 classifierId입니다.

classifierId

string

고유한 문서 분류자 이름입니다.

description

string

문서 분류자 설명입니다.

docTypes

<string,  ClassifierDocumentTypeDetails>

분류할 문서 형식 목록입니다.

ClassifierDocumentTypeDetails

문서 형식 정보를 분류합니다.

Name 형식 Description
azureBlobFileListSource

AzureBlobFileListContentSource

분류자 문서 형식에 대한 학습 데이터를 지정하는 파일 목록을 Azure Blob Storage. azureBlobSource 또는 azureBlobFileListSource를 지정해야 합니다.

azureBlobSource

AzureBlobContentSource

분류자 문서 형식에 대한 학습 데이터를 포함하는 위치를 Azure Blob Storage. azureBlobSource 또는 azureBlobFileListSource를 지정해야 합니다.

sourceKind

ContentSourceKind

학습 데이터 원본의 유형입니다.

ContentSourceKind

콘텐츠 원본의 형식입니다.

Name 형식 Description
azureBlob

string

Azure Blob Storage 컨테이너 내의 경로에 있는 파일입니다.

azureBlobFileList

string

Azure Blob Storage 컨테이너의 개별 파일을 지정하는 파일 목록입니다.

base64

string

Base64 인코딩을 통해 표시되는 콘텐츠입니다.

url

string

특정 URL의 콘텐츠입니다.

Error

Error 개체.

Name 형식 Description
code

string

서버 정의 오류 코드 집합 중 하나입니다.

details

Error[]

이 보고된 오류로 이어진 특정 오류에 대한 세부 정보 배열입니다.

innererror

InnerError

오류에 대한 현재 개체보다 더 구체적인 정보를 포함하는 개체입니다.

message

string

사람이 읽을 수 있는 오류 표현입니다.

target

string

오류의 대상입니다.

ErrorResponse

오류 응답 개체입니다.

Name 형식 Description
error

Error

오류 정보입니다.

InnerError

오류에 대한 보다 구체적인 정보를 포함하는 개체입니다.

Name 형식 Description
code

string

서버 정의 오류 코드 집합 중 하나입니다.

innererror

InnerError

내부 오류입니다.

message

string

사람이 읽을 수 있는 오류 표현입니다.