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

List of all members.

Public Member Functions

 MertCore ()
 MertCore (String[] args)
 MertCore (String configFileName)
void run_MERT ()
void run_MERT (int minIts, int maxIts, int prevIts)
double[] run_single_iteration (int iteration, int minIts, int maxIts, int prevIts, int earlyStop, int[] maxIndex)
void finish ()

Static Public Member Functions

static void main (String[] args)

Package Attributes

int minMERTIterations
int prevMERTIterations
String docInfoFileName
String finalLambdaFileName
String refFileName
String decoderOutFileName
String decoderCommandFileName
String fakeFileNamePrefix
String fakeFileNameSuffix

Private Member Functions

void initialize (int randsToSkip)
String lambdaToString (double[] lambdaA)
String[] run_decoder (int iteration)
void produceTempFiles (String nbestFileName, int iteration)
void createConfigFile (double[] params, String cfgFileName, String templateFileName)
void processParamFile ()
void processDocInfo ()
boolean copyFile (String origFileName, String newFileName)
void renameFile (String origFileName, String newFileName)
void deleteFile (String fileName)
void writeLine (String line, BufferedWriter writer) throws IOException
String[] cfgFileToArgsArray (String fileName)
void processArgsArray (String[] args)
void processArgsArray (String[] args, boolean firstTime)
void set_docSubsetInfo (int[] info)
void checkFile (String fileName)
boolean fileExists (String fileName)
void gzipFile (String inputFileName)
void gzipFile (String inputFileName, String gzippedFileName)
void gunzipFile (String gzippedFileName)
void gunzipFile (String gzippedFileName, String outputFileName)
String createUnifiedRefFile (String prefix, int numFiles)
String normalize (String str, int normMethod)
int countLines (String fileName)
int countNonEmptyLines (String fileName)
String fullPath (String dir, String fileName)
void cleanupMemory ()
void cleanupMemorySilently ()
void cleanupMemory (int reps, boolean silent)
void printMemoryUsage ()
void println (Object obj, int priority)
void print (Object obj, int priority)
void println (Object obj)
void print (Object obj)
void showProgress ()
double[] randomLambda ()
double[] randomPerturbation (double[] origLambda, int i, double method, double param, double mult)
int c_fromParamName (String pName)
void setFeats (double[][][] featVal_array, int i, int[] lastUsedIndex, int[] maxIndex, double[] featVal)
HashSet< Integer > indicesToDiscard (double[] slope, double[] offset)

Private Attributes

TreeSet< Integer >[] indicesOfInterest_all
final Runtime myRuntime = Runtime.getRuntime()
int progress
int verbosity
Random randGen
int generatedRands
int numSentences
int numDocuments
int[] docOfSentence
int[] docSubsetInfo
int refsPerSen
int textNormMethod
int numParams
double[] normalizationOptions
String[] paramNames
double[] lambda
boolean[] isOptimizable
double[] minThValue
double[] maxThValue
double[] minRandValue
double[] maxRandValue
int damianos_method
double damianos_param
double damianos_mult
double[] defaultLambda
JoshuaDecoder myDecoder
String decoderCommand
int decVerbosity
int validDecoderExitValue
int numOptThreads
int saveInterFiles
int compressFiles
int sizeOfNBest
long seed
boolean randInit
int initsPerIt
int maxMERTIterations
double stopSigValue
int stopMinIts
boolean oneModificationPerIteration
String metricName
String metricName_display
String[] metricOptions
EvaluationMetric evalMetric
int suffStatsCount
String tmpDirPrefix
boolean passIterationToDecoder
String dirPrefix
String paramsFileName
String sourceFileName
String decoderConfigFileName
String fakeFileNameTemplate

Static Private Attributes

static final DecimalFormat f4 = new DecimalFormat("###0.0000")
static final double NegInf = (-1.0 / 0.0)
static final double PosInf = (+1.0 / 0.0)
static final double epsilon = 1.0 / 1000000

Constructor & Destructor Documentation

Here is the caller graph for this function:

joshua.zmert.MertCore.MertCore ( String[]  args)

Here is the call graph for this function:

joshua.zmert.MertCore.MertCore ( String  configFileName)

Here is the call graph for this function:


Member Function Documentation

int joshua.zmert.MertCore.c_fromParamName ( String  pName) [private]

Here is the caller graph for this function:

String [] joshua.zmert.MertCore.cfgFileToArgsArray ( String  fileName) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.zmert.MertCore.checkFile ( String  fileName) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

void joshua.zmert.MertCore.cleanupMemory ( int  reps,
boolean  silent 
) [private]

Here is the call graph for this function:

Here is the call graph for this function:

boolean joshua.zmert.MertCore.copyFile ( String  origFileName,
String  newFileName 
) [private]

Here is the caller graph for this function:

int joshua.zmert.MertCore.countLines ( String  fileName) [private]

Here is the caller graph for this function:

int joshua.zmert.MertCore.countNonEmptyLines ( String  fileName) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.createConfigFile ( double[]  params,
String  cfgFileName,
String  templateFileName 
) [private]

Here is the caller graph for this function:

String joshua.zmert.MertCore.createUnifiedRefFile ( String  prefix,
int  numFiles 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.zmert.MertCore.deleteFile ( String  fileName) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

boolean joshua.zmert.MertCore.fileExists ( String  fileName) [private]

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

String joshua.zmert.MertCore.fullPath ( String  dir,
String  fileName 
) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.gunzipFile ( String  gzippedFileName) [private]
void joshua.zmert.MertCore.gunzipFile ( String  gzippedFileName,
String  outputFileName 
) [private]

Here is the call graph for this function:

void joshua.zmert.MertCore.gzipFile ( String  inputFileName) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.gzipFile ( String  inputFileName,
String  gzippedFileName 
) [private]

Here is the call graph for this function:

HashSet<Integer> joshua.zmert.MertCore.indicesToDiscard ( double[]  slope,
double[]  offset 
) [private]
void joshua.zmert.MertCore.initialize ( int  randsToSkip) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

String joshua.zmert.MertCore.lambdaToString ( double[]  lambdaA) [private]

Here is the caller graph for this function:

static void joshua.zmert.MertCore.main ( String[]  args) [static]

Here is the call graph for this function:

String joshua.zmert.MertCore.normalize ( String  str,
int  normMethod 
) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.print ( Object  obj,
int  priority 
) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.print ( Object  obj) [private]
void joshua.zmert.MertCore.println ( Object  obj,
int  priority 
) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.println ( Object  obj) [private]

Here is the call graph for this function:

void joshua.zmert.MertCore.processArgsArray ( String[]  args) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.processArgsArray ( String[]  args,
boolean  firstTime 
) [private]

Here is the call graph for this function:

Here is the call 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:

void joshua.zmert.MertCore.produceTempFiles ( String  nbestFileName,
int  iteration 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

double [] joshua.zmert.MertCore.randomLambda ( ) [private]

Here is the caller graph for this function:

double [] joshua.zmert.MertCore.randomPerturbation ( double[]  origLambda,
int  i,
double  method,
double  param,
double  mult 
) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.renameFile ( String  origFileName,
String  newFileName 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

String [] joshua.zmert.MertCore.run_decoder ( int  iteration) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

void joshua.zmert.MertCore.run_MERT ( int  minIts,
int  maxIts,
int  prevIts 
)

Here is the call graph for this function:

double [] joshua.zmert.MertCore.run_single_iteration ( int  iteration,
int  minIts,
int  maxIts,
int  prevIts,
int  earlyStop,
int[]  maxIndex 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.zmert.MertCore.set_docSubsetInfo ( int[]  info) [private]

Here is the caller graph for this function:

void joshua.zmert.MertCore.setFeats ( double  featVal_array[][][],
int  i,
int[]  lastUsedIndex,
int[]  maxIndex,
double[]  featVal 
) [private]

Here is the caller graph for this function:

Here is the call graph for this function:

void joshua.zmert.MertCore.writeLine ( String  line,
BufferedWriter  writer 
) throws IOException [private]

Here is the caller graph for this function:


Member Data Documentation

final double joshua.zmert.MertCore.epsilon = 1.0 / 1000000 [static, private]
final DecimalFormat joshua.zmert.MertCore.f4 = new DecimalFormat("###0.0000") [static, private]
TreeSet<Integer> [] joshua.zmert.MertCore.indicesOfInterest_all [private]
double [] joshua.zmert.MertCore.lambda [private]
double [] joshua.zmert.MertCore.maxThValue [private]
double [] joshua.zmert.MertCore.minThValue [private]
final Runtime joshua.zmert.MertCore.myRuntime = Runtime.getRuntime() [private]
final double joshua.zmert.MertCore.NegInf = (-1.0 / 0.0) [static, private]
String [] joshua.zmert.MertCore.paramNames [private]
final double joshua.zmert.MertCore.PosInf = (+1.0 / 0.0) [static, private]
boolean joshua.zmert.MertCore.randInit [private]