Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Updates before release #17152

Merged
merged 2 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Release History

## 3.1.0-beta.1 (Unreleased)
## 3.1.0-beta.1 (2020-11-23)

### Breaking changes
- It defaults to the latest supported API version, which currently is `2.1-preview.2`.
- It defaults to the latest supported service version, which currently is `2.1-preview.2`.

### New Features
- Added integration for ASP.NET Core.
- Added support for pre-built business card recognition.
- Added support for pre-built invoices recognition.
- Added support for providing locale info when recognizing receipts and business cards. Supported locales include support EN-US, EN-AU, EN-CA, EN-GB, EN-IN.
- Added support for providing locale information when recognizing receipts and business cards. Supported locales include EN-US, EN-AU, EN-CA, EN-GB, EN-IN.
- Added support for providing the document language in `StartRecognizeContent` when recognizing a form.
- Added support to train and recognize custom forms with selection marks such as check boxes and radio buttons. This functionality is only available in train with labels scenarios.
- Added support to `StartRecognizeContent` to recognize selection marks such as check boxes and radio buttons.
Expand All @@ -19,7 +19,7 @@
- Added type `CustomFormModelProperties` that includes information like if a model is a composed model.
- Added property `ModelId` to `CustomFormSubmodel` and `TrainingDocumentInfo`.
- Added properties `ModelId` and `FormTypeConfidence` to `RecognizedForm`.
- Added property `Appearance` to `FormLine` to indicate the style of the extracted text. for example, "handwriting" or "other".
- Added property `Appearance` to `FormLine` to indicate the style of the extracted text. For example, "handwriting" or "other".
- Added property `BoundingBox` to `FormTable`.
- Added support for `ContentType` `image/bmp` in recognize content and prebuilt models.
- Added property `Pages` to `RecognizeContentOptions` to specify the page numbers to analyze.
Expand Down
16 changes: 7 additions & 9 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Azure Cognitive Services Form Recognizer is a cloud service that uses machine learning to recognize form fields, text, and tables in form documents. It includes the following capabilities:

- Recognize Custom Forms - Recognize and extract form fields and other content from your custom forms, using models you trained with your own form types.
- Recognize Form Content - Recognize and extract tables, lines, words, and selection marks like radio buttons and check boxes in forms documents, without the need to train a model.
- Recognize Form Content - Recognize and extract tables, lines, words, and selection marks like radio buttons and check boxes in form documents, without the need to train a model.
- Recognize Prebuilt models - Recognize data using the following prebuilt models:
- Receipts - Recognize and extract common fields from receipts, using a pre-trained receipt model.
- Business Cards - Recognize and extract common fields from business cards, using a pre-trained business cards model.
Expand All @@ -16,11 +16,9 @@ Azure Cognitive Services Form Recognizer is a cloud service that uses machine le
Install the Azure Form Recognizer client library for .NET with [NuGet][nuget]:

```PowerShell
dotnet add package Azure.AI.FormRecognizer --version 3.0.0
dotnet add package Azure.AI.FormRecognizer
samvaity marked this conversation as resolved.
Show resolved Hide resolved
```

**Note:** This package version targets Azure Form Recognizer service API version v2.0.

### Prerequisites
* An [Azure subscription][azure_sub].
* An existing Cognitive Services or Form Recognizer resource.
Expand All @@ -38,7 +36,7 @@ You can create either resource using:
Below is an example of how you can create a Form Recognizer resource using the CLI:

```PowerShell
# Create a new resource group to hold the form recognizer resource -
# Create a new resource group to hold the form recognizer resource
# if using an existing resource group, skip this step
az group create --name <your-resource-name> --location <location>
```
Expand Down Expand Up @@ -314,12 +312,12 @@ using (FileStream stream = new FileStream(businessCardsPath, FileMode.Open))

foreach (RecognizedForm businessCard in businessCards)
{
FormField ContactNamesField;
if (businessCard.Fields.TryGetValue("ContactNames", out ContactNamesField))
FormField contactNamesField;
if (businessCard.Fields.TryGetValue("ContactNames", out contactNamesField))
{
if (ContactNamesField.Value.ValueType == FieldValueType.List)
if (contactNamesField.Value.ValueType == FieldValueType.List)
{
foreach (FormField contactNameField in ContactNamesField.Value.AsList())
foreach (FormField contactNameField in contactNamesField.Value.AsList())
{
Console.WriteLine($"Contact Name: {contactNameField.ValueData.Text}");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public RecognizeInvoicesOptions()
public FormContentType? ContentType { get; set; } = null;

/// <summary>
/// Locale value. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US.
/// Locale value. Supported locales include: en-US.
/// </summary>
public string Locale { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public async Task RecognizeBusinessCardsFromFile()

foreach (RecognizedForm businessCard in businessCards)
{
FormField ContactNamesField;
if (businessCard.Fields.TryGetValue("ContactNames", out ContactNamesField))
FormField contactNamesField;
if (businessCard.Fields.TryGetValue("ContactNames", out contactNamesField))
{
if (ContactNamesField.Value.ValueType == FieldValueType.List)
if (contactNamesField.Value.ValueType == FieldValueType.List)
{
foreach (FormField contactNameField in ContactNamesField.Value.AsList())
foreach (FormField contactNameField in contactNamesField.Value.AsList())
{
Console.WriteLine($"Contact Name: {contactNameField.ValueData.Text}");

Expand Down