Reference documentation and code samples for the Cloud Natural Language V2 API class Google::Cloud::Language::V2::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::V2::Sentiment
    Returns
    
  - (::Google::Cloud::Language::V2::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::V2::Sentiment
    Parameter
    
  - value (::Google::Cloud::Language::V2::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::V2::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::V2::TextSpan
    Returns
    
  - (::Google::Cloud::Language::V2::TextSpan) — The sentence text.
#text=
def text=(value) -> ::Google::Cloud::Language::V2::TextSpan
    Parameter
    
  - value (::Google::Cloud::Language::V2::TextSpan) — The sentence text.
    Returns
    
- (::Google::Cloud::Language::V2::TextSpan) — The sentence text.