Reference documentation and code samples for the Natural Language V1 API class Google::Cloud::Language::V1::Sentence.
Represents a sentence in the input document.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#sentiment
def sentiment() -> ::Google::Cloud::Language::V1::Sentiment
Returns
- (::Google::Cloud::Language::V1::Sentiment) — For calls to [AnalyzeSentiment][] or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence.
#sentiment=
def sentiment=(value) -> ::Google::Cloud::Language::V1::Sentiment
Parameter
- value (::Google::Cloud::Language::V1::Sentiment) — For calls to [AnalyzeSentiment][] or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence.
Returns
- (::Google::Cloud::Language::V1::Sentiment) — For calls to [AnalyzeSentiment][] or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence.
#text
def text() -> ::Google::Cloud::Language::V1::TextSpan
Returns
- (::Google::Cloud::Language::V1::TextSpan) — The sentence text.
#text=
def text=(value) -> ::Google::Cloud::Language::V1::TextSpan
Parameter
- value (::Google::Cloud::Language::V1::TextSpan) — The sentence text.
Returns
- (::Google::Cloud::Language::V1::TextSpan) — The sentence text.