Textract query when there are multiple occurance of targetted content.

0

Enter image description here The attached is a bank statement. What I want is to query the highest balance from the transaction table(in this case 868.85). But when i am querying i am not getting the correct answer, instead getting the other balances elsewhere in the document.

https://prnt.sc/zTIbVj8w3l-9

all the queries i tried failed. can anyone please help me how i can get data in such cases (when same name is available multiple times). thanks

  • Can you share any sample code you are using to query the data?

asked a year ago215 views
1 Answer
0
$queries=[];
$queries[] = [
          "Text" => "what is the highest among the balance?"
        ];
$queries[] = [
            "Text" => "what is the highest balance from account details?"
        ];


$options   = [
    'Document'      => [
          'Bytes' => file_get_contents($path)
    ],
     'FeatureTypes'  => ['FORMS', 'TABLES', 'QUERIES', 'SIGNATURES'], 
       'QueriesConfig' => ['Queries' => $queries]
 ];
$result = $this->textractClient->analyzeDocument($options);

i used aws php sdk and queried like above. will this help?

answered a year 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