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

[FormRecognier] initial merge #7996

Merged
merged 131 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from 122 commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
f5e5c21
Add initial files for FormRecognizer
jeremymeng Feb 4, 2020
22b5a68
Add autorest generated files
jeremymeng Feb 4, 2020
bf875d2
Adding more source files
jeremymeng Feb 4, 2020
7c23b11
Add configuration files
jeremymeng Feb 4, 2020
eec6e22
Add shim.d.ts
jeremymeng Feb 4, 2020
c95511c
Fix typo
jeremymeng Feb 4, 2020
e76cc13
Add folders for test and api review file
jeremymeng Feb 4, 2020
ca8d26c
upgrade to typescript 3.7.5
jeremymeng Feb 6, 2020
e1e96bc
Remove extra comma
jeremymeng Feb 7, 2020
92357a0
format source files
jeremymeng Feb 7, 2020
dd4009c
Export the FormRecognizerApiKeyCredential type
jeremymeng Feb 7, 2020
cede143
Add a basic JS sample
jeremymeng Feb 7, 2020
3b36799
Change version to 2.0.0-preview.1
jeremymeng Feb 12, 2020
5f1b6d6
Rename FormRecognizerApiKeyCredential to CognitiveKeyCredential
jeremymeng Feb 12, 2020
63b2d72
Initial LRO implementation for StartTrainning
jeremymeng Feb 13, 2020
00077a8
Improving LRO for training
jeremymeng Feb 13, 2020
76fc16d
Re-generate code using swagger json with some fix and autorest-beta
jeremymeng Feb 14, 2020
f12bafd
Fix trainCustomModel
jeremymeng Feb 14, 2020
4489793
Add analyzeReceipt() and getAnalyzeReceiptResult()
jeremymeng Feb 15, 2020
4be6e9b
Hack around the autorest issue
jeremymeng Feb 15, 2020
ea8f4f7
minor cleanup
jeremymeng Feb 15, 2020
99f37dd
Avoid exposing trainCustomModelInternal()
jeremymeng Feb 18, 2020
b5dbbc5
Add analyze layout functions and a sample
jeremymeng Feb 18, 2020
f017bec
Clean up/formatting/etc.
jeremymeng Feb 18, 2020
5de0577
Add analyze form sample
jeremymeng Feb 18, 2020
35a50f8
Rename analyze to extract
jeremymeng Feb 19, 2020
ff1b264
fix samples after renaming
jeremymeng Feb 19, 2020
1162125
Remove browser minification
jeremymeng Feb 19, 2020
45eec0e
Rename to remove `Result` suffix
jeremymeng Feb 20, 2020
0c248a7
Remove browser bundle from pack file list
jeremymeng Feb 20, 2020
88d4267
Add tracing test
jeremymeng Feb 21, 2020
96a1f3f
Fix options
jeremymeng Feb 24, 2020
6dea904
Add util from cognitive-search
jeremymeng Feb 24, 2020
bb9fef4
Add types specific to receipt analysis.
jeremymeng Feb 25, 2020
ec81c70
Add a AnalyzeReceiptResultResponse type
jeremymeng Feb 26, 2020
df49489
Rework public types for receipt result.
jeremymeng Feb 27, 2020
ff3e520
Remove `fields` and prompt its properties up
jeremymeng Feb 27, 2020
f5268eb
Add paged async iterator to list custom models
jeremymeng Feb 28, 2020
b9024c2
Enable Item.Quantity and add null coalesing
jeremymeng Feb 28, 2020
51d398a
Move receipt and layout into FormRecognizerClient
jeremymeng Mar 3, 2020
3bd5e1c
Add field and datatable types
jeremymeng Mar 4, 2020
2ca507a
[wip] create two clients for layout and receipt
jeremymeng Mar 4, 2020
157b6ad
[wip] rework some model types
jeremymeng Mar 4, 2020
dbc18ee
Add LRO poller for analyzing receipt.
jeremymeng Mar 5, 2020
d2c9a53
Use response type union for now
jeremymeng Mar 5, 2020
c82d631
Update sample to use LRO poller
jeremymeng Mar 5, 2020
c0d79a7
- Add LRO for custom and layout
jeremymeng Mar 5, 2020
ece60b9
Update to core-paging 1.1.0
jeremymeng Mar 5, 2020
e706cc5
Return models with type discriminated union
jeremymeng Mar 5, 2020
579cf5f
Genericize analyze LRO poller
jeremymeng Mar 5, 2020
7c36f98
Fix ae-forgotten-export warnings
jeremymeng Mar 5, 2020
ae2b3d2
Tweak exports
jeremymeng Mar 5, 2020
dd72a85
export public portion of the poller operation options
jeremymeng Mar 5, 2020
bd5a16e
Fix while condition
jeremymeng Mar 9, 2020
388f7bc
Add typescript samples
jeremymeng Mar 9, 2020
f69461b
Add Price to receipt item field
jeremymeng Mar 9, 2020
281c2c5
Use hand-defined AnalyzeFormResult as response.analyzeResults
jeremymeng Mar 9, 2020
48d0faf
Tweak samples
jeremymeng Mar 9, 2020
4dd47ec
Fix some models
jeremymeng Mar 10, 2020
d9b46d1
Fix receipt model to use hand-crafted type definition
jeremymeng Mar 10, 2020
0b9af42
Use hand-crafted type definition for trained models
jeremymeng Mar 10, 2020
edbe841
Upgrade to @azure/identity 1.1.0-preview1 and move it to devDependencies
jeremymeng Mar 11, 2020
cd45228
Separate training and training with labels
jeremymeng Mar 11, 2020
6488000
Remove unnecessary constraints
jeremymeng Mar 11, 2020
871d5d4
Add page number to TextElement
jeremymeng Mar 11, 2020
eb77c83
Remove model `kind` since we now have two distinct types
jeremymeng Mar 11, 2020
5f7af4e
Add two separate methods to extract form
jeremymeng Mar 11, 2020
611d409
Update api.md
jeremymeng Mar 11, 2020
d91f8a8
Rename TextElement => ExtractedElement
jeremymeng Mar 12, 2020
6b23b14
Rename properties
jeremymeng Mar 12, 2020
953940c
Make extract options optional
jeremymeng Mar 12, 2020
1c6b60f
Transform readResults and pageResults from original response
jeremymeng Mar 12, 2020
e6dd0a7
Move transform methods to a separate file
jeremymeng Mar 13, 2020
92b60a5
Rename refactoring
jeremymeng Mar 13, 2020
5112e50
Rename files
jeremymeng Mar 13, 2020
023c855
Adapt to rename
jeremymeng Mar 13, 2020
a18ecdb
Add transform for fields
jeremymeng Mar 13, 2020
0d627e9
Fix typing for array and object fields
jeremymeng Mar 13, 2020
9545d33
passing `body` to sendOperationRequest
jeremymeng Mar 16, 2020
070248b
Apply same code coverage fix
jeremymeng Mar 17, 2020
c0049d6
Add discriminated union `kind` for extracted elements
jeremymeng Mar 17, 2020
67cef1f
Align with monorepo conventions
jeremymeng Mar 17, 2020
6242d5c
Remove unnecessary checks
jeremymeng Mar 17, 2020
c80a081
Rename valueXxx fields to all be value
jeremymeng Mar 17, 2020
c79a6a1
Fix pageNumber issue where it is not passed to toTextLine()
jeremymeng Mar 17, 2020
9177662
Use ?. operator
jeremymeng Mar 17, 2020
97ba893
Remove the hacky workaround in core-http to set request body
jeremymeng Mar 17, 2020
f84d363
Work around codegen issue with hand-crafted operation specs
jeremymeng Mar 18, 2020
c168fd6
Fix option passing for training
jeremymeng Mar 18, 2020
0fa17b1
remove unused file
jeremymeng Mar 18, 2020
eab8857
Add README.md
jeremymeng Mar 19, 2020
5f624f9
Rename refactoring to be closer to other langauges
jeremymeng Mar 19, 2020
e306465
Enable code-gen using v3 and dev version of typescript plugin
jeremymeng Mar 16, 2020
99a4d11
Re-generate using the v6 typescript generator
jeremymeng Mar 20, 2020
b1fc45c
Fix generated code
jeremymeng Mar 20, 2020
7ddd59b
Fix json case
jeremymeng Mar 20, 2020
f3e08eb
update api.md
jeremymeng Mar 20, 2020
e8f51a4
Remove the grouping of results under analyzeResult
jeremymeng Mar 20, 2020
1d2ec7b
Fix json case
jeremymeng Mar 20, 2020
4d6c33b
Remove usage of Omit<T>
jeremymeng Mar 20, 2020
9825567
Add ref docs for models
jeremymeng Mar 20, 2020
1db72a0
Re-generate after the mapper fix
jeremymeng Mar 21, 2020
e08cf26
Add more ref docs
jeremymeng Mar 23, 2020
35036ef
Rename CognitiveKeyCredential to FormRecognizerApiKeyCredential
jeremymeng Mar 23, 2020
53652d1
Rename extractReceipt => beginExtractReceipt
jeremymeng Mar 23, 2020
21aa0ed
Add ref docs for from client
jeremymeng Mar 24, 2020
4ac4f84
Rename extractLayout to beginExtractLayout
jeremymeng Mar 24, 2020
e0384fb
Add ref doc for receipt
jeremymeng Mar 24, 2020
3476433
Add train model sample code into README
jeremymeng Mar 25, 2020
16ac00c
Change version to 1.0.0-preview.1
jeremymeng Mar 25, 2020
a778767
Add unit tests for conversions from original response
jeremymeng Mar 25, 2020
6ceb075
Add unit tests for toFieldValue()
jeremymeng Mar 26, 2020
e38f3fc
Add unit test for toTable() transform
jeremymeng Mar 26, 2020
0b8be24
Re-generate after patches to swagger json
jeremymeng Mar 26, 2020
f412b96
Adapt the mocha-multi reporter change from master
jeremymeng Mar 26, 2020
d483fcb
Improve code snippets in README
jeremymeng Mar 26, 2020
cd47597
Remove TokenCredential from preview.1
jeremymeng Mar 26, 2020
c18bb41
Add check for receipt's docType
jeremymeng Mar 30, 2020
63cb538
Change analyze polling interval to 5 seconds
jeremymeng Mar 30, 2020
b815aac
Add getContentType() to identify supported content types
jeremymeng Apr 1, 2020
5e567e5
Address doc review feedback
jeremymeng Apr 1, 2020
f1b8a2b
Remove more mentioning of AAD
jeremymeng Apr 1, 2020
bf1953b
Add supported content types to parameter ref doc
jeremymeng Apr 1, 2020
d712a2c
Cache readable stream to buffer up to 50 MB.
jeremymeng Apr 3, 2020
ee546a7
Remove .only
jeremymeng Apr 3, 2020
6dc2d67
Use Point2D[] for bounding boxes.
jeremymeng Apr 6, 2020
a9314fb
Move training and model management to FormTrainingClient
jeremymeng Apr 6, 2020
3e19426
Move layout and receipt recognition back to FormRecognizerClient
jeremymeng Apr 7, 2020
8801d03
Rename refactoring
jeremymeng Apr 7, 2020
a450050
Merge remote-tracking branch 'upstream/master' into formrecognizer-t2
jeremymeng Apr 8, 2020
d3aa9e6
Fix build
jeremymeng Apr 8, 2020
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
121 changes: 91 additions & 30 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@
"projectFolder": "sdk/appconfiguration/app-configuration",
"versionPolicyName": "client"
},
{
"packageName": "@azure/ai-form-recognizer",
"projectFolder": "sdk/formrecognizer/ai-form-recognizer",
"versionPolicyName": "client"
},
{
"packageName": "@azure/ai-text-analytics",
"projectFolder": "sdk/textanalytics/ai-text-analytics",
Expand Down
4 changes: 4 additions & 0 deletions sdk/formrecognizer/ai-form-recognizer/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["@azure/azure-sdk"],
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"]
}
20 changes: 20 additions & 0 deletions sdk/formrecognizer/ai-form-recognizer/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
}
]
}
21 changes: 21 additions & 0 deletions sdk/formrecognizer/ai-form-recognizer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
260 changes: 260 additions & 0 deletions sdk/formrecognizer/ai-form-recognizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
# Azure Form Recognizer client library for JavaScript

[Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/) is a cloud-based service that uses machine learning to extract text and table data from form documents. It allows you to train custom models using your own forms, to extract field names and values, and table data from them. It also provides a prebuilt models you can use to extract values from receipts, or tables from any form.

[Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/formrecognizer/ai-form-recognizer/) |
[Package (NPM)](https://www.npmjs.com/package/@azure/ai-form-recognizer) |
[API reference documentation](https://aka.ms/azsdk-js-formrecognizer-ref-docs) |
[Product documentation](https://docs.microsoft.com/azure/cognitive-services/form-recognizer/) |
[Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples)

## Getting started

### Currently supported environments

- [Node.js](https://nodejs.org/) version 8.x.x or higher

### Prerequisites

- An [Azure subscription][azure_sub].
- An existing [Cognitive Services][cognitive_resource] or Form Recognizer resource. If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli].

If you use the Azure CLI, replace `<your-resource-group-name>` and `<your-resource-name>` with your own unique names:

```PowerShell
az cognitiveservices account create --kind FormRecognizer --resource-group <your-resource-group-name> --name <your-resource-name>
```

### Install the `@azure/ai-form-recognizer` package

Install the Azure Form Recognizer client library for JavaScript with `npm`:

```bash
npm install @azure/ai-form-recognizer
```

### Create and authenticate a client

In order to interact with the Form Recognizer service, you'll need to select either a `ReceiptClient`, `FormLayoutClient`, or `CustomFormClient`, and create an instance of this type. In the following samples, we will use `CustomFormClient` as an example. To create a client instance to access the Form Recognizer API, you will need the `endpoint` of your Form Recognizer resource and a `credential`. The Form Recognizer client use an API key credential to authenticate.

You can find the endpoint for your form recognizer resource either in the [Azure Portal][azure_portal] or by using the [Azure CLI][azure_cli] snippet below:

```bash
az cognitiveservices account show --name <your-resource-name> --resource-group <your-resource-group-name> --query "endpoint"
```

#### Using an API Key

Use the [Azure Portal][azure_portal] to browse to your Form Recognizer resource and retrieve an API key, or use the [Azure CLI][azure_cli] snippet below:

**Note:** Sometimes the API key is referred to as a "subscription key" or "subscription API key."

```PowerShell
az cognitiveservices account keys list --resource-group <your-resource-group-name> --name <your-resource-name>
```

Once you have an API key and endpoint, you can use it as follows:

```js
const { CustomFormClient, ApiKeyCredential } = require("@azure/ai-form-recognizer");

const client = new CustomFormClient(
"<endpoint>",
new ApiKeyCredential("<API key>")
);
```

## Key concepts

### ReceiptClient
A `ReceiptClient` is the Form Recognizer interface to use for analyzing receipts. It provides operations to extract receipt field values and locations from receipts from the United States.

### FormLayoutClient
A `FormLayoutClient` is the Form Recognizer interface to extract layout items from forms. It provides operations to extract table data and geometry.

### CustomFormClient
A `CustomFormClient` is the Form Recognizer interface to use for creating, using, and managing custom machine-learned models. It provides operations for training models on forms you provide, and extracting field values and locations from your custom forms. It also provides operations for viewing and deleting models, as well as understanding how close you are to reaching subscription limits for the number of models you can train.

### Long-Running Operations
Long-running operations are operations which consist of an initial request sent to the service to start an operation,followed by polling the service at intervals to determine whether the operation has completed or failed, and if it has succeeded, to get the result.

Methods that train models or extract values from forms are modeled as long-running operations. The client exposes a `begin<operation-name>` method that returns an `Promise<PollerLike>`. Callers should wait for the operation to complete by calling `pollUntilDone()` on the poller returned from the `begin<operation-name>` method. A sample code snippet is provided to illustrate using long-running operations [below](#extracting-receipt-values-with-a-long-running-operation).

### Training models
Using the `CustomFormClient`, you can train a machine-learned model on your own form type. The resulting model will be able to extract values from the types of forms it was trained on.

#### Training without labels
A model trained without labels uses unsupervised learning to understand the layout and relationships between field names and values in your forms. The learning algorithm clusters the training forms by type and learns what fields and tables are present in each form type.

This approach doesn't require manual data labeling or intensive coding and maintenance, and we recommend you try this method first when training custom models.

#### Training with labels
A model trained with labels uses supervised learning to extract values you specify by adding labels to your training forms. The learning algorithm uses a label file you provide to learn what fields are found at various locations in the form, and learns to extract just those values.

This approach can result in better-performing models, and those models can work with more complex form structures.

### Extracting values from forms
Using the `CustomFormClient`, you can use your own trained models to extract field values and locations, as well as table data, from forms of the type you trained your models on. The output of models trained with and without labels differs as described below.

#### Using models trained without labels
Models trained without labels consider each form page to be a different form type. For example, if you train your model on 3-page forms, it will learn that these are three different types of forms. When you send a form to it for analysis, it will return a collection of three pages, where each page contains the field names, values, and locations, as well as table data, found on that page.

#### Using models trained with labels
Models trained with labels consider a form as a single unit. For example, if you train your model on 3-page forms with labels, it will learn to extract field values from the locations you've labeled across all pages in the form. If you sent a document containing two forms to it for analysis, it would return a collection of two forms, where each form contains the field names, values, and locations, as well as table data, found in that form. Fields and tables have page numbers to identify the pages where they were found.

### Managing Custom Models
Using the `CustomFormClient`, you can get, list, and delete the custom models you've trained. You can also view the count of models you've trained and the maximum number of models your subscription will allow you to store.


## Examples
The following section provides several code snippets illustrating common patterns used in the Form Recognizer client libraries.

### Extracting receipt values with a long-running operation

```javascript
const { ReceiptRecognizerClient, FormRecognizerApiKeyCredential } = require("@azure/ai-form-recognizer");
const fs = require("fs");

require("dotenv").config();

async function main() {
const endpoint = process.env["COGNITIVE_SERVICE_ENDPOINT"] || "<cognitive services endpoint>";
const apiKey = process.env["COGNITIVE_SERVICE_API_KEY"] || "<api key>";
const path = "./contoso-allinone.jpg";
const readStream = fs.createReadStream(path);

const client = new ReceiptRecognizerClient(endpoint, new FormRecognizerApiKeyCredential(apiKey));
// start a long-running operation (LRO) to extract receipt data
const poller = await client.beginExtractReceipts(readStream, {
includeTextDetails: true,
onProgress: (state) => { console.log(`analyzing status: ${state.status}`); }
});
await poller.pollUntilDone();
response = poller.getResult();

console.log("### First receipt:")
console.log(response.extractedReceipts[0]);
console.log("### Items:")
console.log("### First receipt:")
console.log(response.extractedReceipts[0]);
console.log("### Items:")
console.table(response.extractedReceipts[0].items, ["name", "quantity", "price", "totalPrice"]);
console.log("### Raw 'MerchantAddress' fields:");
console.log(response.extractedReceipts[0].fields["MerchantAddress"])
}

main();
```

### Training models

```javascript
const { FormRecognizerClient, FormRecognizerApiKeyCredential } = require("@azure/ai-form-recognizer");

async function main() {
const endpoint = process.env["COGNITIVE_SERVICE_ENDPOINT"] || "<cognitive services endpoint>";
const apiKey = process.env["COGNITIVE_SERVICE_API_KEY"] || "<api key>";
const trainingDataSource = process.env["DOCUMENT_SOURCE"] || "<url to Azure blob container storing the training documents>";

const client = new FormRecognizerClient(endpoint, new FormRecognizerApiKeyCredential(apiKey));
// start a long-running operation (LRO) to train the model
const poller = await client.beginTraining(trainingDataSource, {
onProgress: (state) => { console.log(`training status: ${state.status}`); }
});
await poller.pollUntilDone();
const model = poller.getResult();
console.log(model);
}

main();
```

### Listing all models in the current cognitive service account

```javascript
const { FormRecognizerClient, FormRecognizerApiKeyCredential } = require("../../dist");

async function main() {
const endpoint = process.env["COGNITIVE_SERVICE_ENDPOINT"] || "<cognitive services endpoint>";
const apiKey = process.env["COGNITIVE_SERVICE_API_KEY"] || "<api key>";
const client = new FormRecognizerClient(endpoint, new FormRecognizerApiKeyCredential(apiKey));

// returns an async iteratable iterator that supports paging
const result = await client.listModels();
let i = 0;
for await (const modelInfo of result) {
console.log(`model ${i++}:`);
console.log(modelInfo);
}

// using `iter.next()`
i = 1;
let iter = client.listModels();
let modelItem = await iter.next();
while (!modelItem.done) {
console.log(`model ${i++}: ${modelItem.value.modelId}`);
modelItem = await iter.next();
}

// using `byPage()`
i = 1;
for await (const response of client.listModels().byPage()) {
for (const modelInfo of response.modelList) {
console.log(`model ${i++}: ${modelInfo.modelId}`);
}
}
}

main();
```

## Troubleshooting

### Enable logs

You can set the following environment variable to see debug logs when using this library.

- Getting debug logs from the Azure Form Recognizer client library

```bash
export DEBUG=azure*
```

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).

## Next steps

Please take a look at the
[samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/formrecognizer/ai-form-recognizer/samples)
directory for detailed examples on how to use this library.

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.

## Related projects

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fformrecognizer%2Fai-form-recognizer%2FREADME.png)

[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[cognitive_resource]: https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity
[cognitive_auth]: https://docs.microsoft.com/azure/cognitive-services/authentication
[register_aad_app]: https://docs.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential
31 changes: 31 additions & 0 deletions sdk/formrecognizer/ai-form-recognizer/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "types/src/index.d.ts",
"docModel": {
"enabled": false
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/ai-form-recognizer.d.ts"
},
"messages": {
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
Loading