Need help extracting summary fields with Amazon Textract API in a Laravel application

0

Hello everyone,

I'm currently developing a Laravel application that utilizes Amazon's Textract API to analyze expenses. I've successfully integrated the API and called the analyseExpense method; however, I'm facing challenges in extracting summary fields and establishing correct links between the blocks and summary information from the method's response.

Has anyone worked with the Textract API and could provide guidance on how to extract these specific data and correctly link them?

I'm particularly interested in how to process the response from the analyseExpense method to obtain summary information such as [RECEIVER_NAME, ADDRESS_BLOCK, VAT NUMBER, CLIENT, SIREN number, Invoice number,TOTAL, SUBTOTAL,TAX,PAYMENT TERM] and how to establish the correct links between this information and the corresponding blocks in the Textract response.

Here's an excerpt from my current code to provide more context:

$analyseExpenseResponse = $textractClient->analyseExpense($params);
// retreive the JSONObject to extract the DATA
$facture = $textrackInvoice->processInvoice($analyseExpenseResponse);
Here's an excerpt from my current code to provide more context:

Any help would be greatly appreciated. Thank you in advance!

demandé il y a 6 mois184 vues
1 réponse
0

Hi Dimitri,

Thank you for your question. Our Developer guide contains details on what the Analyze Expense output looks like

Additionally, we have the following post-processing libraries in Python and JavaScript that contains logic to parse the Amazon Textract Analyze Expense output JSON.

Hope this helps.

AWS
keithm
répondu il y a 5 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions