(::String) — The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language
field for more details.
#language=
deflanguage=(value)->::String
Parameter
value (::String) — The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language
field for more details.
Returns
(::String) — The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language
field for more details.
[[["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::AnalyzeSentimentResponse (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-AnalyzeSentimentResponse)\n- [0.13.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.13.1/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.12.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.12.0/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.11.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.11.1/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.10.2](/ruby/docs/reference/google-cloud-language-v1beta2/0.10.2/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.9.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.9.0/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.8.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.8.1/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.7.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.7.0/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.6.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.6.0/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.5.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.5.0/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse)\n- [0.4.5](/ruby/docs/reference/google-cloud-language-v1beta2/0.4.5/Google-Cloud-Language-V1beta2-AnalyzeSentimentResponse) \nReference documentation and code samples for the Natural Language V1beta2 API class Google::Cloud::Language::V1beta2::AnalyzeSentimentResponse.\n\nThe sentiment analysis response message. \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### #document_sentiment\n\n def document_sentiment() -\u003e ::Google::Cloud::Language::V1beta2::Sentiment\n\n**Returns**\n\n- ([::Google::Cloud::Language::V1beta2::Sentiment](./Google-Cloud-Language-V1beta2-Sentiment)) --- The overall sentiment of the input document.\n\n### #document_sentiment=\n\n def document_sentiment=(value) -\u003e ::Google::Cloud::Language::V1beta2::Sentiment\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Language::V1beta2::Sentiment](./Google-Cloud-Language-V1beta2-Sentiment)) --- The overall sentiment of the input document. \n**Returns**\n\n- ([::Google::Cloud::Language::V1beta2::Sentiment](./Google-Cloud-Language-V1beta2-Sentiment)) --- The overall sentiment of the input document.\n\n### #language\n\n def language() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-Document#Google__Cloud__Language__V1beta2__Document_language_instance_ \"Google::Cloud::Language::V1beta2::Document#language (method)\") field for more details.\n\n### #language=\n\n def language=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-Document#Google__Cloud__Language__V1beta2__Document_language_instance_ \"Google::Cloud::Language::V1beta2::Document#language (method)\") field for more details. \n**Returns**\n\n- (::String) --- The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-Document#Google__Cloud__Language__V1beta2__Document_language_instance_ \"Google::Cloud::Language::V1beta2::Document#language (method)\") field for more details.\n\n### #sentences\n\n def sentences() -\u003e ::Array\u003c::Google::Cloud::Language::V1beta2::Sentence\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Language::V1beta2::Sentence](./Google-Cloud-Language-V1beta2-Sentence)\\\u003e) --- The sentiment for all the sentences in the document.\n\n### #sentences=\n\n def sentences=(value) -\u003e ::Array\u003c::Google::Cloud::Language::V1beta2::Sentence\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Language::V1beta2::Sentence](./Google-Cloud-Language-V1beta2-Sentence)\\\u003e) --- The sentiment for all the sentences in the document. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Language::V1beta2::Sentence](./Google-Cloud-Language-V1beta2-Sentence)\\\u003e) --- The sentiment for all the sentences in the document."]]