public class DiscreteCountBipolarSentiment extends Object implements Sentiment, BipolarSentimentProvider, WeightedBipolarSentimentProvider, ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>, ObjectArithmetic<DiscreteCountBipolarSentiment>
| Modifier and Type | Field and Description |
|---|---|
static DiscreteCountBipolarSentiment |
NEGATIVE
a single negative count
|
static DiscreteCountBipolarSentiment |
NEUTRAL
a single neutral count
|
static DiscreteCountBipolarSentiment |
POSITIVE
A single positive count
|
| Constructor and Description |
|---|
DiscreteCountBipolarSentiment()
all weights set to 0
|
DiscreteCountBipolarSentiment(int positive,
int negative,
int neutral) |
DiscreteCountBipolarSentiment(int positive,
int negative,
int neutral,
int total) |
public static final DiscreteCountBipolarSentiment POSITIVE
public static final DiscreteCountBipolarSentiment NEGATIVE
public static final DiscreteCountBipolarSentiment NEUTRAL
public DiscreteCountBipolarSentiment()
public DiscreteCountBipolarSentiment(int positive, int negative, int neutral, int total) throws InvalidSentimentException
positive - the positivenegative - the negativeneutral - the neutraltotal - the total number of termsInvalidSentimentExceptionpublic DiscreteCountBipolarSentiment(int positive, int negative, int neutral)
positive - the positivenegative - the negativeneutral - the neutralpublic int positive()
public int negative()
public int neutral()
public BipolarSentiment bipolar()
bipolar in interface BipolarSentimentProviderpublic BipolarSentiment bipolar(double deltaThresh)
bipolar in interface BipolarSentimentProviderdeltaThresh - A a proportional thresholdpublic void fromMap(Map<String,?> map) throws UnrecognisedMapException
fromMap in interface Sentimentmap - the map containing this sentimentUnrecognisedMapExceptionpublic WeightedBipolarSentiment weightedBipolar()
weightedBipolar in interface WeightedBipolarSentimentProviderprotected DiscreteCountBipolarSentiment clone()
public DiscreteCountBipolarSentiment addInplace(DiscreteCountBipolarSentiment s)
ObjectArithmeticaddInplace in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - add s to thispublic DiscreteCountBipolarSentiment multiplyInplace(DiscreteCountBipolarSentiment s)
ObjectArithmeticmultiplyInplace in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - times this by spublic DiscreteCountBipolarSentiment divideInplace(DiscreteCountBipolarSentiment s)
ObjectArithmeticdivideInplace in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - divide this by spublic DiscreteCountBipolarSentiment add(DiscreteCountBipolarSentiment s)
ObjectArithmeticadd in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - add s to a copy of thispublic DiscreteCountBipolarSentiment subtract(DiscreteCountBipolarSentiment s)
ObjectArithmeticsubtract in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - minus a copy of this by spublic DiscreteCountBipolarSentiment subtractInplace(DiscreteCountBipolarSentiment s)
ObjectArithmeticsubtractInplace in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - minus this by spublic DiscreteCountBipolarSentiment multiply(DiscreteCountBipolarSentiment s)
ObjectArithmeticmultiply in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - times a copy of this by spublic DiscreteCountBipolarSentiment divide(DiscreteCountBipolarSentiment s)
ObjectArithmeticdivide in interface ObjectArithmetic<DiscreteCountBipolarSentiment>s - divide a copy of this by spublic DiscreteCountBipolarSentiment addInplace(Integer s)
ScalarArithmeticaddInplace in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - add s to thispublic DiscreteCountBipolarSentiment multiplyInplace(Integer s)
ScalarArithmeticmultiplyInplace in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - times this by spublic DiscreteCountBipolarSentiment divideInplace(Integer s)
ScalarArithmeticdivideInplace in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - divide this by spublic DiscreteCountBipolarSentiment add(Integer s)
ScalarArithmeticadd in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - add s to a copy of thispublic DiscreteCountBipolarSentiment subtract(Integer s)
ScalarArithmeticsubtract in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - minus a copy of this by spublic DiscreteCountBipolarSentiment subtractInplace(Integer s)
ScalarArithmeticsubtractInplace in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - minus this by spublic DiscreteCountBipolarSentiment multiply(Integer s)
ScalarArithmeticmultiply in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - times a copy of this by spublic DiscreteCountBipolarSentiment divide(Integer s)
ScalarArithmeticdivide in interface ScalarArithmetic<DiscreteCountBipolarSentiment,Integer>s - divide a copy of this by s