Package com.google.cloud.language.v1
Interface SentimentOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Sentiment
,Sentiment.Builder
public interface SentimentOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description float
getMagnitude()
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).float
getScore()
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getMagnitude
float getMagnitude()
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).
float magnitude = 2;
- Returns:
- The magnitude.
-
getScore
float getScore()
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
float score = 3;
- Returns:
- The score.
-
-