Joshua
open source statistical hierarchical phrase-based machine translation system
|
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 |
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.
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.
double [] joshua.metrics.EvaluationMetric.docScores | ( | int | stats[][] | ) |
static EvaluationMetric joshua.metrics.EvaluationMetric.getMetric | ( | String | metricName, |
String[] | metricOptions | ||
) | [static] |
boolean joshua.metrics.EvaluationMetric.getToBeMinimized | ( | ) |
abstract void joshua.metrics.EvaluationMetric.initialize | ( | ) | [protected, pure virtual] |
boolean joshua.metrics.EvaluationMetric.isBetter | ( | double | x, |
double | y | ||
) |
static boolean joshua.metrics.EvaluationMetric.knownMetricName | ( | String | name | ) | [static] |
static int joshua.metrics.EvaluationMetric.metricOptionCount | ( | String | name | ) | [static] |
void joshua.metrics.EvaluationMetric.printDetailedScore | ( | String[] | topCand_str, |
boolean | oneLiner | ||
) |
void joshua.metrics.EvaluationMetric.printDetailedScore_fromStats | ( | int | stats[][], |
String[] | docNames | ||
) |
abstract void joshua.metrics.EvaluationMetric.printDetailedScore_fromStats | ( | int[] | stats, |
boolean | oneLiner | ||
) | [pure virtual] |
double joshua.metrics.EvaluationMetric.score | ( | String | cand_str, |
int | i | ||
) |
double joshua.metrics.EvaluationMetric.score | ( | String[] | topCand_str | ) |
double joshua.metrics.EvaluationMetric.score | ( | int | stats[][] | ) |
double joshua.metrics.EvaluationMetric.score | ( | int | stats[][], |
int | firstRank, | ||
int | lastRank | ||
) |
abstract double joshua.metrics.EvaluationMetric.score | ( | int[] | stats | ) | [pure virtual] |
static void joshua.metrics.EvaluationMetric.set_knownMetrics | ( | ) | [static] |
static void joshua.metrics.EvaluationMetric.set_numDocuments | ( | int | x | ) | [static] |
static void joshua.metrics.EvaluationMetric.set_numSentences | ( | int | x | ) | [static] |
static void joshua.metrics.EvaluationMetric.set_refSentences | ( | String | refs[][] | ) | [static] |
static void joshua.metrics.EvaluationMetric.set_refsPerSen | ( | int | x | ) | [static] |
static void joshua.metrics.EvaluationMetric.set_tmpDirPrefix | ( | String | S | ) | [static] |
int [] joshua.metrics.EvaluationMetric.suffStats | ( | String[] | topCand_str | ) |
int [][] joshua.metrics.EvaluationMetric.suffStats | ( | String[] | cand_strings, |
int[] | cand_indices | ||
) |
Calculates sufficient statistics on each sentence in the corpus, returning them as arrays.
cand_strings | |
cand_indices |
Reimplemented in joshua.metrics.TER, joshua.metrics.METEOR, joshua.metrics.TERMinusBLEU, and joshua.metrics.PrecisMinusSourceBLEU.
abstract int [] joshua.metrics.EvaluationMetric.suffStats | ( | String | cand_str, |
int | i | ||
) | [pure virtual] |
Implemented in joshua.metrics.Precis, joshua.metrics.BLEU, joshua.metrics.TER, joshua.metrics.MinimumChangeBLEU, joshua.metrics.METEOR, joshua.metrics.GradeLevelBLEU, joshua.metrics.SourceBLEU, joshua.metrics.TERMinusBLEU, joshua.metrics.PrecisMinusSourceBLEU, joshua.metrics.ZeroOneLoss, and joshua.metrics.BLEU_SBP.
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.
final DecimalFormat joshua.metrics.EvaluationMetric.f0 = new DecimalFormat("###0") [static, protected] |
final DecimalFormat joshua.metrics.EvaluationMetric.f4 = new DecimalFormat("###0.0000") [static, protected] |
String joshua.metrics.EvaluationMetric.metricName [protected] |
TreeMap<String, Integer> joshua.metrics.EvaluationMetric.metricOptionCount [static, private] |
int joshua.metrics.EvaluationMetric.numDocuments [static, protected] |
int joshua.metrics.EvaluationMetric.numSentences [static, protected] |
String [][] joshua.metrics.EvaluationMetric.refSentences [static, protected] |
int joshua.metrics.EvaluationMetric.refsPerSen [static, protected] |
int joshua.metrics.EvaluationMetric.suffStatsCount [protected] |
String joshua.metrics.EvaluationMetric.tmpDirPrefix [static, protected] |
boolean joshua.metrics.EvaluationMetric.toBeMinimized [protected] |