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!

已提問 6 個月前檢視次數 182 次
1 個回答
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
已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南