de.aitools.dm.clusterlabeling.validation.internal
Class RatedPhrase
java.lang.Object
de.aitools.dm.clusterlabeling.validation.internal.RatedPhrase
public class RatedPhrase
- extends java.lang.Object
String-Representation (toString()
):
["label" : rating]
rating = 2^relevance - 1
- Version:
- $Id: RatedPhrase.java,v 1.1 2011/02/18 16:08:24 hoppe Exp $
- Author:
- johannes.kiesel(/\t)uni-weimar.de
Constructor Summary |
RatedPhrase(java.lang.String label,
double relevance)
A RatedPhrase consist of two values:
Label
The phrase itself
Rating
A value for how good the label is: The higher the better.
Calculated as 2^relevance - 1
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BAD
public static final double BAD
- See Also:
- Constant Field Values
FAIR
public static final double FAIR
- See Also:
- Constant Field Values
GOOD
public static final double GOOD
- See Also:
- Constant Field Values
EXCELLENT
public static final double EXCELLENT
- See Also:
- Constant Field Values
PERFECT
public static final double PERFECT
- See Also:
- Constant Field Values
RatedPhrase
public RatedPhrase(java.lang.String label,
double relevance)
- A RatedPhrase consist of two values:
-
Label
The phrase itself
-
Rating
A value for how good the label is: The higher the better.
Calculated as 2^relevance - 1
- Parameters:
label
- relevance
- direct input or use one of the static aliases of this
class (for example RatedPhrase.GOOD)
setLabel
public void setLabel(java.lang.String label)
setRating
public void setRating(int rating)
setRelevance
public void setRelevance(double relevance)
- Same as setRating(X) with X being 2^relevance - 1
- Parameters:
relevance
-
getLabel
public java.lang.String getLabel()
getRating
public double getRating()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
copy
public RatedPhrase copy()
sort
public static RatedPhrase[] sort(RatedPhrase[] input,
javax.swing.SortOrder order)
- Parameters:
input
- will not be changed - a copy is created before sorting
- Returns: