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年前743ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ