Amazon Textract Create / Get Adapters using SDK - PHP

0

Hi All,

we are getting issue with create AWS Textract -> Create adaptor using PHP SDK We analysed document correctly using AWS textract SDK but all adaptor functions (Create/Get/Delete/Update) are undefined to use them.

can someone help about it what could the reason or any solution regarding it?

Thanks

Max

asked 5 months ago264 views
5 Answers
0

Hi Max, could you try to upgrade your PHP SDK to the latest version?

Textract Adapter related change should be included in PHP SDK after version 3.283.3: https://github.com/aws/aws-sdk-php/commit/b52bcfa58f4decbd2d0ce2a4c0259b11c62fb1a9#diff-1e907b07deb3e31b05390124e65d9ec52aeae68175fcd84216b8586b8d829496

Please let us know if you need more help, thanks!

yifanx
answered 5 months ago
0

Thank you for the reply. The upgrade to the AWS version resolved the previous issue. However, we're encountering new technical problems related to the AP SDK:

  1. We've created an Adapter > DataSet > Queries in AWS Textract.

  2. Our goal is to analyze a document using the Adapter ID through the API to obtain query answers based on the established queries after scanning the document.

We've utilized the 'analyzeDocument' function ($client->analyzeDocument) to retrieve a response, but we're encountering the following issues:

  1. The system doesn't allow us to upload a multiple-page PDF for scanning.

  2. Although we've set up queries in the AWS Adapter, the 'QueriesConfig' is mandatory when calling the API, which seems unnecessary as we've already configured queries in the adapter.

I've been following the documentation provided [link], but I'm still facing these issues. Could you please assist me with this problem or ask me any specific questions?

[Link to documentation: https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-textract-2018-06-27.html#analyzedocument]

Thank you, Max

answered 4 months ago
0

Hi Max, for multi-page PDF, we recommend using StartDocumentAnalysis API to process multi-page PDF in asynchronous fashion, please refer to https://docs.aws.amazon.com/textract/latest/dg/async-analyzing-with-sqs.html for more details.

And for QueriesConfig when running AnalyzeDocument API, unfortunately that is required for running this API. This is for allowing our customer to have the flexibility to change the QueriesConfig between trained Adapter and when running inference request.

Let us know if this helps, thanks!

yifanx
answered 4 months ago
profile picture
EXPERT
reviewed a month ago
0

Hi Thanks for reply We tried using "StartDocumentAnalysis" Function and it works to Analyse multi pages PDF and Textract all documents in array but we are not getting Query Result which we sending in QueriesConfig its ok if it require to setup QueriesConfig but its not provide result based on query. just scan whole documents and textract all words/lines

Can you pls help me in this case then we are good

Thanks

Max

answered 4 months ago
0

Hi Max, I am glad that you are able to process your multi-page PDF using StartDocumentAnalysis API, however, in order to further assist you about the inference response issue, could you open a customer support case in AWS console, and we can further investigate for you if you can provide job related information through customer support case. Hope this helps, thanks!

yifanx
answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions