Reference documentation and code samples for the Cloud Natural Language V2 API class Google::Cloud::Language::V2::AnalyzeSentimentResponse.
The sentiment analysis response message.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#document_sentiment
def document_sentiment() -> ::Google::Cloud::Language::V2::Sentiment
Returns
- (::Google::Cloud::Language::V2::Sentiment) — The overall sentiment of the input document.
#document_sentiment=
def document_sentiment=(value) -> ::Google::Cloud::Language::V2::Sentiment
Parameter
- value (::Google::Cloud::Language::V2::Sentiment) — The overall sentiment of the input document.
Returns
- (::Google::Cloud::Language::V2::Sentiment) — The overall sentiment of the input document.
#language_code
def language_code() -> ::String
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.
#language_code=
def language_code=(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.
#language_supported
def language_supported() -> ::Boolean
Returns
- (::Boolean) — Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.
#language_supported=
def language_supported=(value) -> ::Boolean
Parameter
- value (::Boolean) — Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.
Returns
- (::Boolean) — Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.
#sentences
def sentences() -> ::Array<::Google::Cloud::Language::V2::Sentence>
Returns
- (::Array<::Google::Cloud::Language::V2::Sentence>) — The sentiment for all the sentences in the document.
#sentences=
def sentences=(value) -> ::Array<::Google::Cloud::Language::V2::Sentence>
Parameter
- value (::Array<::Google::Cloud::Language::V2::Sentence>) — The sentiment for all the sentences in the document.
Returns
- (::Array<::Google::Cloud::Language::V2::Sentence>) — The sentiment for all the sentences in the document.