public final class FMeasure extends Object
Token value and the index in
the list of Tokens.
This class is largely the same as the FMeasure class in Apache OpenNLP
project with some very minor modifications.| Constructor and Description |
|---|
FMeasure() |
| Modifier and Type | Method and Description |
|---|---|
double |
getFMeasure()
Retrieves the f-measure score.
|
double |
getPrecisionScore()
Retrieves the arithmetic mean of the precision scores calculated for each
evaluated sample.
|
double |
getRecallScore()
Retrieves the arithmetic mean of the recall score calculated for each
evaluated sample.
|
void |
mergeInto(FMeasure measure) |
static double |
precision(List<List<String>> references,
List<List<String>> predictions)
Calculates the precision score for the given reference and predicted spans.
|
static double |
recall(List<List<String>> references,
List<List<String>> predictions)
Calculates the recall score for the given reference and predicted spans.
|
String |
toString()
Creates a human read-able
String representation. |
void |
updateScores(List<List<String>> references,
List<List<String>> predictions) |
public double getPrecisionScore()
public double getRecallScore()
public double getFMeasure()
public void updateScores(List<List<String>> references, List<List<String>> predictions)
public void mergeInto(FMeasure measure)
public static double precision(List<List<String>> references, List<List<String>> predictions)
references - the gold standard spanspredictions - the predicted spanspublic static double recall(List<List<String>> references, List<List<String>> predictions)
references - the gold standard spanspredictions - the predicted spansCopyright © 2015 IXA pipes. All rights reserved.