Class TextSentimentProto.TextSentimentAnnotation.Builder

    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TextSentimentProto.TextSentimentAnnotation.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TextSentimentProto.TextSentimentAnnotation.Builder>
      • getDefaultInstanceForType

        public TextSentimentProto.TextSentimentAnnotation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public TextSentimentProto.TextSentimentAnnotation build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public TextSentimentProto.TextSentimentAnnotation buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TextSentimentProto.TextSentimentAnnotation.Builder>
      • getSentiment

        public int getSentiment()
         Output only. The sentiment with the semantic, as given to the
         [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
         for the prediction had been trained.
         The sentiment values are between 0 and
         Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
         with higher value meaning more positive sentiment. They are completely
         relative, i.e. 0 means least positive sentiment and sentiment_max means
         the most positive from the sentiments present in the train data. Therefore
          e.g. if train data had only negative sentiment, then sentiment_max, would
         be still negative (although least negative).
         The sentiment shouldn't be confused with "score" or "magnitude"
         from the previous Natural Language Sentiment Analysis API.
         
        int32 sentiment = 1;
        Specified by:
        getSentiment in interface TextSentimentProto.TextSentimentAnnotationOrBuilder
        Returns:
        The sentiment.
      • setSentiment

        public TextSentimentProto.TextSentimentAnnotation.Builder setSentiment​(int value)
         Output only. The sentiment with the semantic, as given to the
         [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
         for the prediction had been trained.
         The sentiment values are between 0 and
         Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
         with higher value meaning more positive sentiment. They are completely
         relative, i.e. 0 means least positive sentiment and sentiment_max means
         the most positive from the sentiments present in the train data. Therefore
          e.g. if train data had only negative sentiment, then sentiment_max, would
         be still negative (although least negative).
         The sentiment shouldn't be confused with "score" or "magnitude"
         from the previous Natural Language Sentiment Analysis API.
         
        int32 sentiment = 1;
        Parameters:
        value - The sentiment to set.
        Returns:
        This builder for chaining.
      • clearSentiment

        public TextSentimentProto.TextSentimentAnnotation.Builder clearSentiment()
         Output only. The sentiment with the semantic, as given to the
         [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
         for the prediction had been trained.
         The sentiment values are between 0 and
         Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
         with higher value meaning more positive sentiment. They are completely
         relative, i.e. 0 means least positive sentiment and sentiment_max means
         the most positive from the sentiments present in the train data. Therefore
          e.g. if train data had only negative sentiment, then sentiment_max, would
         be still negative (although least negative).
         The sentiment shouldn't be confused with "score" or "magnitude"
         from the previous Natural Language Sentiment Analysis API.
         
        int32 sentiment = 1;
        Returns:
        This builder for chaining.