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
defbegin_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=
defbegin_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
defcontent()->::String
Returns
(::String) — The content of the output text.
#content=
defcontent=(value)->::String
Parameter
value (::String) — The content of the output text.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Natural Language V1beta2 API - Class Google::Cloud::Language::V1beta2::TextSpan (v0.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.0 (latest)](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.13.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.13.1/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.12.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.12.0/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.11.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.11.1/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.10.2](/ruby/docs/reference/google-cloud-language-v1beta2/0.10.2/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.9.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.9.0/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.8.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.8.1/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.7.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.7.0/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.6.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.6.0/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.5.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.5.0/Google-Cloud-Language-V1beta2-TextSpan)\n- [0.4.5](/ruby/docs/reference/google-cloud-language-v1beta2/0.4.5/Google-Cloud-Language-V1beta2-TextSpan) \nReference documentation and code samples for the Natural Language V1beta2 API class Google::Cloud::Language::V1beta2::TextSpan.\n\nRepresents an output piece of text. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #begin_offset\n\n def begin_offset() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- The API calculates the beginning offset of the content in the original document according to the [EncodingType](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-EncodingType \"Google::Cloud::Language::V1beta2::EncodingType (module)\") specified in the API request.\n\n### #begin_offset=\n\n def begin_offset=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- The API calculates the beginning offset of the content in the original document according to the [EncodingType](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-EncodingType \"Google::Cloud::Language::V1beta2::EncodingType (module)\") specified in the API request. \n**Returns**\n\n- (::Integer) --- The API calculates the beginning offset of the content in the original document according to the [EncodingType](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-EncodingType \"Google::Cloud::Language::V1beta2::EncodingType (module)\") specified in the API request.\n\n### #content\n\n def content() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The content of the output text.\n\n### #content=\n\n def content=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The content of the output text. \n**Returns**\n\n- (::String) --- The content of the output text."]]