« blib/lib/Paws/Textract/AnalyzeDocumentResponse.pm
↑ Summary
blib/lib/Paws/Textract/BoundingBox.pm »
| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::Textract::Block; | ||
| 3 | use Moose; | ||
| 4 | has BlockType => (is => 'ro', isa => 'Str'); | ||
| 5 | has ColumnIndex => (is => 'ro', isa => 'Int'); | ||
| 6 | has ColumnSpan => (is => 'ro', isa => 'Int'); | ||
| 7 | has Confidence => (is => 'ro', isa => 'Num'); | ||
| 8 | has EntityTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 9 | has Geometry => (is => 'ro', isa => 'Paws::Textract::Geometry'); | ||
| 10 | has Id => (is => 'ro', isa => 'Str'); | ||
| 11 | has Page => (is => 'ro', isa => 'Int'); | ||
| 12 | has Relationships => (is => 'ro', isa => 'ArrayRef[Paws::Textract::Relationship]'); | ||
| 13 | has RowIndex => (is => 'ro', isa => 'Int'); | ||
| 14 | has RowSpan => (is => 'ro', isa => 'Int'); | ||
| 15 | has SelectionStatus => (is => 'ro', isa => 'Str'); | ||
| 16 | has Text => (is => 'ro', isa => 'Str'); | ||
| 17 | has TextType => (is => 'ro', isa => 'Str'); | ||
| 18 | |||
| 19 | 1; | ||
| 20 | |||
| 21 | ### main pod documentation begin ### | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Paws::Textract::Block | ||
| 26 | |||
| 27 | =head1 USAGE | ||
| 28 | |||
| 29 | This class represents one of two things: | ||
| 30 | |||
| 31 | =head3 Arguments in a call to a service | ||
| 32 | |||
| 33 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 34 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 35 | |||
| 36 | As an example, if Att1 is expected to be a Paws::Textract::Block object: | ||
| 37 | |||
| 38 | $service_obj->Method(Att1 => { BlockType => $value, ..., TextType => $value }); | ||
| 39 | |||
| 40 | =head3 Results returned from an API call | ||
| 41 | |||
| 42 | Use accessors for each attribute. If Att1 is expected to be an Paws::Textract::Block object: | ||
| 43 | |||
| 44 | $result = $service_obj->Method(...); | ||
| 45 | $result->Att1->BlockType | ||
| 46 | |||
| 47 | =head1 DESCRIPTION | ||
| 48 | |||
| 49 | A C<Block> represents items that are recognized in a document within a | ||
| 50 | group of pixels close to each other. The information returned in a | ||
| 51 | C<Block> object depends on the type of operation. In text detection for | ||
| 52 | documents (for example DetectDocumentText), you get information about | ||
| 53 | the detected words and lines of text. In text analysis (for example | ||
| 54 | AnalyzeDocument), you can also get information about the fields, | ||
| 55 | tables, and selection elements that are detected in the document. | ||
| 56 | |||
| 57 | An array of C<Block> objects is returned by both synchronous and | ||
| 58 | asynchronous operations. In synchronous operations, such as | ||
| 59 | DetectDocumentText, the array of C<Block> objects is the entire set of | ||
| 60 | results. In asynchronous operations, such as GetDocumentAnalysis, the | ||
| 61 | array is returned over one or more responses. | ||
| 62 | |||
| 63 | For more information, see How Amazon Textract Works | ||
| 64 | (https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html). | ||
| 65 | |||
| 66 | =head1 ATTRIBUTES | ||
| 67 | |||
| 68 | |||
| 69 | =head2 BlockType => Str | ||
| 70 | |||
| 71 | The type of text item that's recognized. In operations for text | ||
| 72 | detection, the following types are returned: | ||
| 73 | |||
| 74 | =over | ||
| 75 | |||
| 76 | =item * | ||
| 77 | |||
| 78 | I<PAGE> - Contains a list of the LINE C<Block> objects that are | ||
| 79 | detected on a document page. | ||
| 80 | |||
| 81 | =item * | ||
| 82 | |||
| 83 | I<WORD> - A word detected on a document page. A word is one or more ISO | ||
| 84 | basic Latin script characters that aren't separated by spaces. | ||
| 85 | |||
| 86 | =item * | ||
| 87 | |||
| 88 | I<LINE> - A string of tab-delimited, contiguous words that are detected | ||
| 89 | on a document page. | ||
| 90 | |||
| 91 | =back | ||
| 92 | |||
| 93 | In text analysis operations, the following types are returned: | ||
| 94 | |||
| 95 | =over | ||
| 96 | |||
| 97 | =item * | ||
| 98 | |||
| 99 | I<PAGE> - Contains a list of child C<Block> objects that are detected | ||
| 100 | on a document page. | ||
| 101 | |||
| 102 | =item * | ||
| 103 | |||
| 104 | I<KEY_VALUE_SET> - Stores the KEY and VALUE C<Block> objects for linked | ||
| 105 | text that's detected on a document page. Use the C<EntityType> field to | ||
| 106 | determine if a KEY_VALUE_SET object is a KEY C<Block> object or a VALUE | ||
| 107 | C<Block> object. | ||
| 108 | |||
| 109 | =item * | ||
| 110 | |||
| 111 | I<WORD> - A word that's detected on a document page. A word is one or | ||
| 112 | more ISO basic Latin script characters that aren't separated by spaces. | ||
| 113 | |||
| 114 | =item * | ||
| 115 | |||
| 116 | I<LINE> - A string of tab-delimited, contiguous words that are detected | ||
| 117 | on a document page. | ||
| 118 | |||
| 119 | =item * | ||
| 120 | |||
| 121 | I<TABLE> - A table that's detected on a document page. A table is | ||
| 122 | grid-based information with two or more rows or columns, with a cell | ||
| 123 | span of one row and one column each. | ||
| 124 | |||
| 125 | =item * | ||
| 126 | |||
| 127 | I<CELL> - A cell within a detected table. The cell is the parent of the | ||
| 128 | block that contains the text in the cell. | ||
| 129 | |||
| 130 | =item * | ||
| 131 | |||
| 132 | I<SELECTION_ELEMENT> - A selection element such as an option button | ||
| 133 | (radio button) or a check box that's detected on a document page. Use | ||
| 134 | the value of C<SelectionStatus> to determine the status of the | ||
| 135 | selection element. | ||
| 136 | |||
| 137 | =back | ||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | =head2 ColumnIndex => Int | ||
| 142 | |||
| 143 | The column in which a table cell appears. The first column position is | ||
| 144 | 1. C<ColumnIndex> isn't returned by C<DetectDocumentText> and | ||
| 145 | C<GetDocumentTextDetection>. | ||
| 146 | |||
| 147 | |||
| 148 | =head2 ColumnSpan => Int | ||
| 149 | |||
| 150 | The number of columns that a table cell spans. Currently this value is | ||
| 151 | always 1, even if the number of columns spanned is greater than 1. | ||
| 152 | C<ColumnSpan> isn't returned by C<DetectDocumentText> and | ||
| 153 | C<GetDocumentTextDetection>. | ||
| 154 | |||
| 155 | |||
| 156 | =head2 Confidence => Num | ||
| 157 | |||
| 158 | The confidence score that Amazon Textract has in the accuracy of the | ||
| 159 | recognized text and the accuracy of the geometry points around the | ||
| 160 | recognized text. | ||
| 161 | |||
| 162 | |||
| 163 | =head2 EntityTypes => ArrayRef[Str|Undef] | ||
| 164 | |||
| 165 | The type of entity. The following can be returned: | ||
| 166 | |||
| 167 | =over | ||
| 168 | |||
| 169 | =item * | ||
| 170 | |||
| 171 | I<KEY> - An identifier for a field on the document. | ||
| 172 | |||
| 173 | =item * | ||
| 174 | |||
| 175 | I<VALUE> - The field text. | ||
| 176 | |||
| 177 | =back | ||
| 178 | |||
| 179 | C<EntityTypes> isn't returned by C<DetectDocumentText> and | ||
| 180 | C<GetDocumentTextDetection>. | ||
| 181 | |||
| 182 | |||
| 183 | =head2 Geometry => L<Paws::Textract::Geometry> | ||
| 184 | |||
| 185 | The location of the recognized text on the image. It includes an | ||
| 186 | axis-aligned, coarse bounding box that surrounds the text, and a | ||
| 187 | finer-grain polygon for more accurate spatial information. | ||
| 188 | |||
| 189 | |||
| 190 | =head2 Id => Str | ||
| 191 | |||
| 192 | The identifier for the recognized text. The identifier is only unique | ||
| 193 | for a single operation. | ||
| 194 | |||
| 195 | |||
| 196 | =head2 Page => Int | ||
| 197 | |||
| 198 | The page on which a block was detected. C<Page> is returned by | ||
| 199 | asynchronous operations. Page values greater than 1 are only returned | ||
| 200 | for multipage documents that are in PDF format. A scanned image | ||
| 201 | (JPEG/PNG), even if it contains multiple document pages, is considered | ||
| 202 | to be a single-page document. The value of C<Page> is always 1. | ||
| 203 | Synchronous operations don't return C<Page> because every input | ||
| 204 | document is considered to be a single-page document. | ||
| 205 | |||
| 206 | |||
| 207 | =head2 Relationships => ArrayRef[L<Paws::Textract::Relationship>] | ||
| 208 | |||
| 209 | A list of child blocks of the current block. For example, a LINE object | ||
| 210 | has child blocks for each WORD block that's part of the line of text. | ||
| 211 | There aren't Relationship objects in the list for relationships that | ||
| 212 | don't exist, such as when the current block has no child blocks. The | ||
| 213 | list size can be the following: | ||
| 214 | |||
| 215 | =over | ||
| 216 | |||
| 217 | =item * | ||
| 218 | |||
| 219 | 0 - The block has no child blocks. | ||
| 220 | |||
| 221 | =item * | ||
| 222 | |||
| 223 | 1 - The block has child blocks. | ||
| 224 | |||
| 225 | =back | ||
| 226 | |||
| 227 | |||
| 228 | |||
| 229 | =head2 RowIndex => Int | ||
| 230 | |||
| 231 | The row in which a table cell is located. The first row position is 1. | ||
| 232 | C<RowIndex> isn't returned by C<DetectDocumentText> and | ||
| 233 | C<GetDocumentTextDetection>. | ||
| 234 | |||
| 235 | |||
| 236 | =head2 RowSpan => Int | ||
| 237 | |||
| 238 | The number of rows that a table cell spans. Currently this value is | ||
| 239 | always 1, even if the number of rows spanned is greater than 1. | ||
| 240 | C<RowSpan> isn't returned by C<DetectDocumentText> and | ||
| 241 | C<GetDocumentTextDetection>. | ||
| 242 | |||
| 243 | |||
| 244 | =head2 SelectionStatus => Str | ||
| 245 | |||
| 246 | The selection status of a selection element, such as an option button | ||
| 247 | or check box. | ||
| 248 | |||
| 249 | |||
| 250 | =head2 Text => Str | ||
| 251 | |||
| 252 | The word or line of text that's recognized by Amazon Textract. | ||
| 253 | |||
| 254 | |||
| 255 | =head2 TextType => Str | ||
| 256 | |||
| 257 | The kind of text that Amazon Textract has detected. Can check for | ||
| 258 | handwritten text and printed text. | ||
| 259 | |||
| 260 | |||
| 261 | |||
| 262 | =head1 SEE ALSO | ||
| 263 | |||
| 264 | This class forms part of L<Paws>, describing an object used in L<Paws::Textract> | ||
| 265 | |||
| 266 | =head1 BUGS and CONTRIBUTIONS | ||
| 267 | |||
| 268 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 269 | |||
| 270 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 271 | |||
| 272 | =cut | ||
| 273 |