Cloud AutoML V1beta1 Client - Class TextSegment (1.6.5)

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

A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding.

Generated from protobuf message google.cloud.automl.v1beta1.TextSegment

Namespace

Google \ Cloud \ AutoMl \ V1beta1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ content string

Output only. The content of the TextSegment.

↳ start_offset int|string

Required. Zero-based character index of the first character of the text segment (counting characters from the beginning of the text).

↳ end_offset int|string

Required. Zero-based character index of the first character past the end of the text segment (counting character from the beginning of the text). The character at the end_offset is NOT included in the text segment.

getContent

Output only. The content of the TextSegment.

Returns
Type Description
string

setContent

Output only. The content of the TextSegment.

Parameter
Name Description
var string
Returns
Type Description
$this

getStartOffset

Required. Zero-based character index of the first character of the text segment (counting characters from the beginning of the text).

Returns
Type Description
int|string

setStartOffset

Required. Zero-based character index of the first character of the text segment (counting characters from the beginning of the text).

Parameter
Name Description
var int|string
Returns
Type Description
$this

getEndOffset

Required. Zero-based character index of the first character past the end of the text segment (counting character from the beginning of the text).

The character at the end_offset is NOT included in the text segment.

Returns
Type Description
int|string

setEndOffset

Required. Zero-based character index of the first character past the end of the text segment (counting character from the beginning of the text).

The character at the end_offset is NOT included in the text segment.

Parameter
Name Description
var int|string
Returns
Type Description
$this