{"id":2823,"date":"2023-09-15T10:39:35","date_gmt":"2023-09-15T17:39:35","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=2823"},"modified":"2023-09-15T10:39:35","modified_gmt":"2023-09-15T17:39:35","slug":"new-features-in-the-azure-form-recognizer-client-libraries","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/new-features-in-the-azure-form-recognizer-client-libraries\/","title":{"rendered":"New features in the Azure Form Recognizer client libraries"},"content":{"rendered":"<p>We&#8217;re pleased to announce a stable release of the Azure Form Recognizer (<a href=\"https:\/\/techcommunity.microsoft.com\/t5\/azure-ai-services-blog\/azure-form-recognizer-is-now-azure-ai-document-intelligence-with\/ba-p\/3875765\">now known as Document Intelligence<\/a>) libraries for .NET, Python, Java, and JavaScript\/TypeScript.<\/p>\n<h2>Highlighted features<\/h2>\n<p>The new, stable release of the Form Recognizer client libraries targets the <code>2023-07-31<\/code> service version and includes many new features and quality improvements. For a complete list of what&#8217;s new, see <a href=\"https:\/\/learn.microsoft.com\/azure\/cognitive-services\/form-recognizer\/whats-new\">What&#8217;s new in Form Recognizer?<\/a>.\nThis blog post highlights the following features:<\/p>\n<ul>\n<li><a href=\"#document-classification\">Build a custom classification model for document splitting and classification<\/a><\/li>\n<li><a href=\"#add-on-recognition-capabilities\">Add-on recognition capabilities<\/a>\n<ul>\n<li><a href=\"#barcode-recognition\">Barcode recognition in documents<\/a><\/li>\n<li><a href=\"#high-resolution-recognition\">High-resolution recognition<\/a><\/li>\n<li><a href=\"#detect-formulas\">Detect formulas<\/a><\/li>\n<li><a href=\"#font-extraction\">Font extraction<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#support-for-new-prebuilt-models\">New prebuilt models support<\/a><\/li>\n<\/ul>\n<h2>Library availability<\/h2>\n<p>The new Form Recognizer libraries can be downloaded from each language&#8217;s preferred package manager.<\/p>\n<table>\n<thead>\n<tr>\n<th>Language<\/th>\n<th>Package<\/th>\n<th>Command<\/th>\n<th>Project<\/th>\n<th>Get started<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>.NET<\/td>\n<td><a href=\"https:\/\/www.nuget.org\/packages\/Azure.AI.FormRecognizer\">NuGet<\/a><\/td>\n<td><code>dotnet add package Azure.AI.FormRecognizer<\/code><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-net\/tree\/master\/sdk\/formrecognizer\/Azure.AI.FormRecognizer\">link<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-net\/tree\/main\/sdk\/formrecognizer\/Azure.AI.FormRecognizer#getting-started\">link<\/a><\/td>\n<\/tr>\n<tr>\n<td>Python<\/td>\n<td><a href=\"https:\/\/pypi.org\/project\/azure-ai-formrecognizer\/\">PyPI<\/a><\/td>\n<td><code>pip install azure-ai-formrecognizer<\/code><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-python\/tree\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer\">link<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-python\/tree\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer#getting-started\">link<\/a><\/td>\n<\/tr>\n<tr>\n<td>Java<\/td>\n<td><a href=\"https:\/\/central.sonatype.com\/artifact\/com.azure\/azure-ai-formrecognizer\">Maven<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/tree\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer#include-the-package\">Add to POM.xml file<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/tree\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer\">link<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/tree\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer#getting-started\">link<\/a><\/td>\n<\/tr>\n<tr>\n<td>JavaScript\/TypeScript<\/td>\n<td><a href=\"https:\/\/www.npmjs.com\/package\/@azure\/ai-form-recognizer\">npm<\/a><\/td>\n<td><code>npm install @azure\/ai-form-recognizer<\/code><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-js\/tree\/main\/sdk\/formrecognizer\/ai-form-recognizer\">link<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-js\/tree\/main\/sdk\/formrecognizer\/ai-form-recognizer#getting-started\">link<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Document classification<\/h3>\n<p>One of the most significant improvements in this version of the Form Recognizer library is the support to build a custom classification model for document splitting and classification.\nWith a custom-built classification model, users can now analyze a single- or multi-file document to identify if any of the trained document types are contained within an input file.<\/p>\n<p>The following samples illustrate how a single custom classification model can be built to analyze input documents related to a loan application package using the Form Recognizer library for Java.<\/p>\n<h4>Build a classification model<\/h4>\n<p>The following code builds a custom classification model trained to analyze a loan application package containing a loan application form, payslip, and bank statement.<\/p>\n<h5>Java<\/h5>\n<pre><code class=\"language-java\">DocumentModelAdministrationClient client = new DocumentModelAdministrationClientBuilder()\r\n  .credential(new AzureKeyCredential(\"{key}\"))\r\n  .endpoint(\"https:\/\/{endpoint}.cognitiveservices.azure.com\/\")\r\n  .buildClient();\r\n\r\n\/\/ Provide source for training the model\r\nContentSource loanApplnFormSource = new BlobContentSource(\"{SAS URL to your container}\");\r\nContentSource payslipSource = new BlobContentSource(\"{SAS URL to your container}\");\r\nContentSource bankStatementSource = new BlobContentSource(\"{SAS URL to your container}\");\r\n\r\nHashMap&lt;String, ClassifierDocumentTypeDetails&gt; docTypes = new HashMap&lt;&gt;();\r\ndocTypes.put(\"loan application form\", new ClassifierDocumentTypeDetails(loanApplnFormSource));\r\ndocTypes.put(\"payslip\", new ClassifierDocumentTypeDetails(payslipSource));\r\ndocTypes.put(\"bank statement\", new ClassifierDocumentTypeDetails(bankStatementSource));\r\n\r\n\/**\r\n * Alternatively, if you have a flat list of files to train the model, you can use the\r\n * BlobFileListContentSource type to train the model.\r\n *\/\r\nContentSource loanApplnFormListSource \r\n  = new BlobFileListContentSource(\"{SAS URL to your container}\", \"Loan-Application-Documents.jsonl\");\r\n\r\nHashMap&lt;String, ClassifierDocumentTypeDetails&gt; fileListDocTypes = new HashMap&lt;&gt;();\r\nfileListDocTypes.put(\"loan application form\", new ClassifierDocumentTypeDetails(loanApplnFormListSource));\r\n\r\n\/\/ Build a custom classifier document model\r\nSyncPoller&lt;OperationResult, DocumentClassifierDetails&gt; buildOperationPoller\r\n  = client.beginBuildDocumentClassifier(docTypes);\r\n\r\nDocumentClassifierDetails documentClassifierDetails = buildOperationPoller.getFinalResult();\r\n\r\n\/\/ Get the custom built classifier ID \r\nSystem.out.printf(\"Classifier ID: %s%n\", documentClassifierDetails.getClassifierId());<\/code><\/pre>\n<p>Find a similar example in other languages here:<\/p>\n<ul>\n<li>.NET &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-net\/blob\/main\/sdk\/formrecognizer\/Azure.AI.FormRecognizer\/samples\/Sample_BuildDocumentClassifier.md#build-a-document-classifier-1\">Build a document classifier<\/a><\/li>\n<li>Python &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-python\/blob\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer\/samples\/v3.2_and_later\/sample_build_classifier.py\">Build a document classifier<\/a><\/li>\n<li>JavaScript &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-js\/blob\/main\/sdk\/formrecognizer\/ai-form-recognizer\/samples\/v5\/javascript\/buildClassifier.js\">Build a document classifier<\/a><\/li>\n<\/ul>\n<blockquote><p>Note: Users can also build a classification model using <a href=\"https:\/\/aka.ms\/azsdk\/formrecognizer\/formrecognizerstudio\">Document Intelligence Studio<\/a>.<\/p><\/blockquote>\n<h4>Analyze a document using classification model<\/h4>\n<p>Now that the built custom classification model is ready, it can be used to identify the page ranges for the individual documents comprising loan applications, payslips, or bank statements. The following code shows how it can be used.<\/p>\n<p>For example, a user wants to classify a single document containing a mix of loan application forms and payslips.<\/p>\n<h5>Java<\/h5>\n<pre><code class=\"language-java\">\/\/ File URL to analyze\r\nString documentUrl = \"{URL to the sample document}\";\r\nSyncPoller&lt;OperationResult, AnalyzeResult&gt; syncPoller\r\n  = client.beginClassifyDocumentFromUrl(documentClassifierDetails.getClassifierId(),\r\n      documentUrl)\r\nAnalyzeResult analyzeResult = syncPoller.getFinalResult();\r\n\r\n\/\/ Notice the classified documents under each doc type\r\nanalyzeResult.getDocuments()\r\n  .forEach(analyzedDocument -&gt; System.out.printf(\"Doc Type: %s%n\", analyzedDocument.getDocType()));\r\n\r\n\/\/ Get identified\/classified page\/page ranges\r\nanalyzeResult.getPages().forEach(documentPage -&gt; {\r\n  System.out.printf(\"Page has width: %.2f and height: %.2f, measured with unit: %s%n\",\r\n      documentPage.getWidth(),\r\n      documentPage.getHeight(),\r\n      documentPage.getUnit());\r\n\r\n  \/\/ lines\r\n  documentPage.getLines().forEach(documentLine -&gt;\r\n      System.out.printf(\"Line '%s' is within a bounding box %s.%n\",\r\n          documentLine.getContent(),\r\n          documentLine.getBoundingPolygon().toString()));\r\n\r\n  \/\/ words\r\n  documentPage.getWords().forEach(documentWord -&gt;\r\n      System.out.printf(\"Word '%s' has a confidence score of %.2f.%n\",\r\n          documentWord.getContent(),\r\n          documentWord.getConfidence()));\r\n});<\/code><\/pre>\n<p>Find the preceding example in other languages here:<\/p>\n<ul>\n<li>.NET &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-net\/blob\/main\/sdk\/formrecognizer\/Azure.AI.FormRecognizer\/samples\/Sample_ClassifyDocument.md#classify-a-document-from-a-uri\">Classify a document<\/a><\/li>\n<li>Python &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-python\/blob\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer\/samples\/v3.2_and_later\/sample_classify_document.py\">Classify a document<\/a><\/li>\n<li>JavaScript &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-js\/blob\/main\/sdk\/formrecognizer\/ai-form-recognizer\/samples\/v5\/javascript\/classifyDocument.js\">Classify a document<\/a><\/li>\n<\/ul>\n<h3>Add-on recognition capabilities<\/h3>\n<p>Form Recognizer now supports more sophisticated analysis capabilities. These optional capabilities can be enabled and disabled depending on the scenario of the document extraction. The following add-on capabilities are available for service version <code>2023-07-31<\/code> and later releases:<\/p>\n<ul>\n<li><a href=\"#barcode-recognition\">ocr.barcode<\/a> &#8211; Support for extracting layout barcodes.<\/li>\n<li><a href=\"#high-resolution-recognition\">ocr.highResolution<\/a> &#8211; The task of recognizing small text from large documents.<\/li>\n<li><a href=\"#detect-formulas\">ocr.formula<\/a> &#8211; Detect formulas in documents, such as mathematical equations.<\/li>\n<li><a href=\"#font-extraction\">ocr.font<\/a> &#8211; Recognize font-related properties of extracted text.<\/li>\n<\/ul>\n<p>Users can use the add-on capabilities by including the <code>DocumentAnalysisFeature<\/code> object in the analysis request.<\/p>\n<h4>Barcode recognition<\/h4>\n<p>Many documents can now be detected using the barcode recognition feature of the library. Examples of such documents include healthcare and procurement-related document types in which critical information like patient ID is encoded in the barcode. The detected barcodes are represented in the <code>barcodes<\/code> collection as a top-level property under <code>DocumentPage<\/code>. Each object describes the:<\/p>\n<ul>\n<li>Barcode type (QRCode, UPCA, etc.).<\/li>\n<li>Decoded value (general string representing URL, number, or other data).<\/li>\n<li>Bounding polygon.<\/li>\n<li>Span within which the embedded barcode content as value resides.<\/li>\n<li>Overall extraction confidence.<\/li>\n<\/ul>\n<p>Users can use the following code to access the first barcode property of the first page on their respective analyzed result object.<\/p>\n<h5>Java<\/h5>\n<pre><code class=\"language-java\">DocumentBarcode barcode =\r\n    analyzeResult.getPages().get(0).getBarcodes().get(0);\r\nSystem.out.printf(\"Barcode kind: '%s'\", barcode.getKind());\r\n\r\n\/\/ Output:\r\n\/\/ Barcode kind: 'Code39'<\/code><\/pre>\n<h5>.NET<\/h5>\n<pre><code class=\"language-csharp\">DocumentBarcode barcode = analyzeResult.Pages[0].Barcodes[0];\r\n\r\nConsole.WriteLine($\"Barcode kind: '{barcode.Kind}'\");\r\n\r\n\/\/ Output:\r\n\/\/ Barcode kind: 'Code39'<\/code><\/pre>\n<h5>Python<\/h5>\n<pre><code class=\"language-python\">print(f\"Barcode kind: {result.pages[0].barcodes[0].kind}\") # \"Code39\"<\/code><\/pre>\n<h5>JavaScript<\/h5>\n<pre><code class=\"language-javascript\">const [barcode1, barcode2] = anaylzeResult.pages?.[0].barcodes as DocumentBarcode[];\r\nconsole.log(barcode1.kind); \/\/ \"Code39\"\r\nconsole.log(barcode1.value) \/\/ \"D589992-X\"<\/code><\/pre>\n<h4>High-resolution recognition<\/h4>\n<p>With this add-on feature, users can now easily extract content from complex documents comprising a mix of graphical and structural elements and have varying fonts, sizes, and orientations.<\/p>\n<p>For example, the following code includes the high-resolution recognition add-on feature when analyzing a document:<\/p>\n<h5>Java<\/h5>\n<pre><code class=\"language-java\">SyncPoller&lt;OperationResult, AnalyzeResult&gt; syncPoller\r\n  = client.beginAnalyzeDocumentFromUrl(\"prebuilt-layout\", \"sourceUrl\", \r\n      new AnalyzeDocumentOptions()\r\n        .setDocumentAnalysisFeatures(Collections.singletonList(DocumentAnalysisFeature.OCR_HIGH_RESOLUTION)));\r\nAnalyzeResult analyzeResult = syncPoller.getFinalResult();<\/code><\/pre>\n<h5>.NET<\/h5>\n<pre><code class=\"language-csharp\">var documentUri = new Uri(\"source-url\");\r\nvar options = new AnalyzeDocumentOptions\r\n{\r\n    Features = { DocumentAnalysisFeature.OcrHighResolution }\r\n};\r\n\r\nAnalyzeDocumentOperation operation = client.AnalyzeDocumentFromUri(\r\n    WaitUntil.Completed, \"prebuilt-layout\", documentUri, options);\r\nAnalyzeResult analyzeResult = operation.Value;<\/code><\/pre>\n<h5>Python<\/h5>\n<pre><code class=\"language-python\">poller = document_analysis_client.begin_analyze_document(\r\n      \"prebuilt-layout\",\r\n      document = document_to_analyze,\r\n      features = [AnalysisFeature.OCR_HIGH_RESOLUTION]\r\n)\r\nresult = poller.result()<\/code><\/pre>\n<h5>JavaScript<\/h5>\n<pre><code class=\"language-javascript\">const poller = await client.beginAnalyzeDocumentFromUrl(\"prebuilt-layout\", \"source-url\", {\r\n  features: [FormRecognizerFeature.OcrHighResolution],\r\n});\r\nconst anaylzeResult = await poller.pollUntilDone();<\/code><\/pre>\n<h4>Detect formulas<\/h4>\n<p>Formulae are often found in scientific document types and now can be detected with this add-on feature. The detected formulas are represented in the <code>formula<\/code> collection as a top-level property under <code>DocumentPage<\/code>. Each object describes the formula type as inline or display, and its LaTeX representation as the value along with its polygon coordinates.<\/p>\n<h5>Java<\/h5>\n<pre><code class=\"language-java\">DocumentFormula formula = analyzeResult.getPages().get(0).getFormulas().get(0);\r\nSystem.out.printf(\"Formula kind: '%s' %n\", formula.getKind());\r\nSystem.out.printf(\"Formula value: '%s'\", formula.getValue());\r\n\r\n\/\/ Output:\r\n\/\/ Formula kind: 'inline'\r\n\/\/ Formula value: 'a+b=c'<\/code><\/pre>\n<h5>.NET<\/h5>\n<pre><code class=\"language-csharp\">DocumentFormula formula = analyzeResult.Pages[0].Formulas[0];\r\n\r\nConsole.WriteLine($\"Formula kind: '{formula.Kind}'\");\r\nConsole.WriteLine($\"Formula value: '{formula.Value}'\");\r\n\r\n\/\/ Output:\r\n\/\/ Formula kind: 'inline'\r\n\/\/ Formula value: 'a+b=c'<\/code><\/pre>\n<h5>Python<\/h5>\n<pre><code class=\"language-python\">formula = result.pages[0].formulas[0]\r\nprint(f\"Formula kind: {formula.kind}\") # Formula kind: inline\r\nprint(f\"Formula value: {formula.value}\") # Formula value: a+b=c<\/code><\/pre>\n<h5>JavaScript<\/h5>\n<pre><code class=\"language-javascript\">const [formula1, formula2] = anaylzeResult.pages?.[0].formulas as DocumentFormula[];\r\nconsole.log(formula1.kind); \/\/ \"inline\"\r\nconsole.log(formula1.value) \/\/ \"a+b=c\"<\/code><\/pre>\n<h4>Font extraction<\/h4>\n<p>This add-on feature enables users to detect various font properties associated with the extracted text in the document. The detected font properties collection is represented in the top-level property <code>styles<\/code> under <code>DocumentPage<\/code>. <code>DocumentStyle<\/code> provides font-related properties, like <code>similarFontFamily<\/code>, specifying the visually most similar font within a supported documented set of fonts, <code>fontStyle<\/code>, <code>fontWeight<\/code>, <code>color<\/code>, and <code>backgroundColor<\/code> for the extracted text.<\/p>\n<p>The following code sample illustrates the use of <code>DocumentAnalysisFeature.STYLE_FONT<\/code> to extract font properties from text:<\/p>\n<h5>Java<\/h5>\n<pre><code class=\"language-java\">DocumentStyle documentStyle = analyzeResult.getStyles().get(0);\r\nSystem.out.printf(\"Font style: '%s' %n\", documentStyle.getFontStyle());\r\nSystem.out.printf(\"Font background color: '%s'\", documentStyle.getBackgroundColor());\r\n\r\n\/\/ Output:\r\n\/\/ Font style: 'italic'\r\n\/\/ Font background color: '#0000FF'<\/code><\/pre>\n<h5>.NET<\/h5>\n<pre><code class=\"language-csharp\">DocumentStyle documentStyle = analyzeResult.Styles[0];\r\n\r\nConsole.WriteLine($\"Font style: '{documentStyle.FontStyle}'\");\r\nConsole.WriteLine($\"Font background color: '{documentStyle.BackgroundColor}'\");\r\n\r\n\/\/ Output:\r\n\/\/ Font style: 'italic'\r\n\/\/ Font background color: '#0000FF'<\/code><\/pre>\n<h5>Python<\/h5>\n<pre><code class=\"language-python\">for style in result.styles:\r\n  if style.font_style:\r\n      print(f\"Font style: '{style.font_style}'\") # Font style: 'italic'\r\n  if style.background_color:\r\n      print(f\"Background color: '{style.background_color}'\") # Font background color: '#0000FF'<\/code><\/pre>\n<h5>JavaScript<\/h5>\n<pre><code class=\"language-javascript\">const [style1, style2] = anaylzeResult.styles as DocumentStyle[];\r\nconsole.log(style1.fontStyle);      \/\/ \"italic\"\r\nconsole.log(style2.backgroundColor) \/\/ \"#0000FF\"<\/code><\/pre>\n<h3>Support for new prebuilt models<\/h3>\n<p>New prebuilt models are now supported with Form Recognizer libraries to analyze:<\/p>\n<ul>\n<li>Contracts (<code>prebuilt-contract<\/code>)<\/li>\n<li>Tax forms (<code>prebuilt-tax.us.1098<\/code>, <code>prebuilt-tax.us.1098E<\/code>, <code>prebuilt-tax.us.1098T<\/code>)<\/li>\n<li>Health insurance cards (<code>prebuilt-healthInsuranceCard.us<\/code>)<\/li>\n<\/ul>\n<p>Prebuilt models offer the convenience of extracting fields from a document without having to build a model. To find more information about models, including a list of supported prebuilt models, see <a href=\"https:\/\/learn.microsoft.com\/azure\/applied-ai-services\/form-recognizer\/concept-model-overview\">Form Recognizer models<\/a>.<\/p>\n<p>The following code analyzes a healthcare card using a prebuilt model provided by the service:<\/p>\n<h5>Java<\/h5>\n<pre><code class=\"language-java\">SyncPoller&lt;OperationResult, AnalyzeResult&gt; syncPoller \r\n  = client.beginAnalyzeDocumentFromUrl(\"prebuilt-healthInsuranceCard.us\", \"URL to health document\").getSyncPoller();\r\n\r\nAnalyzeResult analyzeResult = syncPoller.getFinalResult();\r\n\r\nfor (int i = 0; i &lt; analyzeResult.getDocuments().size(); i++) {\r\n  System.out.printf(\"--------Analyzing health care card %d--------%n\", i);\r\n  AnalyzedDocument analyzedHealthCard = analyzeResults.getDocuments().get(i);\r\n  Map&lt;String, DocumentField&gt; healthCardFields = analyzedHealthCard.getFields();\r\n  System.out.printf(\"Health care insurer: '%s'%n\", healthCardFields.get(\"Insurer\").getValueAsString());\r\n  System.out.println(\"--------Member details --------\");\r\n  DocumentField memberDocumentField = healthCardFields.get(\"Member\");\r\n  if (memberDocumentField != null) { \r\n    if (DocumentFieldType.MAP == memberDocumentField.getType()) {\r\n      memberDocumentField.getValueAsMap().forEach((key, documentField) -&gt; {\r\n        if (\"Member.Name\".equals(key)) {\r\n          if (DocumentFieldType.STRING == documentField.getType()) {\r\n            String name = documentField.getValueAsString();\r\n            System.out.printf(\"\\tMember Name: %s, confidence: %.2f%n\", name, documentField.getConfidence());\r\n          }\r\n        }\r\n        if (\"Member.BirthDate\".equals(key)) {\r\n          if (DocumentFieldType.DATE == documentField.getType()) {\r\n            LocalDate birthDate = documentField.getValueAsDate();\r\n            System.out.printf(\"\\tMember birth date: %s, confidence: %.2f%n\",\r\n              birthDate, documentField.getConfidence());\r\n          }\r\n        }\r\n      }));\r\n    }\r\n  }\r\n}<\/code><\/pre>\n<p>Find a similar example in other languages here:<\/p>\n<ul>\n<li>.NET &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-net\/blob\/main\/sdk\/formrecognizer\/Azure.AI.FormRecognizer\/samples\/Sample_AnalyzeWithPrebuiltModel.md\">Analyze a document with a prebuilt model &#8211; &#8216;prebuilt-invoice&#8217;<\/a><\/li>\n<li>Python &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-python\/blob\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer\/samples\/v3.2_and_later\/sample_analyze_tax_us_w2.py\">Analyze with prebuilt model &#8211; &#8216;prebuilt-tax.us.W-2&#8217;<\/a><\/li>\n<li>JavaScript &#8211; <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-js\/blob\/main\/sdk\/formrecognizer\/ai-form-recognizer\/samples\/v5\/javascript\/analyzeReceiptByModelId.js\">Analyze with prebuilt model &#8211; &#8216;prebuilt-receipt&#8217;<\/a><\/li>\n<\/ul>\n<h2>Learn more<\/h2>\n<p>To learn more and to try the new features, see these links to our official documentation:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-net\/tree\/main\/sdk\/formrecognizer\/Azure.AI.FormRecognizer\">.NET<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-python\/tree\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer\">Python<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/tree\/main\/sdk\/formrecognizer\/azure-ai-formrecognizer\">Java<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-js\/tree\/main\/sdk\/formrecognizer\/ai-form-recognizer\">JavaScript\/TypeScript<\/a><\/li>\n<\/ul>\n<h2>Give us your feedback<\/h2>\n<p>We appreciate your feedback and encourage you to share your thoughts with us. We thrive on improvement and would welcome any suggestions you may have. Let&#8217;s work together to make our experience even better!<\/p>\n<p>You can reach out to us by filing issues in the language-specific GitHub repository:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-net\/issues\">.NET<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-python\/issues\">Python<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/issues\">Java<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-js\/issues\">JavaScript\/TypeScript<\/a><\/li>\n<\/ul>\n<p>Include the &#8220;[Form Recognizer]&#8221; string in the issue title so it gets routed to the right people.<\/p>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/ai-services\/document-intelligence\">Official Form Recognizer Service documentation<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Announcing the stable release of the new Azure Form Recognizer libraries with support for latest service features of document classification.<\/p>\n","protected":false},"author":31979,"featured_media":2827,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[701,921,750,767,922,160,159,162],"class_list":["post-2823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-net","tag-azure-form-recognizer","tag-azure-sdk","tag-cognitive","tag-document-intelligence","tag-java","tag-javascript","tag-python"],"acf":[],"blog_post_summary":"<p>Announcing the stable release of the new Azure Form Recognizer libraries with support for latest service features of document classification.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/users\/31979"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/comments?post=2823"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2823\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/2827"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=2823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=2823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=2823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}