How to extract Tables and form data using textract

0

Thanks in advance I am new to Textract and using textract along with laravel. While i am extracting Forms or Tables its working but while i passing feature type Tables and Forms api not resulting any response . please help me out. below is input

$result = $this->textract->startDocumentAnalysis([ 'DocumentLocation' => [ # Required 'S3Object' => [ 'Bucket' => config('services.aws.bucket'), 'Name' => "{$file_name}" # Input document

                ]
            ],
            'FeatureTypes' => ['TABLES', 'FORMS'],
            # Required - list of the types of analysis to perform (TEXT included by default)
        ]);
已提問 2 年前檢視次數 766 次
2 個答案
0

Hi, thank you for trying Textract!. Can you share what response you're getting so we can better understand the issue you're seeing? Please keep in mind that startDocumentAnalysis is our async API which means the response you get should have a jobId for which you will have to call GetDocumentAnalysis with in order to get the detection results once the job is completed.

AWS
已回答 2 年前
  • Dear I am using php laravel using below php code for extracting, its working fine for Tables or For Forms. when i using both tables and forms

    1. Not returning GUID. and shows document is under process below is my code $input_type = [];

       if ($type == 'form') {
           $input_type = ['FORMS'];
       } elseif ($type == 'table') {            
           $input_type = ['TABLES'];
       } elseif ($type == 'formtable') {
           $input_type = ['TABLES', 'FORMS'];
           // array_push($input_type, 'TABLES');
           // array_push($input_type, 'FORMS');
       }
      
       try {           
      
           $result = $this->textract->startDocumentAnalysis([
               'DocumentLocation' => [ 										# Required 
                   'S3Object' => [
                       'Bucket' => config('services.aws.bucket'),
                       'Name' => "{$file_name}" # Input document 
                      
                   ]
               ],
               'FeatureTypes' => $input_type,
               # Required - list of the types of analysis to perform (TEXT included by default)
           ]);
      
           # Check Status of startDocumentAnalysis
           $response['status'] = 'success';
           $response['task_id'] = $result['JobId'];
           $response['job_status'] = 'IN_PROGRESS';
           $response['raw'] = '';
      
0

Hi it sounds like you're inquiring that the job is stuck in progress state and never completes. Can you confirm that's the issue?

Please share with us the JobId for the problematic job so we can investigate on our side.

AWS
已回答 2 年前

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

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

回答問題指南