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년 전742회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠