amazonka-comprehend-2.0: Amazon Comprehend SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Comprehend.Types.Block

Description

 
Synopsis

Documentation

data Block Source #

Information about each word or line of text in the input document.

For additional information, see Block in the Amazon Textract API reference.

See: newBlock smart constructor.

Constructors

Block' 

Fields

  • blockType :: Maybe BlockType

    The block represents a line of text or one word of text.

    • WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
    • LINE - A string of tab-delimited, contiguous words that are detected on a document page
  • geometry :: Maybe Geometry

    Co-ordinates of the rectangle or polygon that contains the text.

  • id :: Maybe Text

    Unique identifier for the block.

  • page :: Maybe Int

    Page number where the block appears.

  • relationships :: Maybe [RelationshipsListItem]

    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.

  • text :: Maybe Text

    The word or line of text extracted from the block.

Instances

Instances details
FromJSON Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

Generic Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

Associated Types

type Rep Block :: Type -> Type #

Methods

from :: Block -> Rep Block x #

to :: Rep Block x -> Block #

Read Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

Show Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

Methods

showsPrec :: Int -> Block -> ShowS #

show :: Block -> String #

showList :: [Block] -> ShowS #

NFData Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

Methods

rnf :: Block -> () #

Eq Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

Methods

(==) :: Block -> Block -> Bool #

(/=) :: Block -> Block -> Bool #

Hashable Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

Methods

hashWithSalt :: Int -> Block -> Int #

hash :: Block -> Int #

type Rep Block Source # 
Instance details

Defined in Amazonka.Comprehend.Types.Block

newBlock :: Block Source #

Create a value of Block with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:blockType:Block', block_blockType - The block represents a line of text or one word of text.

  • WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
  • LINE - A string of tab-delimited, contiguous words that are detected on a document page

$sel:geometry:Block', block_geometry - Co-ordinates of the rectangle or polygon that contains the text.

$sel:id:Block', block_id - Unique identifier for the block.

$sel:page:Block', block_page - Page number where the block appears.

$sel:relationships:Block', block_relationships - 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.

$sel:text:Block', block_text - The word or line of text extracted from the block.

block_blockType :: Lens' Block (Maybe BlockType) Source #

The block represents a line of text or one word of text.

  • WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
  • LINE - A string of tab-delimited, contiguous words that are detected on a document page

block_geometry :: Lens' Block (Maybe Geometry) Source #

Co-ordinates of the rectangle or polygon that contains the text.

block_id :: Lens' Block (Maybe Text) Source #

Unique identifier for the block.

block_page :: Lens' Block (Maybe Int) Source #

Page number where the block appears.

block_relationships :: Lens' Block (Maybe [RelationshipsListItem]) Source #

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.

block_text :: Lens' Block (Maybe Text) Source #

The word or line of text extracted from the block.