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). |
model
|
path | True |
string |
고유한 문서 모델 이름입니다. Regex pattern: |
api-version
|
query | True |
요청된 API 버전입니다. |
|
locale
|
query |
string |
텍스트 인식 및 문서 분석을 위한 로캘 힌트입니다. 값에는 언어 코드(예: "en", "fr") 또는 BCP 47 언어 태그(예: "en-US")만 포함될 수 있습니다. |
|
pages
|
query |
string |
분석할 1 기반 페이지 번호 목록입니다. 예: "1-3,5,7-9" Regex pattern: |
|
string
|
query |
문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다. |
요청 헤더
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 |
분석할 문서의 Base64 인코딩 |
urlSource |
string |
분석할 문서 URL |
응답
Name | 형식 | Description |
---|---|---|
202 Accepted |
요청이 성공적으로 큐에 대기됩니다. Headers Operation-Location: string |
|
Other Status Codes |
오류가 발생했습니다. |
보안
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
예제
Analyze |
Analyze |
AnalyzeDocument_Base64
Sample Request
POST {endpoint}/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31
{
"base64Source": ""
}
Sample Response
Operation-Location: {endpoint}/formrecognizer/documentModels/prebuilt-layout/analyzeResults/{resultId}?api-version=2022-08-31
AnalyzeDocument_Url
Sample Request
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"
}
Sample Response
Operation-Location: {endpoint}/formrecognizer/documentModels/customModel/analyzeResults/{resultId}?api-version=2022-08-31
정의
Name | Description |
---|---|
Analyze |
문서 분석 매개 변수. |
Api |
API 버전. |
Error |
오류 정보입니다. |
Error |
오류 응답 개체입니다. |
Inner |
자세한 오류입니다. |
String |
문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다. |
AnalyzeDocumentRequest
문서 분석 매개 변수.
Name | 형식 | Description |
---|---|---|
base64Source |
string |
분석할 문서의 Base64 인코딩 |
urlSource |
string |
분석할 문서 URL |
ApiVersion
API 버전.
Name | 형식 | Description |
---|---|---|
2022-08-31 |
string |
Error
오류 정보입니다.
Name | 형식 | Description |
---|---|---|
code |
string |
오류 코드 |
details |
Error[] |
자세한 오류 목록입니다. |
innererror |
자세한 오류입니다. |
|
message |
string |
오류 메시지입니다. |
target |
string |
오류의 대상입니다. |
ErrorResponse
오류 응답 개체입니다.
Name | 형식 | Description |
---|---|---|
error |
오류 정보입니다. |
InnerError
자세한 오류입니다.
Name | 형식 | Description |
---|---|---|
code |
string |
오류 코드 |
innererror |
자세한 오류입니다. |
|
message |
string |
오류 메시지입니다. |
StringIndexType
문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다.
Name | 형식 | Description |
---|---|---|
textElements |
string |
|
unicodeCodePoint |
string |
|
utf16CodeUnit |
string |