DocumentIntelligenceClient.AnalyzeDocumentAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AnalyzeDocumentAsync(WaitUntil, String, RequestContent, String, String, String, IEnumerable<DocumentAnalysisFeature>, IEnumerable<String>, String, IEnumerable<AnalyzeOutputOption>, RequestContext) |
[Protocol Method] Analyzes document with document model.
|
AnalyzeDocumentAsync(WaitUntil, String, AnalyzeDocumentContent, String, String, Nullable<StringIndexType>, IEnumerable<DocumentAnalysisFeature>, IEnumerable<String>, Nullable<ContentFormat>, IEnumerable<AnalyzeOutputOption>, CancellationToken) |
Analyzes document with document model. |
AnalyzeDocumentAsync(WaitUntil, String, RequestContent, String, String, String, IEnumerable<DocumentAnalysisFeature>, IEnumerable<String>, String, IEnumerable<AnalyzeOutputOption>, RequestContext)
[Protocol Method] Analyzes document with document model.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler AnalyzeDocumentAsync(WaitUntil, String, AnalyzeDocumentContent, String, String, Nullable<StringIndexType>, IEnumerable<DocumentAnalysisFeature>, IEnumerable<String>, Nullable<ContentFormat>, IEnumerable<AnalyzeOutputOption>, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Operation<BinaryData>> AnalyzeDocumentAsync (Azure.WaitUntil waitUntil, string modelId, Azure.Core.RequestContent content, string pages = default, string locale = default, string stringIndexType = default, System.Collections.Generic.IEnumerable<Azure.AI.DocumentIntelligence.DocumentAnalysisFeature> features = default, System.Collections.Generic.IEnumerable<string> queryFields = default, string outputContentFormat = default, System.Collections.Generic.IEnumerable<Azure.AI.DocumentIntelligence.AnalyzeOutputOption> output = default, Azure.RequestContext context = default);
abstract member AnalyzeDocumentAsync : Azure.WaitUntil * string * Azure.Core.RequestContent * string * string * string * seq<Azure.AI.DocumentIntelligence.DocumentAnalysisFeature> * seq<string> * string * seq<Azure.AI.DocumentIntelligence.AnalyzeOutputOption> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
override this.AnalyzeDocumentAsync : Azure.WaitUntil * string * Azure.Core.RequestContent * string * string * string * seq<Azure.AI.DocumentIntelligence.DocumentAnalysisFeature> * seq<string> * string * seq<Azure.AI.DocumentIntelligence.AnalyzeOutputOption> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
Public Overridable Function AnalyzeDocumentAsync (waitUntil As WaitUntil, modelId As String, content As RequestContent, Optional pages As String = Nothing, Optional locale As String = Nothing, Optional stringIndexType As String = Nothing, Optional features As IEnumerable(Of DocumentAnalysisFeature) = Nothing, Optional queryFields As IEnumerable(Of String) = Nothing, Optional outputContentFormat As String = Nothing, Optional output As IEnumerable(Of AnalyzeOutputOption) = Nothing, Optional context As RequestContext = Nothing) As Task(Of Operation(Of BinaryData))
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. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- modelId
- String
Unique document model name.
- content
- RequestContent
The content to send as the body of the request.
- pages
- String
List of 1-based page numbers to analyze. Ex. "1-3,5,7-9".
- locale
- String
Locale hint for text recognition and document analysis. Value may contain only the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US").
- stringIndexType
- String
Method used to compute string offset and length. Allowed values: "textElements" | "unicodeCodePoint" | "utf16CodeUnit".
- features
- IEnumerable<DocumentAnalysisFeature>
List of optional analysis features.
- queryFields
- IEnumerable<String>
List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber".
- outputContentFormat
- String
Format of the analyze result top-level content. Allowed values: "text" | "markdown".
- output
- IEnumerable<AnalyzeOutputOption>
Additional outputs to generate during analysis.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The Operation representing an asynchronous operation on the service.
Exceptions
modelId
is null.
modelId
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call AnalyzeDocumentAsync and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);
using RequestContent content = null;
Operation<BinaryData> operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "<modelId>", content);
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("apiVersion").ToString());
Console.WriteLine(result.GetProperty("modelId").ToString());
Console.WriteLine(result.GetProperty("stringIndexType").ToString());
Console.WriteLine(result.GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString());
This sample shows how to call AnalyzeDocumentAsync with all parameters and request content and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
urlSource = "http://localhost:3000",
base64Source = new object(),
});
Operation<BinaryData> operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "<modelId>", content, pages: "<pages>", locale: "<locale>", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "<queryFields>" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf });
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("apiVersion").ToString());
Console.WriteLine(result.GetProperty("modelId").ToString());
Console.WriteLine(result.GetProperty("stringIndexType").ToString());
Console.WriteLine(result.GetProperty("contentFormat").ToString());
Console.WriteLine(result.GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString());
Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString());
Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString());
Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueString").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueDate").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueTime").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valuePhoneNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueInteger").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueSelectionMark").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueSignature").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueCountryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueString").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueDate").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueTime").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueString").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueDate").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueTime").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valuePhoneNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueInteger").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueSelectionMark").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueSignature").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCountryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("amount").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("currencyCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("houseNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("poBox").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("road").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("city").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("postalCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("countryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("streetAddress").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("cityDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("stateDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("suburb").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("house").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("level").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueBoolean").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("valueSelectionGroup")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("<key>").GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueString").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueDate").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueTime").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valuePhoneNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueInteger").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueSelectionMark").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueSignature").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCountryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueString").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueDate").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueTime").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueArray")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("amount").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("currencyCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("houseNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("poBox").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("road").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("city").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("postalCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("countryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("streetAddress").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("cityDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("stateDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("suburb").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("house").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueAddress").GetProperty("level").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueBoolean").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("valueSelectionGroup")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueObject").GetProperty("<key>").GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("amount").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueCurrency").GetProperty("currencyCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("houseNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("poBox").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("road").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("city").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("postalCode").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("countryRegion").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("streetAddress").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("cityDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("stateDistrict").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("suburb").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("house").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueAddress").GetProperty("level").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueBoolean").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("valueSelectionGroup")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("spans")[0].GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("spans")[0].GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("<key>").GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString());
Applies to
AnalyzeDocumentAsync(WaitUntil, String, AnalyzeDocumentContent, String, String, Nullable<StringIndexType>, IEnumerable<DocumentAnalysisFeature>, IEnumerable<String>, Nullable<ContentFormat>, IEnumerable<AnalyzeOutputOption>, CancellationToken)
Analyzes document with document model.
public virtual System.Threading.Tasks.Task<Azure.Operation<Azure.AI.DocumentIntelligence.AnalyzeResult>> AnalyzeDocumentAsync (Azure.WaitUntil waitUntil, string modelId, Azure.AI.DocumentIntelligence.AnalyzeDocumentContent analyzeRequest = default, string pages = default, string locale = default, Azure.AI.DocumentIntelligence.StringIndexType? stringIndexType = default, System.Collections.Generic.IEnumerable<Azure.AI.DocumentIntelligence.DocumentAnalysisFeature> features = default, System.Collections.Generic.IEnumerable<string> queryFields = default, Azure.AI.DocumentIntelligence.ContentFormat? outputContentFormat = default, System.Collections.Generic.IEnumerable<Azure.AI.DocumentIntelligence.AnalyzeOutputOption> output = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeDocumentAsync : Azure.WaitUntil * string * Azure.AI.DocumentIntelligence.AnalyzeDocumentContent * string * string * Nullable<Azure.AI.DocumentIntelligence.StringIndexType> * seq<Azure.AI.DocumentIntelligence.DocumentAnalysisFeature> * seq<string> * Nullable<Azure.AI.DocumentIntelligence.ContentFormat> * seq<Azure.AI.DocumentIntelligence.AnalyzeOutputOption> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation<Azure.AI.DocumentIntelligence.AnalyzeResult>>
override this.AnalyzeDocumentAsync : Azure.WaitUntil * string * Azure.AI.DocumentIntelligence.AnalyzeDocumentContent * string * string * Nullable<Azure.AI.DocumentIntelligence.StringIndexType> * seq<Azure.AI.DocumentIntelligence.DocumentAnalysisFeature> * seq<string> * Nullable<Azure.AI.DocumentIntelligence.ContentFormat> * seq<Azure.AI.DocumentIntelligence.AnalyzeOutputOption> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation<Azure.AI.DocumentIntelligence.AnalyzeResult>>
Public Overridable Function AnalyzeDocumentAsync (waitUntil As WaitUntil, modelId As String, Optional analyzeRequest As AnalyzeDocumentContent = Nothing, Optional pages As String = Nothing, Optional locale As String = Nothing, Optional stringIndexType As Nullable(Of StringIndexType) = Nothing, Optional features As IEnumerable(Of DocumentAnalysisFeature) = Nothing, Optional queryFields As IEnumerable(Of String) = Nothing, Optional outputContentFormat As Nullable(Of ContentFormat) = Nothing, Optional output As IEnumerable(Of AnalyzeOutputOption) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Operation(Of AnalyzeResult))
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. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- modelId
- String
Unique document model name.
- analyzeRequest
- AnalyzeDocumentContent
Analyze request parameters.
- pages
- String
List of 1-based page numbers to analyze. Ex. "1-3,5,7-9".
- locale
- String
Locale hint for text recognition and document analysis. Value may contain only the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US").
- stringIndexType
- Nullable<StringIndexType>
Method used to compute string offset and length.
- features
- IEnumerable<DocumentAnalysisFeature>
List of optional analysis features.
- queryFields
- IEnumerable<String>
List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber".
- outputContentFormat
- Nullable<ContentFormat>
Format of the analyze result top-level content.
- output
- IEnumerable<AnalyzeOutputOption>
Additional outputs to generate during analysis.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
modelId
is null.
modelId
is an empty string, and was expected to be non-empty.
Examples
This sample shows how to call AnalyzeDocumentAsync.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);
Operation<AnalyzeResult> operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "<modelId>");
AnalyzeResult responseData = operation.Value;
This sample shows how to call AnalyzeDocumentAsync with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);
AnalyzeDocumentContent analyzeRequest = new AnalyzeDocumentContent
{
UrlSource = new Uri("http://localhost:3000"),
Base64Source = BinaryData.FromObjectAsJson(new object()),
};
Operation<AnalyzeResult> operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "<modelId>", analyzeRequest: analyzeRequest, pages: "<pages>", locale: "<locale>", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "<queryFields>" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf });
AnalyzeResult responseData = operation.Value;
Applies to
Azure SDK for .NET