public enum SentimentClass extends java.lang.Enum<SentimentClass>
Enum Constant and Description |
---|
NEGATIVE |
NEUTRAL |
POSITIVE |
VERY_NEGATIVE |
VERY_POSITIVE |
Modifier and Type | Method and Description |
---|---|
static SentimentClass |
fromInt(int sentiment)
Get the sentiment class from the Stanford Sentiment Treebank
integer encoding.
|
boolean |
isExtreme() |
boolean |
isMild() |
boolean |
isNegative() |
boolean |
isNeutral() |
boolean |
isPositive() |
static SentimentClass |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SentimentClass[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SentimentClass VERY_POSITIVE
public static final SentimentClass POSITIVE
public static final SentimentClass NEUTRAL
public static final SentimentClass NEGATIVE
public static final SentimentClass VERY_NEGATIVE
public static SentimentClass[] values()
for (SentimentClass c : SentimentClass.values()) System.out.println(c);
public static SentimentClass valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isPositive()
public boolean isNegative()
public boolean isExtreme()
public boolean isMild()
public boolean isNeutral()
public static SentimentClass fromInt(int sentiment)
sentiment
- The Integer representation of a sentiment.