| 1 | package Paws::Textract; | ||
| 2 | use Moose; | ||
| 3 | sub service { 'textract' } | ||
| 4 | sub signing_name { 'textract' } | ||
| 5 | sub version { '2018-06-27' } | ||
| 6 | sub target_prefix { 'Textract' } | ||
| 7 | sub json_version { "1.1" } | ||
| 8 | has max_attempts => (is => 'ro', isa => 'Int', default => 5); | ||
| 9 | has retry => (is => 'ro', isa => 'HashRef', default => sub { | ||
| 10 | { base => 'rand', type => 'exponential', growth_factor => 2 } | ||
| 11 | }); | ||
| 12 | has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [ | ||
| 13 | ] }); | ||
| 14 | |||
| 15 | with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller'; | ||
| 16 | |||
| 17 | |||
| 18 | sub AnalyzeDocument { | ||
| 19 | my $self = shift; | ||
| 20 | my $call_object = $self->new_with_coercions('Paws::Textract::AnalyzeDocument', @_); | ||
| 21 | return $self->caller->do_call($self, $call_object); | ||
| 22 | } | ||
| 23 | sub DetectDocumentText { | ||
| 24 | my $self = shift; | ||
| 25 | my $call_object = $self->new_with_coercions('Paws::Textract::DetectDocumentText', @_); | ||
| 26 | return $self->caller->do_call($self, $call_object); | ||
| 27 | } | ||
| 28 | sub GetDocumentAnalysis { | ||
| 29 | my $self = shift; | ||
| 30 | my $call_object = $self->new_with_coercions('Paws::Textract::GetDocumentAnalysis', @_); | ||
| 31 | return $self->caller->do_call($self, $call_object); | ||
| 32 | } | ||
| 33 | sub GetDocumentTextDetection { | ||
| 34 | my $self = shift; | ||
| 35 | my $call_object = $self->new_with_coercions('Paws::Textract::GetDocumentTextDetection', @_); | ||
| 36 | return $self->caller->do_call($self, $call_object); | ||
| 37 | } | ||
| 38 | sub StartDocumentAnalysis { | ||
| 39 | my $self = shift; | ||
| 40 | my $call_object = $self->new_with_coercions('Paws::Textract::StartDocumentAnalysis', @_); | ||
| 41 | return $self->caller->do_call($self, $call_object); | ||
| 42 | } | ||
| 43 | sub StartDocumentTextDetection { | ||
| 44 | my $self = shift; | ||
| 45 | my $call_object = $self->new_with_coercions('Paws::Textract::StartDocumentTextDetection', @_); | ||
| 46 | return $self->caller->do_call($self, $call_object); | ||
| 47 | } | ||
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | sub operations { qw/AnalyzeDocument DetectDocumentText GetDocumentAnalysis GetDocumentTextDetection StartDocumentAnalysis StartDocumentTextDetection / } | ||
| 52 | |||
| 53 | 1; | ||
| 54 | |||
| 55 | ### main pod documentation begin ### | ||
| 56 | |||
| 57 | =head1 NAME | ||
| 58 | |||
| 59 | Paws::Textract - Perl Interface to AWS Amazon Textract | ||
| 60 | |||
| 61 | =head1 SYNOPSIS | ||
| 62 | |||
| 63 | use Paws; | ||
| 64 | |||
| 65 | my $obj = Paws->service('Textract'); | ||
| 66 | my $res = $obj->Method( | ||
| 67 | Arg1 => $val1, | ||
| 68 | Arg2 => [ 'V1', 'V2' ], | ||
| 69 | # if Arg3 is an object, the HashRef will be used as arguments to the constructor | ||
| 70 | # of the arguments type | ||
| 71 | Arg3 => { Att1 => 'Val1' }, | ||
| 72 | # if Arg4 is an array of objects, the HashRefs will be passed as arguments to | ||
| 73 | # the constructor of the arguments type | ||
| 74 | Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], | ||
| 75 | ); | ||
| 76 | |||
| 77 | =head1 DESCRIPTION | ||
| 78 | |||
| 79 | Amazon Textract detects and analyzes text in documents and converts it | ||
| 80 | into machine-readable text. This is the API reference documentation for | ||
| 81 | Amazon Textract. | ||
| 82 | |||
| 83 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27> | ||
| 84 | |||
| 85 | |||
| 86 | =head1 METHODS | ||
| 87 | |||
| 88 | =head2 AnalyzeDocument | ||
| 89 | |||
| 90 | =over | ||
| 91 | |||
| 92 | =item Document => L<Paws::Textract::Document> | ||
| 93 | |||
| 94 | =item FeatureTypes => ArrayRef[Str|Undef] | ||
| 95 | |||
| 96 | =item [HumanLoopConfig => L<Paws::Textract::HumanLoopConfig>] | ||
| 97 | |||
| 98 | |||
| 99 | =back | ||
| 100 | |||
| 101 | Each argument is described in detail in: L<Paws::Textract::AnalyzeDocument> | ||
| 102 | |||
| 103 | Returns: a L<Paws::Textract::AnalyzeDocumentResponse> instance | ||
| 104 | |||
| 105 | Analyzes an input document for relationships between detected items. | ||
| 106 | |||
| 107 | The types of information returned are as follows: | ||
| 108 | |||
| 109 | =over | ||
| 110 | |||
| 111 | =item * | ||
| 112 | |||
| 113 | Form data (key-value pairs). The related information is returned in two | ||
| 114 | Block objects, each of type C<KEY_VALUE_SET>: a KEY C<Block> object and | ||
| 115 | a VALUE C<Block> object. For example, I<Name: Ana Silva Carolina> | ||
| 116 | contains a key and value. I<Name:> is the key. I<Ana Silva Carolina> is | ||
| 117 | the value. | ||
| 118 | |||
| 119 | =item * | ||
| 120 | |||
| 121 | Table and table cell data. A TABLE C<Block> object contains information | ||
| 122 | about a detected table. A CELL C<Block> object is returned for each | ||
| 123 | cell in a table. | ||
| 124 | |||
| 125 | =item * | ||
| 126 | |||
| 127 | Lines and words of text. A LINE C<Block> object contains one or more | ||
| 128 | WORD C<Block> objects. All lines and words that are detected in the | ||
| 129 | document are returned (including text that doesn't have a relationship | ||
| 130 | with the value of C<FeatureTypes>). | ||
| 131 | |||
| 132 | =back | ||
| 133 | |||
| 134 | Selection elements such as check boxes and option buttons (radio | ||
| 135 | buttons) can be detected in form data and in tables. A | ||
| 136 | SELECTION_ELEMENT C<Block> object contains information about a | ||
| 137 | selection element, including the selection status. | ||
| 138 | |||
| 139 | You can choose which type of analysis to perform by specifying the | ||
| 140 | C<FeatureTypes> list. | ||
| 141 | |||
| 142 | The output is returned in a list of C<Block> objects. | ||
| 143 | |||
| 144 | C<AnalyzeDocument> is a synchronous operation. To analyze documents | ||
| 145 | asynchronously, use StartDocumentAnalysis. | ||
| 146 | |||
| 147 | For more information, see Document Text Analysis | ||
| 148 | (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). | ||
| 149 | |||
| 150 | |||
| 151 | =head2 DetectDocumentText | ||
| 152 | |||
| 153 | =over | ||
| 154 | |||
| 155 | =item Document => L<Paws::Textract::Document> | ||
| 156 | |||
| 157 | |||
| 158 | =back | ||
| 159 | |||
| 160 | Each argument is described in detail in: L<Paws::Textract::DetectDocumentText> | ||
| 161 | |||
| 162 | Returns: a L<Paws::Textract::DetectDocumentTextResponse> instance | ||
| 163 | |||
| 164 | Detects text in the input document. Amazon Textract can detect lines of | ||
| 165 | text and the words that make up a line of text. The input document must | ||
| 166 | be an image in JPEG or PNG format. C<DetectDocumentText> returns the | ||
| 167 | detected text in an array of Block objects. | ||
| 168 | |||
| 169 | Each document page has as an associated C<Block> of type PAGE. Each | ||
| 170 | PAGE C<Block> object is the parent of LINE C<Block> objects that | ||
| 171 | represent the lines of detected text on a page. A LINE C<Block> object | ||
| 172 | is a parent for each word that makes up the line. Words are represented | ||
| 173 | by C<Block> objects of type WORD. | ||
| 174 | |||
| 175 | C<DetectDocumentText> is a synchronous operation. To analyze documents | ||
| 176 | asynchronously, use StartDocumentTextDetection. | ||
| 177 | |||
| 178 | For more information, see Document Text Detection | ||
| 179 | (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). | ||
| 180 | |||
| 181 | |||
| 182 | =head2 GetDocumentAnalysis | ||
| 183 | |||
| 184 | =over | ||
| 185 | |||
| 186 | =item JobId => Str | ||
| 187 | |||
| 188 | =item [MaxResults => Int] | ||
| 189 | |||
| 190 | =item [NextToken => Str] | ||
| 191 | |||
| 192 | |||
| 193 | =back | ||
| 194 | |||
| 195 | Each argument is described in detail in: L<Paws::Textract::GetDocumentAnalysis> | ||
| 196 | |||
| 197 | Returns: a L<Paws::Textract::GetDocumentAnalysisResponse> instance | ||
| 198 | |||
| 199 | Gets the results for an Amazon Textract asynchronous operation that | ||
| 200 | analyzes text in a document. | ||
| 201 | |||
| 202 | You start asynchronous text analysis by calling StartDocumentAnalysis, | ||
| 203 | which returns a job identifier (C<JobId>). When the text analysis | ||
| 204 | operation finishes, Amazon Textract publishes a completion status to | ||
| 205 | the Amazon Simple Notification Service (Amazon SNS) topic that's | ||
| 206 | registered in the initial call to C<StartDocumentAnalysis>. To get the | ||
| 207 | results of the text-detection operation, first check that the status | ||
| 208 | value published to the Amazon SNS topic is C<SUCCEEDED>. If so, call | ||
| 209 | C<GetDocumentAnalysis>, and pass the job identifier (C<JobId>) from the | ||
| 210 | initial call to C<StartDocumentAnalysis>. | ||
| 211 | |||
| 212 | C<GetDocumentAnalysis> returns an array of Block objects. The following | ||
| 213 | types of information are returned: | ||
| 214 | |||
| 215 | =over | ||
| 216 | |||
| 217 | =item * | ||
| 218 | |||
| 219 | Form data (key-value pairs). The related information is returned in two | ||
| 220 | Block objects, each of type C<KEY_VALUE_SET>: a KEY C<Block> object and | ||
| 221 | a VALUE C<Block> object. For example, I<Name: Ana Silva Carolina> | ||
| 222 | contains a key and value. I<Name:> is the key. I<Ana Silva Carolina> is | ||
| 223 | the value. | ||
| 224 | |||
| 225 | =item * | ||
| 226 | |||
| 227 | Table and table cell data. A TABLE C<Block> object contains information | ||
| 228 | about a detected table. A CELL C<Block> object is returned for each | ||
| 229 | cell in a table. | ||
| 230 | |||
| 231 | =item * | ||
| 232 | |||
| 233 | Lines and words of text. A LINE C<Block> object contains one or more | ||
| 234 | WORD C<Block> objects. All lines and words that are detected in the | ||
| 235 | document are returned (including text that doesn't have a relationship | ||
| 236 | with the value of the C<StartDocumentAnalysis> C<FeatureTypes> input | ||
| 237 | parameter). | ||
| 238 | |||
| 239 | =back | ||
| 240 | |||
| 241 | Selection elements such as check boxes and option buttons (radio | ||
| 242 | buttons) can be detected in form data and in tables. A | ||
| 243 | SELECTION_ELEMENT C<Block> object contains information about a | ||
| 244 | selection element, including the selection status. | ||
| 245 | |||
| 246 | Use the C<MaxResults> parameter to limit the number of blocks that are | ||
| 247 | returned. If there are more results than specified in C<MaxResults>, | ||
| 248 | the value of C<NextToken> in the operation response contains a | ||
| 249 | pagination token for getting the next set of results. To get the next | ||
| 250 | page of results, call C<GetDocumentAnalysis>, and populate the | ||
| 251 | C<NextToken> request parameter with the token value that's returned | ||
| 252 | from the previous call to C<GetDocumentAnalysis>. | ||
| 253 | |||
| 254 | For more information, see Document Text Analysis | ||
| 255 | (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). | ||
| 256 | |||
| 257 | |||
| 258 | =head2 GetDocumentTextDetection | ||
| 259 | |||
| 260 | =over | ||
| 261 | |||
| 262 | =item JobId => Str | ||
| 263 | |||
| 264 | =item [MaxResults => Int] | ||
| 265 | |||
| 266 | =item [NextToken => Str] | ||
| 267 | |||
| 268 | |||
| 269 | =back | ||
| 270 | |||
| 271 | Each argument is described in detail in: L<Paws::Textract::GetDocumentTextDetection> | ||
| 272 | |||
| 273 | Returns: a L<Paws::Textract::GetDocumentTextDetectionResponse> instance | ||
| 274 | |||
| 275 | Gets the results for an Amazon Textract asynchronous operation that | ||
| 276 | detects text in a document. Amazon Textract can detect lines of text | ||
| 277 | and the words that make up a line of text. | ||
| 278 | |||
| 279 | You start asynchronous text detection by calling | ||
| 280 | StartDocumentTextDetection, which returns a job identifier (C<JobId>). | ||
| 281 | When the text detection operation finishes, Amazon Textract publishes a | ||
| 282 | completion status to the Amazon Simple Notification Service (Amazon | ||
| 283 | SNS) topic that's registered in the initial call to | ||
| 284 | C<StartDocumentTextDetection>. To get the results of the text-detection | ||
| 285 | operation, first check that the status value published to the Amazon | ||
| 286 | SNS topic is C<SUCCEEDED>. If so, call C<GetDocumentTextDetection>, and | ||
| 287 | pass the job identifier (C<JobId>) from the initial call to | ||
| 288 | C<StartDocumentTextDetection>. | ||
| 289 | |||
| 290 | C<GetDocumentTextDetection> returns an array of Block objects. | ||
| 291 | |||
| 292 | Each document page has as an associated C<Block> of type PAGE. Each | ||
| 293 | PAGE C<Block> object is the parent of LINE C<Block> objects that | ||
| 294 | represent the lines of detected text on a page. A LINE C<Block> object | ||
| 295 | is a parent for each word that makes up the line. Words are represented | ||
| 296 | by C<Block> objects of type WORD. | ||
| 297 | |||
| 298 | Use the MaxResults parameter to limit the number of blocks that are | ||
| 299 | returned. If there are more results than specified in C<MaxResults>, | ||
| 300 | the value of C<NextToken> in the operation response contains a | ||
| 301 | pagination token for getting the next set of results. To get the next | ||
| 302 | page of results, call C<GetDocumentTextDetection>, and populate the | ||
| 303 | C<NextToken> request parameter with the token value that's returned | ||
| 304 | from the previous call to C<GetDocumentTextDetection>. | ||
| 305 | |||
| 306 | For more information, see Document Text Detection | ||
| 307 | (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). | ||
| 308 | |||
| 309 | |||
| 310 | =head2 StartDocumentAnalysis | ||
| 311 | |||
| 312 | =over | ||
| 313 | |||
| 314 | =item DocumentLocation => L<Paws::Textract::DocumentLocation> | ||
| 315 | |||
| 316 | =item FeatureTypes => ArrayRef[Str|Undef] | ||
| 317 | |||
| 318 | =item [ClientRequestToken => Str] | ||
| 319 | |||
| 320 | =item [JobTag => Str] | ||
| 321 | |||
| 322 | =item [KMSKeyId => Str] | ||
| 323 | |||
| 324 | =item [NotificationChannel => L<Paws::Textract::NotificationChannel>] | ||
| 325 | |||
| 326 | =item [OutputConfig => L<Paws::Textract::OutputConfig>] | ||
| 327 | |||
| 328 | |||
| 329 | =back | ||
| 330 | |||
| 331 | Each argument is described in detail in: L<Paws::Textract::StartDocumentAnalysis> | ||
| 332 | |||
| 333 | Returns: a L<Paws::Textract::StartDocumentAnalysisResponse> instance | ||
| 334 | |||
| 335 | Starts the asynchronous analysis of an input document for relationships | ||
| 336 | between detected items such as key-value pairs, tables, and selection | ||
| 337 | elements. | ||
| 338 | |||
| 339 | C<StartDocumentAnalysis> can analyze text in documents that are in | ||
| 340 | JPEG, PNG, and PDF format. The documents are stored in an Amazon S3 | ||
| 341 | bucket. Use DocumentLocation to specify the bucket name and file name | ||
| 342 | of the document. | ||
| 343 | |||
| 344 | C<StartDocumentAnalysis> returns a job identifier (C<JobId>) that you | ||
| 345 | use to get the results of the operation. When text analysis is | ||
| 346 | finished, Amazon Textract publishes a completion status to the Amazon | ||
| 347 | Simple Notification Service (Amazon SNS) topic that you specify in | ||
| 348 | C<NotificationChannel>. To get the results of the text analysis | ||
| 349 | operation, first check that the status value published to the Amazon | ||
| 350 | SNS topic is C<SUCCEEDED>. If so, call GetDocumentAnalysis, and pass | ||
| 351 | the job identifier (C<JobId>) from the initial call to | ||
| 352 | C<StartDocumentAnalysis>. | ||
| 353 | |||
| 354 | For more information, see Document Text Analysis | ||
| 355 | (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). | ||
| 356 | |||
| 357 | |||
| 358 | =head2 StartDocumentTextDetection | ||
| 359 | |||
| 360 | =over | ||
| 361 | |||
| 362 | =item DocumentLocation => L<Paws::Textract::DocumentLocation> | ||
| 363 | |||
| 364 | =item [ClientRequestToken => Str] | ||
| 365 | |||
| 366 | =item [JobTag => Str] | ||
| 367 | |||
| 368 | =item [KMSKeyId => Str] | ||
| 369 | |||
| 370 | =item [NotificationChannel => L<Paws::Textract::NotificationChannel>] | ||
| 371 | |||
| 372 | =item [OutputConfig => L<Paws::Textract::OutputConfig>] | ||
| 373 | |||
| 374 | |||
| 375 | =back | ||
| 376 | |||
| 377 | Each argument is described in detail in: L<Paws::Textract::StartDocumentTextDetection> | ||
| 378 | |||
| 379 | Returns: a L<Paws::Textract::StartDocumentTextDetectionResponse> instance | ||
| 380 | |||
| 381 | Starts the asynchronous detection of text in a document. Amazon | ||
| 382 | Textract can detect lines of text and the words that make up a line of | ||
| 383 | text. | ||
| 384 | |||
| 385 | C<StartDocumentTextDetection> can analyze text in documents that are in | ||
| 386 | JPEG, PNG, and PDF format. The documents are stored in an Amazon S3 | ||
| 387 | bucket. Use DocumentLocation to specify the bucket name and file name | ||
| 388 | of the document. | ||
| 389 | |||
| 390 | C<StartTextDetection> returns a job identifier (C<JobId>) that you use | ||
| 391 | to get the results of the operation. When text detection is finished, | ||
| 392 | Amazon Textract publishes a completion status to the Amazon Simple | ||
| 393 | Notification Service (Amazon SNS) topic that you specify in | ||
| 394 | C<NotificationChannel>. To get the results of the text detection | ||
| 395 | operation, first check that the status value published to the Amazon | ||
| 396 | SNS topic is C<SUCCEEDED>. If so, call GetDocumentTextDetection, and | ||
| 397 | pass the job identifier (C<JobId>) from the initial call to | ||
| 398 | C<StartDocumentTextDetection>. | ||
| 399 | |||
| 400 | For more information, see Document Text Detection | ||
| 401 | (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). | ||
| 402 | |||
| 403 | |||
| 404 | |||
| 405 | |||
| 406 | =head1 PAGINATORS | ||
| 407 | |||
| 408 | Paginator methods are helpers that repetively call methods that return partial results | ||
| 409 | |||
| 410 | |||
| 411 | |||
| 412 | |||
| 413 | =head1 SEE ALSO | ||
| 414 | |||
| 415 | This service class forms part of L<Paws> | ||
| 416 | |||
| 417 | =head1 BUGS and CONTRIBUTIONS | ||
| 418 | |||
| 419 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 420 | |||
| 421 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 422 | |||
| 423 | =cut | ||
| 424 |