Reference documentation and code samples for the Cloud Natural Language V1beta2 Client class TextSpan.
Represents an output piece of text.
Generated from protobuf message google.cloud.language.v1beta2.TextSpan
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ content |
string
The content of the output text. |
↳ begin_offset |
int
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
getContent
The content of the output text.
Returns | |
---|---|
Type | Description |
string |
setContent
The content of the output text.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getBeginOffset
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
Returns | |
---|---|
Type | Description |
int |
setBeginOffset
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |