|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.eval.EvalStatus
public final class EvalStatus
Type-safe enumeration of possible evaluation states for predictions (unknown, correct, spurious etc.) and answer keys (missing etc.).
Field Summary | |
---|---|
static EvalStatus |
ALTERNATIVE
Constant for answer keys that could have been proposed as predictions but were not. |
static EvalStatus |
CORRECT
Constant for correct predictions (true positives) resp for answer keys matched by a prediction. |
static EvalStatus |
IGNORED
Constant for predictions that were ignored. |
static String |
KEY_EVAL_STATUS
Serialization key recommended for instances of this class. |
static EvalStatus |
MISSING
Constant for missing answer keys (false negatives). |
static EvalStatus |
SPURIOUS
Constant for spurious predictions (false positives). |
static EvalStatus |
TRUTH
Constant for items defined to be true (answer keys, "gold standard"). |
static EvalStatus |
UNKNOWN
Constant for predictions whose evaluation status is unknown (not yet evaluated). |
Method Summary | |
---|---|
static Collection<EvalStatus> |
allInstances()
Returns all instances of this class, in random order. |
static Set<String> |
allInstanceStrings()
Returns the string representations for all instances of this class, in random order. |
String |
getName()
Returns the name of this instance. |
boolean |
isAnswerState()
Whether this state is suitable for an answer key. |
boolean |
isPredictionState()
Whether this state is suitable for a prediction. |
static EvalStatus |
parse(String representation)
Parses a textual representation into an eval status, without using a default object. |
static EvalStatus |
parse(String representation,
boolean useDefault)
Parses a textual representation into an eval status. |
String |
toString()
Returns a string representation, printing the name of this instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String KEY_EVAL_STATUS
public static final EvalStatus UNKNOWN
public static final EvalStatus TRUTH
public static final EvalStatus CORRECT
answer keys
and
predictions
.
public static final EvalStatus MISSING
public static final EvalStatus SPURIOUS
public static final EvalStatus ALTERNATIVE
CORRECT
resp. MISSING
; the others should be tagged
as ALTERNATIVE
s.
public static final EvalStatus IGNORED
Method Detail |
---|
public static Collection<EvalStatus> allInstances()
public static Set<String> allInstanceStrings()
public static EvalStatus parse(String representation) throws IllegalArgumentException
getName()
and toString()
back into the corresponding instance.
representation
- the textual representation to parse
IllegalArgumentException
- if a given string does not represent a
known evaluation statuspublic static EvalStatus parse(String representation, boolean useDefault) throws IllegalArgumentException
getName()
and toString()
back
into the corresponding instance.
representation
- the textual representation to parseuseDefault
- if true
, UNKNOWN
is returned if
the representation is an unparsable (invalid) or null
;
otherwise an exception is thrown in this case
IllegalArgumentException
- if a given string does not represent a
known evaluation status and useDefault
is false
public String getName()
public String toString()
toString
in class Object
public boolean isAnswerState()
true
iff this state is suitable for an answer keypublic boolean isPredictionState()
true
iff this state is suitable for a prediction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |