Cloud Natural Language V2 API - Class Google::Cloud::Language::V2::TextSpan (v0.1.0)

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

Represents a text span in the input document.

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 text span, which is a substring of the document.

#content=

def content=(value) -> ::String
Parameter
  • value (::String) — The content of the text span, which is a substring of the document.
Returns
  • (::String) — The content of the text span, which is a substring of the document.