|
Cambridge SMT System
|
#include "LatMertMain.h"#include "DebugMert.h"#include "TGMert.h"#include "ParamsConfig.h"#include "ErrorSurface.h"#include "RefsData.h"#include "CommonFlags.h"#include <iostream>#include <fstream>#include <iomanip>#include <vector>#include <fst/fstlib.h>#include <boost/tuple/tuple_comparison.hpp>
Go to the source code of this file.
Functions | |
| DEFINE_string (params_min,"","vector of minimum changes accepted during line optimization") | |
| DEFINE_string (params_max,"","vector of maximum changes accepted during line optimization") | |
| DEFINE_string (direction,"","direction(s)") | |
| DEFINE_string (write_surface,"","path to write error surface") | |
| DEFINE_string (write_parameters,"","path to write tuned parameters") | |
| DEFINE_string (algorithm,"","Line search algorithm to use") | |
| DEFINE_string (search,"powell","Algorithm to pick search direction") | |
| DEFINE_double (gamma_threshold, 0.000005,"gamma parameter update threshold") | |
| DEFINE_double (bleu_threshold, 0.000001,"BLEU parameter update threshold") | |
| DEFINE_int32 (print_precision, 6,"print precision for vector weight components") | |
| DEFINE_int32 (lattice_cutoff, 1,"The number of lattices necessary for tuning a feature parameter") | |
| DEFINE_int32 (random_directions, 10,"The number of random directions") | |
| DEFINE_bool (verbose, false,"enable verbose output") | |
| DEFINE_bool (cache_lattices, false,"load all lattices into memory prior to MERT") | |
| DEFINE_bool (normalize_parameters, true,"normalize final tuned parameters with respect to the first column") | |
| DEFINE_bool (prune_stats, false,"print number of arcs pruned") | |
| DEFINE_bool (ignore_gsf, false,"ignore grammar scale factor") | |
| DEFINE_bool (no_skip, false,"do not skip lattices if they do not contain features") | |
| DEFINE_bool (full_log, false,"print an old style log with feature vectors displayed") | |
| DEFINE_bool (point_test, false,"check that each optimised parameter gives the same error as hypotheses found by shortest path") | |
| DEFINE_bool (random_axes, false,"use axes along with random directions") | |
| std::map< boost::tuple< std::string, std::string, std::string >, Optimizer * > | CreateOptimizers () |
| void | WriteTunedParameters (const PARAMS &best, const std::string &filename, const bool normalize) |
| int | main (int argc, char **argv) |
Variables | |
| std::map< boost::tuple< std::string, std::string, std::string >, Optimizer * > | optimizers |
| std::map<boost::tuple<std::string, std::string, std::string> , Optimizer *> CreateOptimizers | ( | ) |
Definition at line 86 of file latmert.main.cpp.
| DEFINE_bool | ( | verbose | , |
| false | , | ||
| "enable verbose output" | |||
| ) |
| DEFINE_bool | ( | cache_lattices | , |
| false | , | ||
| "load all lattices into memory prior to MERT" | |||
| ) |
| DEFINE_bool | ( | normalize_parameters | , |
| true | , | ||
| "normalize final tuned parameters with respect to the first column" | |||
| ) |
| DEFINE_bool | ( | prune_stats | , |
| false | , | ||
| "print number of arcs pruned" | |||
| ) |
| DEFINE_bool | ( | ignore_gsf | , |
| false | , | ||
| "ignore grammar scale factor" | |||
| ) |
| DEFINE_bool | ( | no_skip | , |
| false | , | ||
| "do not skip lattices if they do not contain features" | |||
| ) |
| DEFINE_bool | ( | full_log | , |
| false | , | ||
| "print an old style log with feature vectors displayed" | |||
| ) |
| DEFINE_bool | ( | point_test | , |
| false | , | ||
| "check that each optimised parameter gives the same error as hypotheses found by shortest path" | |||
| ) |
| DEFINE_bool | ( | random_axes | , |
| false | , | ||
| "use axes along with random directions" | |||
| ) |
| DEFINE_double | ( | gamma_threshold | , |
| 0. | 000005, | ||
| "gamma parameter update threshold" | |||
| ) |
| DEFINE_double | ( | bleu_threshold | , |
| 0. | 000001, | ||
| "BLEU parameter update threshold" | |||
| ) |
| DEFINE_int32 | ( | print_precision | , |
| 6 | , | ||
| "print precision for vector weight components" | |||
| ) |
| DEFINE_int32 | ( | lattice_cutoff | , |
| 1 | , | ||
| "The number of lattices necessary for tuning a feature parameter" | |||
| ) |
| DEFINE_int32 | ( | random_directions | , |
| 10 | , | ||
| "The number of random directions" | |||
| ) |
| DEFINE_string | ( | params_min | , |
| "" | , | ||
| "vector of minimum changes accepted during line optimization" | |||
| ) |
| DEFINE_string | ( | params_max | , |
| "" | , | ||
| "vector of maximum changes accepted during line optimization" | |||
| ) |
| DEFINE_string | ( | direction | , |
| "" | , | ||
| "direction(s)" | |||
| ) |
| DEFINE_string | ( | write_surface | , |
| "" | , | ||
| "path to write error surface" | |||
| ) |
| DEFINE_string | ( | write_parameters | , |
| "" | , | ||
| "path to write tuned parameters" | |||
| ) |
| DEFINE_string | ( | algorithm | , |
| "" | , | ||
| "Line search algorithm to use" | |||
| ) |
| DEFINE_string | ( | search | , |
| "powell" | , | ||
| "Algorithm to pick search direction" | |||
| ) |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
| void WriteTunedParameters | ( | const PARAMS & | best, |
| const std::string & | filename, | ||
| const bool | normalize | ||
| ) |
Definition at line 114 of file latmert.main.cpp.


| std::map<boost::tuple<std::string, std::string, std::string> , Optimizer *> optimizers |
Definition at line 111 of file latmert.main.cpp.