Package com.yahoo.fsa.topicpredictor
Class PredictedTopic
- java.lang.Object
-
- com.yahoo.fsa.topicpredictor.PredictedTopic
-
public class PredictedTopic extends Object
Class encapsulation of a predicted topic. A topic has a weight and a term vector string of topicSegments.- Author:
- gjoranv
-
-
Constructor Summary
Constructors Constructor Description PredictedTopic(String topic, double weight)
PredictedTopic(String topic, double weight, String vector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWeight(double weight)
Adds to the weightint
compareDescendWeight(Object o)
Compares this topic to another topic, according to weight descendingString
getTopic()
Returns the topicString
getVector()
Returns the vectordouble
getWeight()
Returns the weightvoid
setVector(String vector)
Sets the vectorvoid
setWeight(double weight)
Sets the weight
-
-
-
Method Detail
-
getTopic
public String getTopic()
Returns the topic
-
getWeight
public double getWeight()
Returns the weight
-
getVector
public String getVector()
Returns the vector
-
setWeight
public void setWeight(double weight)
Sets the weight
-
addWeight
public void addWeight(double weight)
Adds to the weight
-
setVector
public void setVector(String vector)
Sets the vector
-
compareDescendWeight
public int compareDescendWeight(Object o)
Compares this topic to another topic, according to weight descending
-
-