Form Recognizer REST API 2022-06-30-preview - DocumentAnalysisClient not picking up table fields

Ewan Stinson 6 Reputation points
2022-07-20T10:09:04.187+00:00

I am currently using a custom neural model to pick up selected fields from different invoice templates.

I am using a dynamic table field to select certain columns from the table and these fields are successfully found whenever I tested the model in the Form recognizer studio.

However, I am currently calling the DocumentAnalysisClient.StartAnalyzeDocumentFromUriAsync method in my .net project and when the results are returned, the document is only finding the non-tabular fields, the table field's content is always null, with a confidence of 0. But, I can see the whole table being picked within the AnalyzeResult object, just not in the field KeyValuePairs.

I'm using the package below in my project:
<PackageReference Include="Azure.AI.FormRecognizer" Version="4.0.0-beta.4" />

I'm a little confused by the documentation as within the Azure-sdk-for-net github page (https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/README.md#authenticate-the-client)

It has the following table of supported clients:

222647-sdk-version.jpg

However, within the Forms Recognizer Studio, whenever you go to the code tab for C# it tells you to use the FormsRecognizerClient:

var client = new FormRecognizerClient(new Uri(endpoint), credential);

string modelId = "<modelId>";
Uri formUri = new Uri("<formUri>");
var options = new RecognizeCustomFormsOptions() { IncludeFieldElements = true };

RecognizeCustomFormsOperation operation = await client.StartRecognizeCustomFormsFromUriAsync(modelId, formUri, options);
Response<RecognizedFormCollection> operationResponse = await operation.WaitForCompletionAsync();
RecognizedFormCollection forms = operationResponse.Value;

Which I'm guessing just needs updated, as whenever I try to use this client I just get the modelId not found error 1001.

Furthermore, another part of the documentation that isn't clear one says the neural model doesn't supports tables and the other does for the 2022-06-30-preview (See attached)

So just to clarify, should I be seeing the tabular fields within the AnalyzeResult -> Document -> Fields for the current configuration I'm using or have I missed a step?

222692-neural-model.jpg

222590-analysed-document-results.jpg

222701-model-capbabilities.jpg

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,116 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,628 questions
Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ewan Stinson 6 Reputation points
    2022-07-20T13:45:31.027+00:00

    I actually found the answer to it on the azure-sdk-for-net github page:

    https://github.com/Azure/azure-sdk-for-net/issues/29476

    Other than the documentation queries, I'm all good :)

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.