Google Cloud Document Ai V1 Client - Class Layout (1.2.2)

Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Layout.

Visual element describing a layout unit on a page.

Generated from protobuf message google.cloud.documentai.v1.Document.Page.Layout

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ text_anchor Google\Cloud\DocumentAI\V1\Document\TextAnchor

Text anchor indexing into the Document.text.

↳ confidence float

Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].

↳ bounding_poly Google\Cloud\DocumentAI\V1\BoundingPoly

The bounding polygon for the Layout.

↳ orientation int

Detected orientation for the Layout.

getTextAnchor

Text anchor indexing into the Document.text.

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\TextAnchor|null

hasTextAnchor

clearTextAnchor

setTextAnchor

Text anchor indexing into the Document.text.

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\TextAnchor
Returns
TypeDescription
$this

getConfidence

Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context.

Range [0, 1].

Returns
TypeDescription
float

setConfidence

Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context.

Range [0, 1].

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getBoundingPoly

The bounding polygon for the Layout.

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\BoundingPoly|null

hasBoundingPoly

clearBoundingPoly

setBoundingPoly

The bounding polygon for the Layout.

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\BoundingPoly
Returns
TypeDescription
$this

getOrientation

Detected orientation for the Layout.

Returns
TypeDescription
int

setOrientation

Detected orientation for the Layout.

Parameter
NameDescription
var int
Returns
TypeDescription
$this