Document Models - Analyze Document

Analyseert document met documentmodel.

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

URI-parameters

Name In Vereist Type Description
endpoint
path True

string

url

Ondersteunde Cognitive Services-eindpunten (protocol en hostnaam, bijvoorbeeld: https://westus2.api.cognitive.microsoft.com).

modelId
path True

string

Unieke documentmodelnaam.

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

api-version
query True

string

Aangevraagde API-versie.

features
query

DocumentAnalysisFeature[]

Lijst met optionele analysefuncties.

locale
query

string

Landinstellingenhint voor tekstherkenning en documentanalyse. De waarde mag alleen de taalcode bevatten (bijvoorbeeld 'en', 'fr') of de taalcode BCP 47 (bijvoorbeeld 'en-US').

pages
query

string

Lijst met te analyseren paginanummers op basis van 1. Bijvoorbeeld "1-3,5,7-9"

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

stringIndexType
query

StringIndexType

Methode die wordt gebruikt voor het berekenen van tekenreeks offset en lengte.

Aanvraagkoptekst

Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif", "text/html", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.presentationml.presentation"

Name Vereist Type Description
Ocp-Apim-Subscription-Key True

string

De geheime sleutel voor uw Azure Cognitive Services-abonnement.

Aanvraagbody

Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif", "text/html", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.presentationml.presentation"

Name Type Description
base64Source

string

Base64-codering van het document dat moet worden geanalyseerd. UrlSource of base64Source moet worden opgegeven.

urlSource

string

Document-URL om te analyseren. UrlSource of base64Source moet worden opgegeven.

Antwoorden

Name Type Description
202 Accepted

De aanvraag is in de wachtrij geplaatst.

Headers

Operation-Location: string

Other Status Codes

ErrorResponse

Er is een fout opgetreden.

Beveiliging

Ocp-Apim-Subscription-Key

De geheime sleutel voor uw Azure Cognitive Services-abonnement.

Type: apiKey
In: header

Voorbeelden

Analyze Document from Base64
Analyze Document from Url

Analyze Document from Base64

Sample Request

POST https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2023-07-31

{
  "base64Source": "e2Jhc2U2NEVuY29kZWRQZGZ9"
}

Sample Response

Operation-Location: https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2023-07-31

Analyze Document from Url

Sample Request

POST https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/customModel:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2023-07-31

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

Sample Response

Operation-Location: https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/customModel/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2023-07-31

Definities

Name Description
AnalyzeDocumentRequest

Parameters voor documentanalyse.

DocumentAnalysisFeature

Lijst met optionele analysefuncties.

Error

Foutinformatie.

ErrorResponse

Foutreactieobject.

InnerError

Gedetailleerde fout.

StringIndexType

Methode die wordt gebruikt voor het berekenen van tekenreeks offset en lengte.

AnalyzeDocumentRequest

Parameters voor documentanalyse.

Name Type Description
base64Source

string

Base64-codering van het document dat moet worden geanalyseerd. UrlSource of base64Source moet worden opgegeven.

urlSource

string

Document-URL om te analyseren. UrlSource of base64Source moet worden opgegeven.

DocumentAnalysisFeature

Lijst met optionele analysefuncties.

Name Type Description
barcodes

string

Schakel de detectie van streepjescodes in het document in.

formulas

string

Schakel de detectie van wiskundige expressies in het document in.

keyValuePairs

string

Schakel de detectie van algemene sleutelwaardeparen (formuliervelden) in het document in.

languages

string

Schakel de detectie van de taal van de tekstinhoud in.

ocrHighResolution

string

Ocr uitvoeren met een hogere resolutie voor het verwerken van documenten met kleine lettertjes.

styleFont

string

Schakel de herkenning van verschillende lettertypestijlen in.

Error

Foutinformatie.

Name Type Description
code

string

Foutcode.

details

Error[]

Lijst met gedetailleerde fouten.

innererror

InnerError

Gedetailleerde fout.

message

string

Foutbericht.

target

string

Doel van de fout.

ErrorResponse

Foutreactieobject.

Name Type Description
error

Error

Foutinformatie.

InnerError

Gedetailleerde fout.

Name Type Description
code

string

Foutcode.

innererror

InnerError

Gedetailleerde fout.

message

string

Foutbericht.

StringIndexType

Methode die wordt gebruikt voor het berekenen van tekenreeks offset en lengte.

Name Type Description
textElements

string

Door de gebruiker waargenomen weergaveteken of grafemecluster, zoals gedefinieerd door Unicode 8.0.0.

unicodeCodePoint

string

Tekeneenheid die wordt vertegenwoordigd door één Unicode-codepunt. Wordt gebruikt door Python 3.

utf16CodeUnit

string

Tekeneenheid die wordt vertegenwoordigd door een 16-bits Unicode-code-eenheid. Wordt gebruikt door JavaScript, Java en .NET.