Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.metrics.EvaluationMetric Class Reference
Inheritance diagram for joshua.metrics.EvaluationMetric:
[legend]
Collaboration diagram for joshua.metrics.EvaluationMetric:
[legend]

List of all members.

Public Member Functions

int get_suffStatsCount ()
String get_metricName ()
boolean getToBeMinimized ()
boolean isBetter (double x, double y)
double score (String cand_str, int i)
double score (String[] topCand_str)
int[] suffStats (String[] topCand_str)
int[][] suffStats (String[] cand_strings, int[] cand_indices)
void createSuffStatsFile (String cand_strings_fileName, String cand_indices_fileName, String outputFileName, int maxBatchSize)
void printDetailedScore (String[] topCand_str, boolean oneLiner)
double score (int[][] stats)
double score (int[][] stats, int firstRank, int lastRank)
double[] docScores (int[][] stats)
void printDetailedScore_fromStats (int[][] stats, String[] docNames)
abstract double bestPossibleScore ()
abstract double worstPossibleScore ()
abstract int[] suffStats (String cand_str, int i)
abstract double score (int[] stats)
abstract void printDetailedScore_fromStats (int[] stats, boolean oneLiner)

Static Public Member Functions

static void set_knownMetrics ()
static EvaluationMetric getMetric (String metricName, String[] metricOptions)
static void set_numSentences (int x)
static void set_numDocuments (int x)
static void set_refsPerSen (int x)
static void set_tmpDirPrefix (String S)
static void set_refSentences (String[][] refs)
static boolean knownMetricName (String name)
static int metricOptionCount (String name)

Protected Member Functions

abstract void initialize ()

Protected Attributes

int suffStatsCount
String metricName
boolean toBeMinimized

Static Protected Attributes

static int numSentences
static int numDocuments
static int refsPerSen
static String[][] refSentences
static final DecimalFormat f0 = new DecimalFormat("###0")
static final DecimalFormat f4 = new DecimalFormat("###0.0000")
static String tmpDirPrefix

Static Private Attributes

static TreeMap< String, Integer > metricOptionCount

Member Function Documentation

abstract double joshua.metrics.EvaluationMetric.bestPossibleScore ( ) [pure virtual]

Implemented in joshua.metrics.TER, joshua.metrics.METEOR, joshua.metrics.BLEU, joshua.metrics.SourceBLEU, joshua.metrics.TERMinusBLEU, joshua.metrics.PrecisMinusSourceBLEU, and joshua.metrics.ZeroOneLoss.

Here is the caller graph for this function:

void joshua.metrics.EvaluationMetric.createSuffStatsFile ( String  cand_strings_fileName,
String  cand_indices_fileName,
String  outputFileName,
int  maxBatchSize 
)

Reimplemented in joshua.metrics.TER, joshua.metrics.TERMinusBLEU, and joshua.metrics.PrecisMinusSourceBLEU.

Here is the call graph for this function:

Here is the caller graph for this function:

double [] joshua.metrics.EvaluationMetric.docScores ( int  stats[][])

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

static EvaluationMetric joshua.metrics.EvaluationMetric.getMetric ( String  metricName,
String[]  metricOptions 
) [static]

Here is the caller graph for this function:

Here is the caller graph for this function:

boolean joshua.metrics.EvaluationMetric.isBetter ( double  x,
double  y 
)

Here is the caller graph for this function:

static boolean joshua.metrics.EvaluationMetric.knownMetricName ( String  name) [static]

Here is the caller graph for this function:

static int joshua.metrics.EvaluationMetric.metricOptionCount ( String  name) [static]
void joshua.metrics.EvaluationMetric.printDetailedScore ( String[]  topCand_str,
boolean  oneLiner 
)

Here is the call graph for this function:

void joshua.metrics.EvaluationMetric.printDetailedScore_fromStats ( int  stats[][],
String[]  docNames 
)

Here is the caller graph for this function:

double joshua.metrics.EvaluationMetric.score ( String  cand_str,
int  i 
)

Here is the call graph for this function:

Here is the caller graph for this function:

double joshua.metrics.EvaluationMetric.score ( String[]  topCand_str)

Here is the call graph for this function:

double joshua.metrics.EvaluationMetric.score ( int  stats[][])

Here is the call graph for this function:

double joshua.metrics.EvaluationMetric.score ( int  stats[][],
int  firstRank,
int  lastRank 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static void joshua.metrics.EvaluationMetric.set_numDocuments ( int  x) [static]

Here is the caller graph for this function:

static void joshua.metrics.EvaluationMetric.set_numSentences ( int  x) [static]

Here is the caller graph for this function:

static void joshua.metrics.EvaluationMetric.set_refSentences ( String  refs[][]) [static]

Here is the caller graph for this function:

static void joshua.metrics.EvaluationMetric.set_refsPerSen ( int  x) [static]

Here is the caller graph for this function:

static void joshua.metrics.EvaluationMetric.set_tmpDirPrefix ( String  S) [static]

Here is the caller graph for this function:

int [] joshua.metrics.EvaluationMetric.suffStats ( String[]  topCand_str)

Here is the caller graph for this function:

int [][] joshua.metrics.EvaluationMetric.suffStats ( String[]  cand_strings,
int[]  cand_indices 
)

Calculates sufficient statistics on each sentence in the corpus, returning them as arrays.

Parameters:
cand_strings
cand_indices
Returns:

Reimplemented in joshua.metrics.TER, joshua.metrics.METEOR, joshua.metrics.TERMinusBLEU, and joshua.metrics.PrecisMinusSourceBLEU.

Here is the call graph for this function:

abstract double joshua.metrics.EvaluationMetric.worstPossibleScore ( ) [pure virtual]

Implemented in joshua.metrics.TER, joshua.metrics.METEOR, joshua.metrics.BLEU, joshua.metrics.SourceBLEU, joshua.metrics.TERMinusBLEU, joshua.metrics.PrecisMinusSourceBLEU, and joshua.metrics.ZeroOneLoss.

Here is the caller graph for this function:


Member Data Documentation

final DecimalFormat joshua.metrics.EvaluationMetric.f0 = new DecimalFormat("###0") [static, protected]
final DecimalFormat joshua.metrics.EvaluationMetric.f4 = new DecimalFormat("###0.0000") [static, protected]
TreeMap<String, Integer> joshua.metrics.EvaluationMetric.metricOptionCount [static, private]
String [][] joshua.metrics.EvaluationMetric.refSentences [static, protected]