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!

gefragt vor 6 Monaten183 Aufrufe
1 Antwort
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
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen