Block class
A Block
represents items that are recognized in a document
within a group of pixels close to each other. The information returned in a
Block
object depends on the type of operation. In text
detection for documents (for example DetectDocumentText), you get
information about the detected words and lines of text. In text analysis
(for example AnalyzeDocument), you can also get information about the
fields, tables, and selection elements that are detected in the document.
An array of Block
objects is returned by both synchronous and
asynchronous operations. In synchronous operations, such as
DetectDocumentText, the array of Block
objects is the
entire set of results. In asynchronous operations, such as
GetDocumentAnalysis, the array is returned over one or more
responses.
For more information, see How Amazon Textract Works.
Constructors
-
Block({BlockType? blockType, int? columnIndex, int? columnSpan, double? confidence, List<
EntityType> ? entityTypes, Geometry? geometry, String? id, int? page, List<Relationship> ? relationships, int? rowIndex, int? rowSpan, SelectionStatus? selectionStatus, String? text, TextType? textType}) -
Block.fromJson(Map<
String, dynamic> json) -
factory
Properties
- blockType → BlockType?
-
The type of text item that's recognized. In operations for text detection,
the following types are returned:
final
- columnIndex → int?
-
The column in which a table cell appears. The first column position is 1.
ColumnIndex
isn't returned byDetectDocumentText
andGetDocumentTextDetection
.final - columnSpan → int?
-
The number of columns that a table cell spans. Currently this value is
always 1, even if the number of columns spanned is greater than 1.
ColumnSpan
isn't returned byDetectDocumentText
andGetDocumentTextDetection
.final - confidence → double?
-
The confidence score that Amazon Textract has in the accuracy of the
recognized text and the accuracy of the geometry points around the
recognized text.
final
-
entityTypes
→ List<
EntityType> ? -
The type of entity. The following can be returned:
final
- geometry → Geometry?
-
The location of the recognized text on the image. It includes an
axis-aligned, coarse bounding box that surrounds the text, and a finer-grain
polygon for more accurate spatial information.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The identifier for the recognized text. The identifier is only unique for a
single operation.
final
- page → int?
-
The page on which a block was detected.
Page
is returned by asynchronous operations. Page values greater than 1 are only returned for multipage documents that are in PDF format. A scanned image (JPEG/PNG), even if it contains multiple document pages, is considered to be a single-page document. The value ofPage
is always 1. Synchronous operations don't returnPage
because every input document is considered to be a single-page document.final -
relationships
→ List<
Relationship> ? -
A list of child blocks of the current block. For example, a LINE object has
child blocks for each WORD block that's part of the line of text. There
aren't Relationship objects in the list for relationships that don't exist,
such as when the current block has no child blocks. The list size can be the
following:
final
- rowIndex → int?
-
The row in which a table cell is located. The first row position is 1.
RowIndex
isn't returned byDetectDocumentText
andGetDocumentTextDetection
.final - rowSpan → int?
-
The number of rows that a table cell spans. Currently this value is always
1, even if the number of rows spanned is greater than 1.
RowSpan
isn't returned byDetectDocumentText
andGetDocumentTextDetection
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionStatus → SelectionStatus?
-
The selection status of a selection element, such as an option button or
check box.
final
- text → String?
-
The word or line of text that's recognized by Amazon Textract.
final
- textType → TextType?
-
The kind of text that Amazon Textract has detected. Can check for
handwritten text and printed text.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited