Udostępnij za pośrednictwem


DocumentAnalysisClient.AnalyzeDocument Method

Definition

Analyzes pages from one or more documents, using a model built with custom documents or one of the prebuilt models provided by the Form Recognizer service.

public virtual Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeDocumentOperation AnalyzeDocument (Azure.WaitUntil waitUntil, string modelId, System.IO.Stream document, Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeDocumentOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeDocument : Azure.WaitUntil * string * System.IO.Stream * Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeDocumentOptions * System.Threading.CancellationToken -> Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeDocumentOperation
override this.AnalyzeDocument : Azure.WaitUntil * string * System.IO.Stream * Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeDocumentOptions * System.Threading.CancellationToken -> Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeDocumentOperation
Public Overridable Function AnalyzeDocument (waitUntil As WaitUntil, modelId As String, document As Stream, Optional options As AnalyzeDocumentOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AnalyzeDocumentOperation

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation.

modelId
String

The ID of the model to use for analyzing the input documents. When using a custom built model for analysis, this parameter must be the ID attributed to the model during its creation. When using one of the service's prebuilt models, one of the supported prebuilt model IDs must be passed. Prebuilt model IDs can be found at https://aka.ms/azsdk/formrecognizer/models.

document
Stream

The stream containing one or more documents to analyze.

options
AnalyzeDocumentOptions

A set of options available for configuring the analyze request. For example, specify the locale of the document, or which pages to analyze.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

An AnalyzeDocumentOperation to wait on this long-running operation. Its Value upon successful completion will contain analyzed pages from the input document.

Applies to