Skip to content

Commit

Permalink
[FormRecognizer] Misc documentation updates (Azure#13257)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinelski authored Jul 6, 2020
1 parent 0798745 commit 257b94a
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Azure Cognitive Services Form Recognizer is a cloud service that uses machine le
- 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 receipts - Recognize and extract common fields from US receipts, using a pre-trained receipt model.

## Common scenarios samples:
## Common scenarios samples
- [Recognize form content](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample1_RecognizeFormContent.md)
- [Recognize custom forms](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample2_RecognizeCustomForms.md)
- [Recognize receipts](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample3_RecognizeReceipts.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var client = new FormRecognizerClient(new Uri(endpoint), credential);

## Recognize custom forms from a URI

To recognize form fields and other content from your custom forms from a given file at a URI, use the `StartRecognizeCustomFormsFromUri` method. The returned value is a collection of `RecognizedForm` objects -- one for each page in the submitted document.
To recognize form fields and other content from your custom forms from a given file at a URI, use the `StartRecognizeCustomFormsFromUri` method. The returned value is a collection of `RecognizedForm` objects -- one for each form identified in the submitted document.

```C# Snippet:FormRecognizerSampleRecognizeCustomFormsFromUri
string modelId = "<modelId>";
Expand All @@ -45,7 +45,7 @@ foreach (RecognizedForm form in forms)

## Recognize custom forms from a file stream

To recognize form fields and other content from your custom forms from a file stream, use the `StartRecognizeCustomForms` method. The returned value is a collection of `RecognizedForm` objects -- one for each page in the submitted document.
To recognize form fields and other content from your custom forms from a file stream, use the `StartRecognizeCustomForms` method. The returned value is a collection of `RecognizedForm` objects -- one for each form identified in the submitted document.

```C# Snippet:FormRecognizerRecognizeCustomFormsFromFile
using (FileStream stream = new FileStream(formFilePath, FileMode.Open))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ client.DeleteModel(model.ModelId);

To see the full example source files, see:

* [Manage custom models (Synchronous)](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample7_ManageCustomModels.cs)
* [Manage custom models (Asynchronous)](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample7_ManageCustomModelsAsync.cs)
* [Manage custom models (Synchronous)](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample7_ManageCustomModels.cs)

[README]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/formrecognizer/Azure.AI.FormRecognizer#getting-started
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ To get started you'll need a Cognitive Services resource or a Form Recognizer re
## Copy a custom model
There are several scenarios that require the models to be copied between Form Recognizer resources, like for example, to keep a backup of the created models.
Copies can be made:
- Within same Form Recognizer resource
- Within the same Form Recognizer resource.
- Across other Form Recognizer resources that exist in any other supported region.

For this sample, you will copy a model across Form recognizer resource. It assumes you have the credentials for both the source and the target Form Recognizer resources.
For this sample, you will copy a model across Form Recognizer resources. It assumes you have the credentials for both the source and the target Form Recognizer resources.

## Creating the source and target `FormTrainingClient`

Expand Down Expand Up @@ -50,7 +50,7 @@ CopyAuthorization targetAuth = await targetClient.GetCopyAuthorizationAsync(reso
string jsonTargetAuth = targetAuth.ToJson();
```

To deserealize a string that contains authorizaiton information, use the `FromJson` method from `CopyAuthorization`.
To deserialize a string that contains authorization information, use the `FromJson` method from `CopyAuthorization`.
```C# Snippet:FormRecognizerSampleFromJson
CopyAuthorization targetCopyAuth = CopyAuthorization.FromJson(jsonTargetAuth);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static CopyAuthorization FromJson(string copyAuthorization)
}

/// <summary>
/// Converts the CopyAuthorization object to its equivalent json representation.
/// Converts the CopyAuthorization object to its equivalent JSON representation.
/// </summary>
public string ToJson()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public class CopyModelOperation : Operation<CustomFormModelInfo>
/// <summary><c>true</c> if the long-running operation has completed. Otherwise, <c>false</c>.</summary>
private bool _hasCompleted;

/// <summary>The id of the model to use for copy.</summary>
/// <summary>The ID of the model to use for copy.</summary>
private readonly string _modelId;

/// <summary>The id of the copied model.</summary>
/// <summary>The ID of the copied model.</summary>
private readonly string _targetModelId;

/// <summary>An ID representing the operation that can be used along with <see cref="_modelId"/> to poll for the status of the long-running operation.</summary>
Expand Down Expand Up @@ -83,7 +83,7 @@ public override CustomFormModelInfo Value
/// </summary>
/// <param name="operationId">The ID of this operation.</param>
/// <param name="client">The client used to check for completion.</param>
/// /// <param name="targetModelId">Model id in the target Form Recognizer Resource.</param>
/// <param name="targetModelId">Model ID in the target Form Recognizer resource.</param>
public CopyModelOperation(string operationId, string targetModelId, FormTrainingClient client)
{
_serviceClient = client.ServiceClient;
Expand Down Expand Up @@ -115,7 +115,7 @@ public CopyModelOperation(string operationId, string targetModelId, FormTraining
/// <param name="serviceClient">The client for communicating with the Form Recognizer Azure Cognitive Service through its REST API.</param>
/// <param name="diagnostics">The client diagnostics for exception creation in case of failure.</param>
/// <param name="operationLocation">The address of the long-running operation. It can be obtained from the response headers upon starting the operation.</param>
/// <param name="targetModelId">Model id in the target Form Recognizer Resource.</param>
/// <param name="targetModelId">Model ID in the target Form Recognizer resource.</param>
internal CopyModelOperation(ServiceRestClient serviceClient, ClientDiagnostics diagnostics, string operationLocation, string targetModelId)
{
_serviceClient = serviceClient;
Expand Down
4 changes: 2 additions & 2 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/src/FieldData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
namespace Azure.AI.FormRecognizer.Models
{
/// <summary>
/// A form content element representing text that is part of a <see cref="FormField"/>.
/// This includes the location of the text in the form and a collection of the content
/// A form element representing text that is part of a <see cref="FormField"/>.
/// This includes the location of the text in the form and a collection of the form
/// elements that make up the text.
/// </summary>
public class FieldData : FormElement
Expand Down
8 changes: 4 additions & 4 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Azure.AI.FormRecognizer.Models
{
/// <summary>
/// Represents a content element recognized from the input document. Its text can be a line,
/// Represents a form element recognized from the input document. Its text can be a line,
/// a word, the content of a table cell, etc.
/// </summary>
public abstract class FormElement
Expand All @@ -17,19 +17,19 @@ internal FormElement(BoundingBox boundingBox, int pageNumber, string text)
}

/// <summary>
/// The quadrilateral bounding box that outlines the text of this content. Units are in pixels for
/// The quadrilateral bounding box that outlines the text of this element. Units are in pixels for
/// images and inches for PDF. The <see cref="LengthUnit"/> type of a recognized page can be found
/// at <see cref="FormPage.Unit"/>.
/// </summary>
public BoundingBox BoundingBox { get; }

/// <summary>
/// The 1-based number of the page in which this content is present.
/// The 1-based number of the page in which this element is present.
/// </summary>
public int PageNumber { get; }

/// <summary>
/// The text of this content element. It can be a whole line or a single word.
/// The text of this form element. It can be a whole line or a single word.
/// </summary>
public string Text { get; }
}
Expand Down
Loading

0 comments on commit 257b94a

Please sign in to comment.