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
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 |
Google\Cloud\AutoMl\V1beta1\TextSegment|null |
hasTextSegment
clearTextSegment
setTextSegment
Text Segment that represents a segment in document_text.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\AutoMl\V1beta1\TextSegment
|
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 |
Google\Cloud\AutoMl\V1beta1\BoundingPoly|null |
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 |
var |
Google\Cloud\AutoMl\V1beta1\BoundingPoly
|
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 |