Document Models - Analyze Document

문서 모델을 사용하여 문서를 분석합니다.

POST {endpoint}/formrecognizer/documentModels/{modelId}:analyze?api-version=2022-08-31
POST {endpoint}/formrecognizer/documentModels/{modelId}:analyze?pages={pages}&locale={locale}&stringIndexType={stringIndexType}&api-version=2022-08-31

URI 매개 변수

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

string

지원되는 Cognitive Services 엔드포인트(프로토콜 및 호스트 이름( 예: https://westus2.api.cognitive.microsoft.com).

modelId
path True

string

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

고유한 문서 모델 이름입니다.

api-version
query True

ApiVersion

요청된 API 버전입니다.

locale
query

string

텍스트 인식 및 문서 분석에 대한 로캘 힌트입니다. 값은 언어 코드(예: "en", "fr") 또는 BCP 47 언어 태그(예: "en-US")만 포함할 수 있습니다.

pages
query

string

pattern: ^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$

분석할 1부터 시작하는 페이지 번호 목록입니다. 전. "1-3,5,7-9"

stringIndexType
query

StringIndexType

문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다.

요청 헤더

Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif"

Name 필수 형식 Description
Ocp-Apim-Subscription-Key True

string

요청 본문

Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif"

Name 형식 Description
base64Source

string (byte)

분석할 문서의 Base64 인코딩

urlSource

string (uri)

분석할 문서 URL

응답

Name 형식 Description
202 Accepted

요청이 성공적으로 큐에 대기됩니다.

헤더

Operation-Location: string

Other Status Codes

ErrorResponse

오류가 발생했습니다.

보안

Ocp-Apim-Subscription-Key

형식: apiKey
In(다음 안에): header

예제

AnalyzeDocument_Base64
AnalyzeDocument_Url

AnalyzeDocument_Base64

샘플 요청

POST {endpoint}/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31

{
  "base64Source": ""
}

샘플 응답

Operation-Location: {endpoint}/formrecognizer/documentModels/prebuilt-layout/analyzeResults/{resultId}?api-version=2022-08-31

AnalyzeDocument_Url

샘플 요청

POST {endpoint}/formrecognizer/documentModels/customModel:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31

{
  "urlSource": "http://host.com/doc.pdf"
}

샘플 응답

Operation-Location: {endpoint}/formrecognizer/documentModels/customModel/analyzeResults/{resultId}?api-version=2022-08-31

정의

Name Description
AnalyzeDocumentRequest

문서 분석 매개 변수입니다.

ApiVersion

API 버전입니다.

Error

오류 정보입니다.

ErrorResponse

오류 응답 개체입니다.

InnerError

자세한 오류입니다.

StringIndexType

문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다.

AnalyzeDocumentRequest

문서 분석 매개 변수입니다.

Name 형식 Description
base64Source

string (byte)

분석할 문서의 Base64 인코딩

urlSource

string (uri)

분석할 문서 URL

ApiVersion

API 버전입니다.

값 Description
2022-08-31

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

오류 메시지입니다.

StringIndexType

문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다.

값 Description
textElements
unicodeCodePoint
utf16CodeUnit