Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WordBlock

Interface that provides access to information about Word blocks. If present word blocks are always the leaves of the tree, that is they never have any child node.

In the current implementation the parent of a Word block is always a line block.

Hierarchy

Index

Properties

blockType

blockType: Word

Constant indicating the type of Block. Can be used for type descrimination, see BlockType for more details.

confidence

confidence: number

The confidence (as a precentage) that the text has been identified correctly

geometry

geometry: Geometry

Location information identifying where the block can be found

id

id: string

Unique id used to identify a block

text

text: string

The text recognised for this block

Methods

children

  • Gets the children of this node

    Returns Block[]

    an array of children or an empty array if this is a leaf node

hasChild

  • hasChild(item: Block): boolean
  • Determines whether or not the specified node is a child of this node.

    Parameters

    • item: Block

      the item to look for

    Returns boolean

    true if the item is a child of this node, false otherwise

parent

  • Get the parent node of this node

    Returns LineBlock | undefined

    the parent of this node or undefined if this is the root node

Generated using TypeDoc