Natural Language V1beta2 API - Class Google::Cloud::Language::V1beta2::TextSpan (v0.9.0)

Reference documentation and code samples for the Natural Language V1beta2 API class Google::Cloud::Language::V1beta2::TextSpan.

Represents an output piece of text.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#begin_offset

def begin_offset() -> ::Integer
Returns
  • (::Integer) — The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.

#begin_offset=

def begin_offset=(value) -> ::Integer
Parameter
  • value (::Integer) — The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
Returns
  • (::Integer) — The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.

#content

def content() -> ::String
Returns
  • (::String) — The content of the output text.

#content=

def content=(value) -> ::String
Parameter
  • value (::String) — The content of the output text.
Returns
  • (::String) — The content of the output text.