Cloud AutoML V1beta1 Client - Class Layout (1.6.5)

Reference documentation and code samples for the Cloud AutoML V1beta1 Client class Layout.

Describes the layout information of a text_segment in the document.

Generated from protobuf message google.cloud.automl.v1beta1.Document.Layout

Namespace

Google \ Cloud \ AutoMl \ V1beta1 \ Document

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ text_segment
Google\Cloud\AutoMl\V1beta1\TextSegment

Text Segment that represents a segment in document_text .

↳ page_number
int

Page number of the text_segment in the original document, starts from 1.

↳ bounding_poly
Google\Cloud\AutoMl\V1beta1\BoundingPoly

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

↳ text_segment_type
int

The type of the text_segment in document.

getTextSegment

Text Segment that represents a segment in document_text .

Returns
Type
Description

hasTextSegment

clearTextSegment

setTextSegment

Text Segment that represents a segment in document_text .

Parameter
Name
Description
Returns
Type
Description
$this

getPageNumber

Page number of the text_segment in the original document, starts from 1.

Returns
Type
Description
int

setPageNumber

Page number of the text_segment in the original document, starts from 1.

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getBoundingPoly

The position of the text_segment in the page.

Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

Returns
Type
Description

hasBoundingPoly

clearBoundingPoly

setBoundingPoly

The position of the text_segment in the page.

Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

Parameter
Name
Description
Returns
Type
Description
$this

getTextSegmentType

The type of the text_segment in document.

Returns
Type
Description
int

setTextSegmentType

The type of the text_segment in document.

Parameter
Name
Description
var
int
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: