Reference documentation and code samples for the Cloud Natural Language V2 Client class TextSpan.
Represents a text span in the input document.
Generated from protobuf message google.cloud.language.v2.TextSpan
Namespace
Google \ Cloud \ Language \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ content
string
The content of the text span, which is a substring of the document.
↳ 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 text span, which is a substring of the document.
string
setContent
The content of the text span, which is a substring of the document.
var
string
$this
getBeginOffset
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
int
setBeginOffset
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
var
int
$this