Package opennlp.tools.sentiment
Class SentimentSample
java.lang.Object
opennlp.tools.sentiment.SentimentSample
- All Implemented Interfaces:
Serializable,Sample
Class for holding text used for sentiment analysis.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final Stringprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionSentimentSample(String sentiment, String[] sentence) Instantiates aSentimentSampleobject.SentimentSample(String sentiment, String[] sentence, boolean clearAdaptiveData) -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
sentiment
-
sentence
-
isClearAdaptiveData
private final boolean isClearAdaptiveData
-
-
Constructor Details
-
SentimentSample
Instantiates aSentimentSampleobject.- Parameters:
sentiment- training sentimentsentence- training sentence
-
SentimentSample
-
-
Method Details
-
getSentiment
- Returns:
- Returns the sentiment.
-
getSentence
- Returns:
- Returns the sentence.
-
isClearAdaptiveDataSet
public boolean isClearAdaptiveDataSet()- Returns:
- Returns the value of isClearAdaptiveData,
trueorfalse.
-
toString
-
equals
-
hashCode
public int hashCode()
-