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

List of all members.

Public Member Functions

 GradeLevelBLEU ()
 GradeLevelBLEU (String[] options)
void loadSources (String filepath) throws IOException
void initialize ()
int[] suffStats (String cand_str, int i)
int countTotalSyllables (String[] ss)
int countSyllables (String s)
double score (int[] stats)
double gradeLevel (int numWords, int numSyllables, int numSentences)
void printDetailedScore_fromStats (int[] stats, boolean oneLiner)

Package Attributes

int sentCountIndex

Static Package Attributes

static final int CANDIDATE = 1
static final int REFERENCE = 2

Private Member Functions

int tokenLength (int whichSentence)
int syllableLength (int whichSentence)
double BLEU_plus (double bleu_ref, double bleu_src)
double getReadabilityPenalty (double this_gl, double target_gl)

Private Attributes

int srcIndex = 1
SourceBLEU srcBLEU
double targetGL = 9.87
double alpha = 0.9
boolean useTarget = true
boolean useBLEUplus = true

Static Private Attributes

static final Logger logger = Logger.getLogger(GradeLevelBLEU.class.getName())
static final Pattern syllable = Pattern.compile("([^aeiouy]*[aeiouy]+)")
static final Pattern silentE = Pattern.compile("[^aeiou]e$")
static final int SOURCE = 0

Constructor & Destructor Documentation

Here is the call graph for this function:


Member Function Documentation

double joshua.metrics.GradeLevelBLEU.BLEU_plus ( double  bleu_ref,
double  bleu_src 
) [private]

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

double joshua.metrics.GradeLevelBLEU.getReadabilityPenalty ( double  this_gl,
double  target_gl 
) [private]

Here is the caller graph for this function:

double joshua.metrics.GradeLevelBLEU.gradeLevel ( int  numWords,
int  numSyllables,
int  numSentences 
)

Here is the caller graph for this function:

Reimplemented from joshua.metrics.BLEU.

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.metrics.GradeLevelBLEU.loadSources ( String  filepath) throws IOException

Here is the caller graph for this function:

void joshua.metrics.GradeLevelBLEU.printDetailedScore_fromStats ( int[]  stats,
boolean  oneLiner 
) [virtual]

Reimplemented from joshua.metrics.BLEU.

Here is the call graph for this function:

double joshua.metrics.GradeLevelBLEU.score ( int[]  stats) [virtual]

Reimplemented from joshua.metrics.BLEU.

Here is the call graph for this function:

Here is the caller graph for this function:

int [] joshua.metrics.GradeLevelBLEU.suffStats ( String  cand_str,
int  i 
) [virtual]

Reimplemented from joshua.metrics.BLEU.

Here is the call graph for this function:

int joshua.metrics.GradeLevelBLEU.syllableLength ( int  whichSentence) [private]

Here is the caller graph for this function:

int joshua.metrics.GradeLevelBLEU.tokenLength ( int  whichSentence) [private]

Here is the caller graph for this function:


Member Data Documentation

double joshua.metrics.GradeLevelBLEU.alpha = 0.9 [private]
final int joshua.metrics.GradeLevelBLEU.CANDIDATE = 1 [static, package]
final Logger joshua.metrics.GradeLevelBLEU.logger = Logger.getLogger(GradeLevelBLEU.class.getName()) [static, private]

Reimplemented from joshua.metrics.BLEU.

final int joshua.metrics.GradeLevelBLEU.REFERENCE = 2 [static, package]
final Pattern joshua.metrics.GradeLevelBLEU.silentE = Pattern.compile("[^aeiou]e$") [static, private]
final int joshua.metrics.GradeLevelBLEU.SOURCE = 0 [static, private]
final Pattern joshua.metrics.GradeLevelBLEU.syllable = Pattern.compile("([^aeiouy]*[aeiouy]+)") [static, private]
double joshua.metrics.GradeLevelBLEU.targetGL = 9.87 [private]
boolean joshua.metrics.GradeLevelBLEU.useTarget = true [private]