From f31471f22cf5553e8cb0255ae95cdcf14aae3883 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 8 Nov 2016 15:19:06 +0000 Subject: add prefix & suffix params to UnknowWordPenalty --- contrib/moses2/TranslationModel/PhraseTable.cpp | 2 -- .../moses2/TranslationModel/UnknownWordPenalty.cpp | 33 ++++++++++++++++++++-- .../moses2/TranslationModel/UnknownWordPenalty.h | 4 +++ 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/contrib/moses2/TranslationModel/PhraseTable.cpp b/contrib/moses2/TranslationModel/PhraseTable.cpp index c9ee75f80..6c2d6eaf2 100644 --- a/contrib/moses2/TranslationModel/PhraseTable.cpp +++ b/contrib/moses2/TranslationModel/PhraseTable.cpp @@ -26,8 +26,6 @@ PhraseTable::PhraseTable(size_t startInd, const std::string &line) : , m_maxCacheSize(DEFAULT_MAX_TRANS_OPT_CACHE_SIZE) { m_input.push_back(0); - - ReadParameters(); } PhraseTable::~PhraseTable() diff --git a/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp b/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp index 46d6b0f9d..f08b31d4a 100644 --- a/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp +++ b/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp @@ -37,6 +37,19 @@ UnknownWordPenalty::~UnknownWordPenalty() // TODO Auto-generated destructor stub } +void UnknownWordPenalty::SetParameter(const std::string& key, const std::string& value) +{ + if (key == "prefix") { + m_prefix = value; + } + else if (key == "suffix") { + m_suffix = value; + } + else { + PhraseTable::SetParameter(key, value); + } +} + void UnknownWordPenalty::ProcessXML( const Manager &mgr, MemPool &pool, @@ -111,9 +124,23 @@ TargetPhrases *UnknownWordPenalty::Lookup(const Manager &mgr, MemPool &pool, system, 1); Moses2::Word &word = (*target)[0]; - //FactorCollection &fc = system.vocab; - //const Factor *factor = fc.AddFactor("SSS", false); - word[0] = factor; + if (m_prefix.empty() && m_suffix.empty()) { + word[0] = factor; + } + else { + stringstream strm; + if (!m_prefix.empty()) { + strm << m_prefix; + } + strm << factor->GetString(); + if (!m_suffix.empty()) { + strm << m_suffix; + } + + FactorCollection &fc = system.GetVocab(); + const Factor *targetFactor = fc.AddFactor(strm.str(), system, false); + word[0] = targetFactor; + } Scores &scores = target->GetScores(); scores.PlusEquals(mgr.system, *this, -100); diff --git a/contrib/moses2/TranslationModel/UnknownWordPenalty.h b/contrib/moses2/TranslationModel/UnknownWordPenalty.h index 0e8ec6a56..3adb5bbc2 100644 --- a/contrib/moses2/TranslationModel/UnknownWordPenalty.h +++ b/contrib/moses2/TranslationModel/UnknownWordPenalty.h @@ -21,6 +21,8 @@ public: UnknownWordPenalty(size_t startInd, const std::string &line); virtual ~UnknownWordPenalty(); + virtual void SetParameter(const std::string& key, const std::string& value); + void Lookup(const Manager &mgr, InputPathsBase &inputPaths) const; virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool, InputPath &inputPath) const; @@ -78,6 +80,8 @@ protected: const Moses2::Hypotheses *hypos, const Moses2::Range &subPhraseRange, SCFG::InputPath &outPath) const; +protected: + std::string m_prefix, m_suffix; }; } -- cgit v1.2.3 From 948af8f35472f5878a91c76531891634a1b67210 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 8 Nov 2016 15:30:16 +0000 Subject: add drop params to UnknowWordPenalty --- .../moses2/TranslationModel/UnknownWordPenalty.cpp | 47 +++++++++++++--------- .../moses2/TranslationModel/UnknownWordPenalty.h | 1 + 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp b/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp index f08b31d4a..d786b2cff 100644 --- a/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp +++ b/contrib/moses2/TranslationModel/UnknownWordPenalty.cpp @@ -25,8 +25,9 @@ using namespace std; namespace Moses2 { -UnknownWordPenalty::UnknownWordPenalty(size_t startInd, const std::string &line) : - PhraseTable(startInd, line) +UnknownWordPenalty::UnknownWordPenalty(size_t startInd, const std::string &line) +:PhraseTable(startInd, line) +,m_drop(false) { m_tuneable = false; ReadParameters(); @@ -39,7 +40,10 @@ UnknownWordPenalty::~UnknownWordPenalty() void UnknownWordPenalty::SetParameter(const std::string& key, const std::string& value) { - if (key == "prefix") { + if (key == "drop") { + m_drop = Scan(value); + } + else if (key == "prefix") { m_prefix = value; } else if (key == "suffix") { @@ -119,27 +123,32 @@ TargetPhrases *UnknownWordPenalty::Lookup(const Manager &mgr, MemPool &pool, tps = new (pool.Allocate()) TargetPhrases(pool, 1); + size_t numWords = m_drop ? 0 : 1; + TargetPhraseImpl *target = new (pool.Allocate()) TargetPhraseImpl(pool, *this, - system, 1); - Moses2::Word &word = (*target)[0]; + system, numWords); - if (m_prefix.empty() && m_suffix.empty()) { - word[0] = factor; - } - else { - stringstream strm; - if (!m_prefix.empty()) { - strm << m_prefix; + if (!m_drop) { + Moses2::Word &word = (*target)[0]; + + if (m_prefix.empty() && m_suffix.empty()) { + word[0] = factor; } - strm << factor->GetString(); - if (!m_suffix.empty()) { - strm << m_suffix; + else { + stringstream strm; + if (!m_prefix.empty()) { + strm << m_prefix; + } + strm << factor->GetString(); + if (!m_suffix.empty()) { + strm << m_suffix; + } + + FactorCollection &fc = system.GetVocab(); + const Factor *targetFactor = fc.AddFactor(strm.str(), system, false); + word[0] = targetFactor; } - - FactorCollection &fc = system.GetVocab(); - const Factor *targetFactor = fc.AddFactor(strm.str(), system, false); - word[0] = targetFactor; } Scores &scores = target->GetScores(); diff --git a/contrib/moses2/TranslationModel/UnknownWordPenalty.h b/contrib/moses2/TranslationModel/UnknownWordPenalty.h index 3adb5bbc2..52c235a36 100644 --- a/contrib/moses2/TranslationModel/UnknownWordPenalty.h +++ b/contrib/moses2/TranslationModel/UnknownWordPenalty.h @@ -81,6 +81,7 @@ protected: const Moses2::Range &subPhraseRange, SCFG::InputPath &outPath) const; protected: + bool m_drop; std::string m_prefix, m_suffix; }; -- cgit v1.2.3 From e8f418f10991668ae91926c26e6450c710c4475c Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 8 Nov 2016 22:19:39 +0000 Subject: =?UTF-8?q?implement=20=E2=80=93mark-unknown,=20-unknown-word-pref?= =?UTF-8?q?ix,=20and=20=E2=80=93unknown-word-suffix=20for=20backward=20com?= =?UTF-8?q?patibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/moses2/FF/FeatureFunctions.cpp | 53 ++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/contrib/moses2/FF/FeatureFunctions.cpp b/contrib/moses2/FF/FeatureFunctions.cpp index 53eb0f351..8ca145060 100644 --- a/contrib/moses2/FF/FeatureFunctions.cpp +++ b/contrib/moses2/FF/FeatureFunctions.cpp @@ -68,34 +68,43 @@ void FeatureFunctions::Create() UTIL_THROW_IF2(ffParams == NULL, "Must have [feature] section"); BOOST_FOREACH(const std::string &line, *ffParams){ - //cerr << "line=" << line << endl; - FeatureFunction *ff = Create(line); + //cerr << "line=" << line << endl; + FeatureFunction *ff = Create(line); - m_featureFunctions.push_back(ff); + m_featureFunctions.push_back(ff); - StatefulFeatureFunction *sfff = dynamic_cast(ff); - if (sfff) { - sfff->SetStatefulInd(m_statefulFeatureFunctions.size()); - m_statefulFeatureFunctions.push_back(sfff); - } + StatefulFeatureFunction *sfff = dynamic_cast(ff); + if (sfff) { + sfff->SetStatefulInd(m_statefulFeatureFunctions.size()); + m_statefulFeatureFunctions.push_back(sfff); + } - if (ff->HasPhraseTableInd()) { - ff->SetPhraseTableInd(m_withPhraseTableInd.size()); - m_withPhraseTableInd.push_back(ff); - } + if (ff->HasPhraseTableInd()) { + ff->SetPhraseTableInd(m_withPhraseTableInd.size()); + m_withPhraseTableInd.push_back(ff); + } - PhraseTable *pt = dynamic_cast(ff); - if (pt) { - pt->SetPtInd(m_phraseTables.size()); - m_phraseTables.push_back(pt); - } + PhraseTable *pt = dynamic_cast(ff); + if (pt) { + pt->SetPtInd(m_phraseTables.size()); + m_phraseTables.push_back(pt); + } - const UnknownWordPenalty *unkWP = dynamic_cast(pt); - if (unkWP) { - m_unkWP = unkWP; - } + UnknownWordPenalty *unkWP = dynamic_cast(pt); + if (unkWP) { + m_unkWP = unkWP; -} + // legacy support + if (m_system.options.unk.drop) { + unkWP->SetParameter("drop", "true"); + } + if (m_system.options.unk.mark) { + unkWP->SetParameter("prefix", m_system.options.unk.prefix); + unkWP->SetParameter("suffix", m_system.options.unk.suffix); + } + } + + } } FeatureFunction *FeatureFunctions::Create(const std::string &line) -- cgit v1.2.3 From 5cab133cfee7319c2d1710f101ca9395fa7c0624 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 8 Nov 2016 23:05:29 +0000 Subject: comment out unused parameters --- contrib/moses2/legacy/Parameter.cpp | 58 ++++++++++++------------ contrib/moses2/parameters/CubePruningOptions.cpp | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/contrib/moses2/legacy/Parameter.cpp b/contrib/moses2/legacy/Parameter.cpp index c7758eeb6..5777b3c2e 100644 --- a/contrib/moses2/legacy/Parameter.cpp +++ b/contrib/moses2/legacy/Parameter.cpp @@ -142,8 +142,8 @@ Parameter::Parameter() "How many hypotheses should be created for each coverage. (default = 0)"); AddParam(cube_opts, "cube-pruning-lazy-scoring", "cbls", "Don't fully score a hypothesis until it is popped"); - AddParam(cube_opts, "cube-pruning-deterministic-search", "cbds", - "Break ties deterministically during search"); + //AddParam(cube_opts, "cube-pruning-deterministic-search", "cbds", + // "Break ties deterministically during search"); /////////////////////////////////////////////////////////////////////////////////////// // minimum bayes risk decoding @@ -157,21 +157,21 @@ Parameter::Parameter() AddParam(mbr_opts, "mbr-scale", "scaling factor to convert log linear score probability in MBR decoding (default 1.0)"); - AddParam(mbr_opts, "lminimum-bayes-risk", "lmbr", - "use lattice miminum Bayes risk to determine best translation"); + //AddParam(mbr_opts, "lminimum-bayes-risk", "lmbr", + // "use lattice miminum Bayes risk to determine best translation"); AddParam(mbr_opts, "consensus-decoding", "con", "use consensus decoding (De Nero et. al. 2009)"); po::options_description lmbr_opts("Options specific to Lattic MBR"); - AddParam(lmbr_opts, "lmbr-p", "unigram precision value for lattice mbr"); - AddParam(lmbr_opts, "lmbr-r", "ngram precision decay value for lattice mbr"); - AddParam(lmbr_opts, "lmbr-thetas", "theta(s) for lattice mbr calculation"); - AddParam(mbr_opts, "lmbr-map-weight", - "weight given to map solution when doing lattice MBR (default 0)"); - AddParam(mbr_opts, "lmbr-pruning-factor", - "average number of nodes/word wanted in pruned lattice"); - AddParam(mbr_opts, "lattice-hypo-set", - "to use lattice as hypo set during lattice MBR"); + //AddParam(lmbr_opts, "lmbr-p", "unigram precision value for lattice mbr"); + //AddParam(lmbr_opts, "lmbr-r", "ngram precision decay value for lattice mbr"); + //AddParam(lmbr_opts, "lmbr-thetas", "theta(s) for lattice mbr calculation"); + //AddParam(mbr_opts, "lmbr-map-weight", + // "weight given to map solution when doing lattice MBR (default 0)"); + //AddParam(mbr_opts, "lmbr-pruning-factor", + // "average number of nodes/word wanted in pruned lattice"); + //AddParam(mbr_opts, "lattice-hypo-set", + // "to use lattice as hypo set during lattice MBR"); /////////////////////////////////////////////////////////////////////////////////////// // OOV handling options @@ -194,12 +194,12 @@ Parameter::Parameter() // input options po::options_description input_opts("Input Format Options"); AddParam(input_opts, "input-factors", "list of factors in the input"); - AddParam(input_opts, "inputtype", - "text (0), confusion network (1), word lattice (2), tree (3) (default = 0)"); + //AddParam(input_opts, "inputtype", + // "text (0), confusion network (1), word lattice (2), tree (3) (default = 0)"); AddParam(input_opts, "xml-input", "xi", "allows markup of input with desired translations and probabilities. values can be 'pass-through' (default), 'inclusive', 'exclusive', 'constraint', 'ignore'"); - AddParam(input_opts, "xml-brackets", "xb", - "specify strings to be used as xml tags opening and closing, e.g. \"{{ }}\" (default \"< >\"). Avoid square brackets because of configuration file format. Valid only with text input mode"); + //AddParam(input_opts, "xml-brackets", "xb", + // "specify strings to be used as xml tags opening and closing, e.g. \"{{ }}\" (default \"< >\"). Avoid square brackets because of configuration file format. Valid only with text input mode"); AddParam(input_opts, "start-translation-id", "Id of 1st input. Default = 0"); AddParam(input_opts, "alternate-weight-setting", "aws", "alternate set of weights to used per xml specification"); @@ -228,10 +228,10 @@ Parameter::Parameter() "Output stack info as word graph. Takes filename, 0=only hypos in stack, 1=stack + nbest hypos"); AddParam(output_opts, "tree-translation-details", "Ttree", "for each hypothesis, report translation details with tree fragment info to given file"); - AddParam(output_opts, "print-alignment-info", - "Output word-to-word alignment to standard out, separated from translation by |||. Word-to-word alignments are takne from the phrase table if any. Default is false"); - AddParam(output_opts, "alignment-output-file", - "print output word alignments into given file"); + //AddParam(output_opts, "print-alignment-info", + // "Output word-to-word alignment to standard out, separated from translation by |||. Word-to-word alignments are takne from the phrase table if any. Default is false"); + //AddParam(output_opts, "alignment-output-file", + // "print output word alignments into given file"); AddParam(output_opts, "sort-word-alignment", "Sort word alignments for more consistent display. 0=no sort (default), 1=target order"); AddParam(output_opts, "report-segmentation", "t", @@ -280,8 +280,8 @@ Parameter::Parameter() "generate samples from lattice, in same format as nbest list. Uses the file and size arguments, as in n-best-list"); AddParam(nbest_opts, "include-segmentation-in-n-best", "include phrasal segmentation in the n-best list. default is false"); - AddParam(nbest_opts, "print-alignment-info-in-n-best", - "Include word-to-word alignment in the n-best list. Word-to-word alignments are taken from the phrase table if any. Default is false"); + //AddParam(nbest_opts, "print-alignment-info-in-n-best", + // "Include word-to-word alignment in the n-best list. Word-to-word alignments are taken from the phrase table if any. Default is false"); /////////////////////////////////////////////////////////////////////////////////////// // server options @@ -350,12 +350,12 @@ Parameter::Parameter() "Override feature name (NOT arguments). Eg. SRILM-->KENLM, PhraseDictionaryMemory-->PhraseDictionaryScope3"); AddParam(misc_opts, "feature", "All the feature functions should be here"); - AddParam(misc_opts, "context-string", - "A (tokenized) string containing context words for context-sensitive translation."); - AddParam(misc_opts, "context-weights", - "A key-value map for context-sensitive translation."); - AddParam(misc_opts, "context-window", - "Context window (in words) for context-sensitive translation: {+|-|+-}."); + //AddParam(misc_opts, "context-string", + // "A (tokenized) string containing context words for context-sensitive translation."); + //AddParam(misc_opts, "context-weights", + // "A key-value map for context-sensitive translation."); + //AddParam(misc_opts, "context-window", + // "Context window (in words) for context-sensitive translation: {+|-|+-}."); AddParam(misc_opts, "cpu-affinity-offset", "CPU Affinity. Default = -1 (no affinity)"); AddParam(misc_opts, "cpu-affinity-increment", "Set to 1 (default) to put each thread on different cores. 0 to run all threads on one core"); diff --git a/contrib/moses2/parameters/CubePruningOptions.cpp b/contrib/moses2/parameters/CubePruningOptions.cpp index 31f349b65..35663e61d 100644 --- a/contrib/moses2/parameters/CubePruningOptions.cpp +++ b/contrib/moses2/parameters/CubePruningOptions.cpp @@ -23,7 +23,7 @@ namespace Moses2 param.SetParameter(diversity, "cube-pruning-diversity", DEFAULT_CUBE_PRUNING_DIVERSITY); param.SetParameter(lazy_scoring, "cube-pruning-lazy-scoring", false); - param.SetParameter(deterministic_search, "cube-pruning-deterministic-search", false); + //param.SetParameter(deterministic_search, "cube-pruning-deterministic-search", false); return true; } -- cgit v1.2.3 From df9f08aa7de56da7d0dec78dab9d701f9f89871f Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Wed, 9 Nov 2016 00:17:25 +0000 Subject: comment out unused parameters.2 --- contrib/moses2/legacy/Parameter.cpp | 184 ++++++++++++++++++------------------ 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/contrib/moses2/legacy/Parameter.cpp b/contrib/moses2/legacy/Parameter.cpp index 5777b3c2e..782c96e78 100644 --- a/contrib/moses2/legacy/Parameter.cpp +++ b/contrib/moses2/legacy/Parameter.cpp @@ -52,14 +52,14 @@ Parameter::Parameter() AddParam(main_opts, "verbose", "v", "verbosity level of the logging"); AddParam(main_opts, "show-weights", "print feature weights and exit"); - AddParam(main_opts, "time-out", - "seconds after which is interrupted (-1=no time-out, default is -1)"); + //AddParam(main_opts, "time-out", + // "seconds after which is interrupted (-1=no time-out, default is -1)"); /////////////////////////////////////////////////////////////////////////////////////// // factorization options po::options_description factor_opts("General Factorization Options"); - AddParam(factor_opts, "factor-delimiter", "fd", - "specify a different factor delimiter than the default"); + //AddParam(factor_opts, "factor-delimiter", "fd", + // "specify a different factor delimiter than the default"); // one should be able to specify different factor delimiters for intput and output AddParam(factor_opts, "mapping", "description of decoding steps"); // whatever that means ... AddParam(factor_opts, "placeholder-factor", @@ -79,23 +79,23 @@ Parameter::Parameter() desc += "8=tree-to-string (SCFG-based)\n"; desc += "9=forest-to-string"; AddParam(search_opts, "search-algorithm", desc); - AddParam(search_opts, "beam-threshold", "b", - "threshold for threshold pruning"); - AddParam(search_opts, "early-discarding-threshold", "edt", - "threshold for constructing hypotheses based on estimate cost"); + //AddParam(search_opts, "beam-threshold", "b", + // "threshold for threshold pruning"); + //AddParam(search_opts, "early-discarding-threshold", "edt", + // "threshold for constructing hypotheses based on estimate cost"); AddParam(search_opts, "stack", "s", "maximum stack size for histogram pruning. 0 = unlimited stack size"); - AddParam(search_opts, "stack-diversity", "sd", - "minimum number of hypothesis of each coverage in stack (default 0)"); + //AddParam(search_opts, "stack-diversity", "sd", + // "minimum number of hypothesis of each coverage in stack (default 0)"); // feature weight-related options - AddParam(search_opts, "weight-file", "wf", - "feature weights file. Do *not* put weights for 'core' features in here - they go in moses.ini"); + //AddParam(search_opts, "weight-file", "wf", + // "feature weights file. Do *not* put weights for 'core' features in here - they go in moses.ini"); AddParam(search_opts, "weight", "weights for ALL models, 1 per line 'WeightName value'. Weight names can be repeated"); - AddParam(search_opts, "feature-overwrite", - "Override arguments in a particular feature function with a particular key. Format: -feature-overwrite \"FeatureName key=value\""); + //AddParam(search_opts, "feature-overwrite", + // "Override arguments in a particular feature function with a particular key. Format: -feature-overwrite \"FeatureName key=value\""); po::options_description tune_opts("Options used in tuning."); AddParam(tune_opts, "weight-overwrite", @@ -106,20 +106,20 @@ Parameter::Parameter() "Add weight for FF if it doesn't exist, i.e weights here are added 1st, and can be override by the ini file or on the command line. Used to specify initial weights for FF that was also specified on the copmmand line"); // phrase table limitations: - AddParam(search_opts, "max-partial-trans-opt", - "maximum number of partial translation options per input span (during mapping steps)"); - AddParam(search_opts, "max-trans-opt-per-coverage", - "maximum number of translation options per input span (after applying mapping steps)"); + //AddParam(search_opts, "max-partial-trans-opt", + // "maximum number of partial translation options per input span (during mapping steps)"); + //AddParam(search_opts, "max-trans-opt-per-coverage", + // "maximum number of translation options per input span (after applying mapping steps)"); AddParam(search_opts, "max-phrase-length", "maximum phrase length (default 20)"); - AddParam(search_opts, "translation-option-threshold", "tot", - "threshold for translation options relative to best for input phrase"); + //AddParam(search_opts, "translation-option-threshold", "tot", + // "threshold for translation options relative to best for input phrase"); // miscellaneous search options - AddParam(search_opts, "disable-discarding", "dd", - "disable hypothesis discarding"); // ??? memory management? UG - AddParam(search_opts, "phrase-drop-allowed", "da", - "if present, allow dropping of source words"); //da = drop any (word); see -du for comparison + //AddParam(search_opts, "disable-discarding", "dd", + // "disable hypothesis discarding"); // ??? memory management? UG + //AddParam(search_opts, "phrase-drop-allowed", "da", + // "if present, allow dropping of source words"); //da = drop any (word); see -du for comparison AddParam(search_opts, "threads", "th", "number of threads to use in decoding (defaults to single-threaded)"); @@ -129,8 +129,8 @@ Parameter::Parameter() "distortion (reordering) limit in maximum number of words (0 = monotone, -1 = unlimited)"); AddParam(disto_opts, "monotone-at-punctuation", "mp", "do not reorder over punctuation"); - AddParam(disto_opts, "early-distortion-cost", "edc", - "include estimate of distortion cost yet to be incurred in the score [Moore & Quirk 2007]. Default is no"); + //AddParam(disto_opts, "early-distortion-cost", "edc", + // "include estimate of distortion cost yet to be incurred in the score [Moore & Quirk 2007]. Default is no"); AddParam(disto_opts, "distortion", "configurations for each factorized/lexicalized reordering model."); // zombie parameter? @@ -150,17 +150,17 @@ Parameter::Parameter() po::options_description mbr_opts( "Minimum Bayes Risk (MBR), Lattice MBR, and Consensus decoding"); - AddParam(mbr_opts, "minimum-bayes-risk", "mbr", - "use miminum Bayes risk to determine best translation"); - AddParam(mbr_opts, "mbr-size", - "number of translation candidates considered in MBR decoding (default 200)"); - AddParam(mbr_opts, "mbr-scale", - "scaling factor to convert log linear score probability in MBR decoding (default 1.0)"); + //AddParam(mbr_opts, "minimum-bayes-risk", "mbr", + // "use miminum Bayes risk to determine best translation"); + //AddParam(mbr_opts, "mbr-size", + // "number of translation candidates considered in MBR decoding (default 200)"); + //AddParam(mbr_opts, "mbr-scale", + // "scaling factor to convert log linear score probability in MBR decoding (default 1.0)"); //AddParam(mbr_opts, "lminimum-bayes-risk", "lmbr", // "use lattice miminum Bayes risk to determine best translation"); - AddParam(mbr_opts, "consensus-decoding", "con", - "use consensus decoding (De Nero et. al. 2009)"); + //AddParam(mbr_opts, "consensus-decoding", "con", + // "use consensus decoding (De Nero et. al. 2009)"); po::options_description lmbr_opts("Options specific to Lattic MBR"); //AddParam(lmbr_opts, "lmbr-p", "unigram precision value for lattice mbr"); @@ -187,53 +187,53 @@ Parameter::Parameter() "add language model oov feature, one per model"); AddParam(oov_opts, "output-unknowns", "Output the unknown (OOV) words to the given file, one line per sentence"); - AddParam(oov_opts, "always-create-direct-transopt", - "Always create a translation that translates the source word ad-verbatim"); + //AddParam(oov_opts, "always-create-direct-transopt", + // "Always create a translation that translates the source word ad-verbatim"); /////////////////////////////////////////////////////////////////////////////////////// // input options po::options_description input_opts("Input Format Options"); AddParam(input_opts, "input-factors", "list of factors in the input"); - //AddParam(input_opts, "inputtype", - // "text (0), confusion network (1), word lattice (2), tree (3) (default = 0)"); + AddParam(input_opts, "inputtype", + "text (0), confusion network (1), word lattice (2), tree (3) (default = 0)"); AddParam(input_opts, "xml-input", "xi", "allows markup of input with desired translations and probabilities. values can be 'pass-through' (default), 'inclusive', 'exclusive', 'constraint', 'ignore'"); //AddParam(input_opts, "xml-brackets", "xb", // "specify strings to be used as xml tags opening and closing, e.g. \"{{ }}\" (default \"< >\"). Avoid square brackets because of configuration file format. Valid only with text input mode"); - AddParam(input_opts, "start-translation-id", "Id of 1st input. Default = 0"); + //AddParam(input_opts, "start-translation-id", "Id of 1st input. Default = 0"); AddParam(input_opts, "alternate-weight-setting", "aws", "alternate set of weights to used per xml specification"); /////////////////////////////////////////////////////////////////////////////////////// // output options po::options_description output_opts("Output Options"); - AddParam(output_opts, "report-all-factors", - "report all factors in output, not just first"); + //AddParam(output_opts, "report-all-factors", + // "report all factors in output, not just first"); AddParam(output_opts, "output-factors", "list if factors in the output"); - AddParam(output_opts, "print-id", - "prefix translations with id. Default if false"); - AddParam(output_opts, "print-passthrough", - "output the sgml tag without any computation on that. Default is false"); - AddParam(output_opts, "print-passthrough-in-n-best", - "output the sgml tag without any computation on that in each entry of the n-best-list. Default is false"); + //AddParam(output_opts, "print-id", + // "prefix translations with id. Default if false"); + //AddParam(output_opts, "print-passthrough", + // "output the sgml tag without any computation on that. Default is false"); + //AddParam(output_opts, "print-passthrough-in-n-best", + // "output the sgml tag without any computation on that in each entry of the n-best-list. Default is false"); AddParam(output_opts, "output-factors", "list of factors in the output"); - AddParam(output_opts, "print-all-derivations", - "to print all derivations in search graph"); + //AddParam(output_opts, "print-all-derivations", + // "to print all derivations in search graph"); AddParam(output_opts, "translation-details", "T", "for each best hypothesis, report translation details to the given file"); AddParam(output_opts, "output-hypo-score", "Output the hypo score to stdout with the output string. For search error analysis. Default is false"); - AddParam(output_opts, "output-word-graph", "owg", - "Output stack info as word graph. Takes filename, 0=only hypos in stack, 1=stack + nbest hypos"); - AddParam(output_opts, "tree-translation-details", "Ttree", - "for each hypothesis, report translation details with tree fragment info to given file"); + //AddParam(output_opts, "output-word-graph", "owg", + // "Output stack info as word graph. Takes filename, 0=only hypos in stack, 1=stack + nbest hypos"); + //AddParam(output_opts, "tree-translation-details", "Ttree", + // "for each hypothesis, report translation details with tree fragment info to given file"); //AddParam(output_opts, "print-alignment-info", // "Output word-to-word alignment to standard out, separated from translation by |||. Word-to-word alignments are takne from the phrase table if any. Default is false"); //AddParam(output_opts, "alignment-output-file", // "print output word alignments into given file"); - AddParam(output_opts, "sort-word-alignment", - "Sort word alignments for more consistent display. 0=no sort (default), 1=target order"); + //AddParam(output_opts, "sort-word-alignment", + // "Sort word alignments for more consistent display. 0=no sort (default), 1=target order"); AddParam(output_opts, "report-segmentation", "t", "report phrase segmentation in the output"); AddParam(output_opts, "report-segmentation-enriched", "tt", @@ -241,25 +241,25 @@ Parameter::Parameter() // translation-all-details was introduced in the context of DIMwid: Decoder Inspection for Moses (using Widgets) // see here: https://ufal.mff.cuni.cz/pbml/100/art-kurtz-seemann-braune-maletti.pdf - AddParam(output_opts, "translation-all-details", "Tall", - "for all hypotheses, report translation details to the given file"); + //AddParam(output_opts, "translation-all-details", "Tall", + // "for all hypotheses, report translation details to the given file"); po::options_description osg_opts("Options for outputting search graphs"); - AddParam(osg_opts, "output-search-graph", "osg", - "Output connected hypotheses of search into specified filename"); - AddParam(osg_opts, "output-search-graph-extended", "osgx", - "Output connected hypotheses of search into specified filename, in extended format"); - AddParam(osg_opts, "unpruned-search-graph", "usg", - "When outputting chart search graph, do not exclude dead ends. Note: stack pruning may have eliminated some hypotheses"); - AddParam(osg_opts, "output-search-graph-slf", "slf", - "Output connected hypotheses of search into specified directory, one file per sentence, in HTK standard lattice format (SLF) - the flag should be followed by a directory name, which must exist"); - AddParam(output_opts, "include-lhs-in-search-graph", "lhssg", - "When outputting chart search graph, include the label of the LHS of the rule (useful when using syntax)"); + //AddParam(osg_opts, "output-search-graph", "osg", + // "Output connected hypotheses of search into specified filename"); + //AddParam(osg_opts, "output-search-graph-extended", "osgx", + // "Output connected hypotheses of search into specified filename, in extended format"); + //AddParam(osg_opts, "unpruned-search-graph", "usg", + // "When outputting chart search graph, do not exclude dead ends. Note: stack pruning may have eliminated some hypotheses"); + //AddParam(osg_opts, "output-search-graph-slf", "slf", + // "Output connected hypotheses of search into specified directory, one file per sentence, in HTK standard lattice format (SLF) - the flag should be followed by a directory name, which must exist"); + //AddParam(output_opts, "include-lhs-in-search-graph", "lhssg", + // "When outputting chart search graph, include the label of the LHS of the rule (useful when using syntax)"); #ifdef HAVE_PROTOBUF - AddParam(osg_opts,"output-search-graph-pb", "pb", "Write phrase lattice to protocol buffer objects in the specified path."); + //AddParam(osg_opts,"output-search-graph-pb", "pb", "Write phrase lattice to protocol buffer objects in the specified path."); #endif - AddParam(osg_opts, "output-search-graph-hypergraph", - "DEPRECATED! Output connected hypotheses of search into specified directory, one file per sentence, in a hypergraph format (see Kenneth Heafield's lazy hypergraph decoder). This flag is followed by 3 values: 'true (gz|txt|bz) directory-name'"); + //AddParam(osg_opts, "output-search-graph-hypergraph", + // "DEPRECATED! Output connected hypotheses of search into specified directory, one file per sentence, in a hypergraph format (see Kenneth Heafield's lazy hypergraph decoder). This flag is followed by 3 values: 'true (gz|txt|bz) directory-name'"); /////////////////////////////////////////////////////////////////////////////////////// // nbest-options @@ -268,18 +268,18 @@ Parameter::Parameter() "file and size of n-best-list to be generated; specify - as the file in order to write to STDOUT"); // AddParam(nbest_opts,"n-best-list-file", "file of n-best-list to be generated; specify - as the file in order to write to STDOUT"); // AddParam(nbest_opts,"n-best-list-size", "size of n-best-list to be generated; specify - as the file in order to write to STDOUT"); - AddParam(nbest_opts, "labeled-n-best-list", - "print out labels for each weight type in n-best list. default is true"); + //AddParam(nbest_opts, "labeled-n-best-list", + // "print out labels for each weight type in n-best list. default is true"); AddParam(nbest_opts, "n-best-trees", "Write n-best target-side trees to n-best-list"); AddParam(nbest_opts, "n-best-factor", "factor to compute the maximum number of contenders (=factor*nbest-size). value 0 means infinity, i.e. no threshold. default is 0"); - AddParam(nbest_opts, "report-all-factors-in-n-best", - "Report all factors in n-best-lists. Default is false"); - AddParam(nbest_opts, "lattice-samples", - "generate samples from lattice, in same format as nbest list. Uses the file and size arguments, as in n-best-list"); - AddParam(nbest_opts, "include-segmentation-in-n-best", - "include phrasal segmentation in the n-best list. default is false"); + //AddParam(nbest_opts, "report-all-factors-in-n-best", + // "Report all factors in n-best-lists. Default is false"); + //AddParam(nbest_opts, "lattice-samples", + // "generate samples from lattice, in same format as nbest list. Uses the file and size arguments, as in n-best-list"); + //AddParam(nbest_opts, "include-segmentation-in-n-best", + // "include phrasal segmentation in the n-best list. default is false"); //AddParam(nbest_opts, "print-alignment-info-in-n-best", // "Include word-to-word alignment in the n-best list. Word-to-word alignments are taken from the phrase table if any. Default is false"); @@ -289,8 +289,8 @@ Parameter::Parameter() AddParam(server_opts, "server", "Run moses as a translation server."); AddParam(server_opts, "server-port", "Port for moses server"); AddParam(server_opts, "server-log", "Log destination for moses server"); - AddParam(server_opts, "session-timeout", - "Timeout for sessions, e.g. '2h30m' or 1d (=24h)"); + //AddParam(server_opts, "session-timeout", + // "Timeout for sessions, e.g. '2h30m' or 1d (=24h)"); AddParam(server_opts, "session-cache-size", string("Max. number of sessions cached.") + "Least recently used session is dumped first."); @@ -317,12 +317,12 @@ Parameter::Parameter() "maximum num. of source word chart rules can consume (default 10)"); AddParam(chart_opts, "non-terminals", "list of non-term symbols, space separated"); - AddParam(chart_opts, "rule-limit", - "a little like table limit. But for chart decoding rules. Default is DEFAULT_MAX_TRANS_OPT_SIZE"); - AddParam(chart_opts, "source-label-overlap", - "What happens if a span already has a label. 0=add more. 1=replace. 2=discard. Default is 0"); - AddParam(chart_opts, "unknown-lhs", - "file containing target lhs of unknown words. 1 per line: LHS prob"); + //AddParam(chart_opts, "rule-limit", + // "a little like table limit. But for chart decoding rules. Default is DEFAULT_MAX_TRANS_OPT_SIZE"); + //AddParam(chart_opts, "source-label-overlap", + // "What happens if a span already has a label. 0=add more. 1=replace. 2=discard. Default is 0"); + //AddParam(chart_opts, "unknown-lhs", + // "file containing target lhs of unknown words. 1 per line: LHS prob"); po::options_description misc_opts("Miscellaneous Options"); AddParam(misc_opts, "mira", "do mira training"); @@ -330,18 +330,18 @@ Parameter::Parameter() "Source language, target language, description"); AddParam(misc_opts, "no-cache", "Disable all phrase-table caching. Default = false (ie. enable caching)"); - AddParam(misc_opts, "default-non-term-for-empty-range-only", - "Don't add [X] to all ranges, just ranges where there isn't a source non-term. Default = false (ie. add [X] everywhere)"); - AddParam(misc_opts, "s2t-parsing-algorithm", - "Which S2T parsing algorithm to use. 0=recursive CYK+, 1=scope-3 (default = 0)"); + //AddParam(misc_opts, "default-non-term-for-empty-range-only", + // "Don't add [X] to all ranges, just ranges where there isn't a source non-term. Default = false (ie. add [X] everywhere)"); + //AddParam(misc_opts, "s2t-parsing-algorithm", + // "Which S2T parsing algorithm to use. 0=recursive CYK+, 1=scope-3 (default = 0)"); //AddParam(o,"continue-partial-translation", "cpt", "start from nonempty hypothesis"); AddParam(misc_opts, "decoding-graph-backoff", "dpb", "only use subsequent decoding paths for unknown spans of given length"); AddParam(misc_opts, "references", "Reference file(s) - used for bleu score feature"); - AddParam(misc_opts, "recover-input-path", "r", - "(conf net/word lattice only) - recover input path corresponding to the best translation"); + //AddParam(misc_opts, "recover-input-path", "r", + // "(conf net/word lattice only) - recover input path corresponding to the best translation"); AddParam(misc_opts, "link-param-count", "Number of parameters on word links when using confusion networks or lattices (default = 1)"); AddParam(misc_opts, "description", -- cgit v1.2.3 From 7dd7ffa650746b2ca462ec804f323bdb97934c13 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Wed, 9 Nov 2016 01:05:21 +0000 Subject: comment out unused parameters.3 --- contrib/moses2/legacy/Parameter.cpp | 65 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/contrib/moses2/legacy/Parameter.cpp b/contrib/moses2/legacy/Parameter.cpp index 782c96e78..44e7cd56a 100644 --- a/contrib/moses2/legacy/Parameter.cpp +++ b/contrib/moses2/legacy/Parameter.cpp @@ -131,8 +131,8 @@ Parameter::Parameter() "do not reorder over punctuation"); //AddParam(disto_opts, "early-distortion-cost", "edc", // "include estimate of distortion cost yet to be incurred in the score [Moore & Quirk 2007]. Default is no"); - AddParam(disto_opts, "distortion", - "configurations for each factorized/lexicalized reordering model."); // zombie parameter? + //AddParam(disto_opts, "distortion", + // "configurations for each factorized/lexicalized reordering model."); // zombie parameter? // cube pruning po::options_description cube_opts("Cube pruning options."); @@ -183,10 +183,10 @@ Parameter::Parameter() "prefix to unknwon word when marked (default: 'UNK')"); AddParam(oov_opts, "unknown-word-suffix", "suffix to unknwon word when marked (default: '')"); - AddParam(oov_opts, "lmodel-oov-feature", - "add language model oov feature, one per model"); - AddParam(oov_opts, "output-unknowns", - "Output the unknown (OOV) words to the given file, one line per sentence"); + //AddParam(oov_opts, "lmodel-oov-feature", + // "add language model oov feature, one per model"); + //AddParam(oov_opts, "output-unknowns", + // "Output the unknown (OOV) words to the given file, one line per sentence"); //AddParam(oov_opts, "always-create-direct-transopt", // "Always create a translation that translates the source word ad-verbatim"); @@ -201,8 +201,8 @@ Parameter::Parameter() //AddParam(input_opts, "xml-brackets", "xb", // "specify strings to be used as xml tags opening and closing, e.g. \"{{ }}\" (default \"< >\"). Avoid square brackets because of configuration file format. Valid only with text input mode"); //AddParam(input_opts, "start-translation-id", "Id of 1st input. Default = 0"); - AddParam(input_opts, "alternate-weight-setting", "aws", - "alternate set of weights to used per xml specification"); + //AddParam(input_opts, "alternate-weight-setting", "aws", + // "alternate set of weights to used per xml specification"); /////////////////////////////////////////////////////////////////////////////////////// // output options @@ -216,7 +216,6 @@ Parameter::Parameter() // "output the sgml tag without any computation on that. Default is false"); //AddParam(output_opts, "print-passthrough-in-n-best", // "output the sgml tag without any computation on that in each entry of the n-best-list. Default is false"); - AddParam(output_opts, "output-factors", "list of factors in the output"); //AddParam(output_opts, "print-all-derivations", // "to print all derivations in search graph"); AddParam(output_opts, "translation-details", "T", @@ -270,8 +269,8 @@ Parameter::Parameter() // AddParam(nbest_opts,"n-best-list-size", "size of n-best-list to be generated; specify - as the file in order to write to STDOUT"); //AddParam(nbest_opts, "labeled-n-best-list", // "print out labels for each weight type in n-best list. default is true"); - AddParam(nbest_opts, "n-best-trees", - "Write n-best target-side trees to n-best-list"); + //AddParam(nbest_opts, "n-best-trees", + // "Write n-best target-side trees to n-best-list"); AddParam(nbest_opts, "n-best-factor", "factor to compute the maximum number of contenders (=factor*nbest-size). value 0 means infinity, i.e. no threshold. default is 0"); //AddParam(nbest_opts, "report-all-factors-in-n-best", @@ -291,9 +290,9 @@ Parameter::Parameter() AddParam(server_opts, "server-log", "Log destination for moses server"); //AddParam(server_opts, "session-timeout", // "Timeout for sessions, e.g. '2h30m' or 1d (=24h)"); - AddParam(server_opts, "session-cache-size", - string("Max. number of sessions cached.") - + "Least recently used session is dumped first."); + //AddParam(server_opts, "session-cache-size", + // string("Max. number of sessions cached.") + // + "Least recently used session is dumped first."); AddParam(server_opts, "serial", "Run server in serial mode, processing only one request at a time."); @@ -309,14 +308,14 @@ Parameter::Parameter() "Max. number of seconds the server will wait for a client to submit a request once a connection has been established."); po::options_description irstlm_opts("IRSTLM Options"); - AddParam(irstlm_opts, "clean-lm-cache", - "clean language model caches after N translations (default N=1)"); + //AddParam(irstlm_opts, "clean-lm-cache", + // "clean language model caches after N translations (default N=1)"); po::options_description chart_opts("Chart Decoding Options"); AddParam(chart_opts, "max-chart-span", "maximum num. of source word chart rules can consume (default 10)"); - AddParam(chart_opts, "non-terminals", - "list of non-term symbols, space separated"); + //AddParam(chart_opts, "non-terminals", + // "list of non-term symbols, space separated"); //AddParam(chart_opts, "rule-limit", // "a little like table limit. But for chart decoding rules. Default is DEFAULT_MAX_TRANS_OPT_SIZE"); //AddParam(chart_opts, "source-label-overlap", @@ -325,11 +324,11 @@ Parameter::Parameter() // "file containing target lhs of unknown words. 1 per line: LHS prob"); po::options_description misc_opts("Miscellaneous Options"); - AddParam(misc_opts, "mira", "do mira training"); - AddParam(misc_opts, "description", - "Source language, target language, description"); - AddParam(misc_opts, "no-cache", - "Disable all phrase-table caching. Default = false (ie. enable caching)"); + //AddParam(misc_opts, "mira", "do mira training"); + //AddParam(misc_opts, "description", + // "Source language, target language, description"); + //AddParam(misc_opts, "no-cache", + // "Disable all phrase-table caching. Default = false (ie. enable caching)"); //AddParam(misc_opts, "default-non-term-for-empty-range-only", // "Don't add [X] to all ranges, just ranges where there isn't a source non-term. Default = false (ie. add [X] everywhere)"); //AddParam(misc_opts, "s2t-parsing-algorithm", @@ -338,16 +337,14 @@ Parameter::Parameter() //AddParam(o,"continue-partial-translation", "cpt", "start from nonempty hypothesis"); AddParam(misc_opts, "decoding-graph-backoff", "dpb", "only use subsequent decoding paths for unknown spans of given length"); - AddParam(misc_opts, "references", - "Reference file(s) - used for bleu score feature"); + //AddParam(misc_opts, "references", + // "Reference file(s) - used for bleu score feature"); //AddParam(misc_opts, "recover-input-path", "r", // "(conf net/word lattice only) - recover input path corresponding to the best translation"); - AddParam(misc_opts, "link-param-count", - "Number of parameters on word links when using confusion networks or lattices (default = 1)"); - AddParam(misc_opts, "description", - "Source language, target language, description"); - AddParam(misc_opts, "feature-name-overwrite", - "Override feature name (NOT arguments). Eg. SRILM-->KENLM, PhraseDictionaryMemory-->PhraseDictionaryScope3"); + //AddParam(misc_opts, "link-param-count", + // "Number of parameters on word links when using confusion networks or lattices (default = 1)"); + //AddParam(misc_opts, "feature-name-overwrite", + // "Override feature name (NOT arguments). Eg. SRILM-->KENLM, PhraseDictionaryMemory-->PhraseDictionaryScope3"); AddParam(misc_opts, "feature", "All the feature functions should be here"); //AddParam(misc_opts, "context-string", @@ -376,6 +373,7 @@ Parameter::Parameter() /////////////////////////////////////////////////////////////////////////////////////// // DEPRECATED options po::options_description deprec_opts("Deprecated Options"); + /* AddParam(deprec_opts, "link-param-count", "DEPRECATED. DO NOT USE. Number of parameters on word links when using confusion networks or lattices (default = 1)"); AddParam(deprec_opts, "weight-slm", "slm", @@ -451,10 +449,11 @@ Parameter::Parameter() "DEPRECATED. DO NOT USE. Count feature for each unaligned source word"); AddParam(deprec_opts, "word-translation-feature", "DEPRECATED. DO NOT USE. Count feature for word translation according to word alignment"); + */ po::options_description zombie_opts("Zombie Options"); - AddParam(zombie_opts, "distortion-file", - "source factors (0 if table independent of source), target factors, location of the factorized/lexicalized reordering tables"); + //AddParam(zombie_opts, "distortion-file", + // "source factors (0 if table independent of source), target factors, location of the factorized/lexicalized reordering tables"); mbr_opts.add(lmbr_opts); search_opts.add(cube_opts); -- cgit v1.2.3 From 8c4c00f525ab42653e71ca8d4064b3adfa5ef073 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Wed, 9 Nov 2016 01:15:10 +0000 Subject: comment out unused parameters.4 --- contrib/moses2/legacy/Parameter.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/contrib/moses2/legacy/Parameter.cpp b/contrib/moses2/legacy/Parameter.cpp index 44e7cd56a..cbfcfa2f3 100644 --- a/contrib/moses2/legacy/Parameter.cpp +++ b/contrib/moses2/legacy/Parameter.cpp @@ -360,15 +360,15 @@ Parameter::Parameter() // Compact phrase table and reordering table. po::options_description cpt_opts( "Options when using compact phrase and reordering tables."); - AddParam(cpt_opts, "minphr-memory", - "Load phrase table in minphr format into memory"); - AddParam(cpt_opts, "minlexr-memory", - "Load lexical reordering table in minlexr format into memory"); + //AddParam(cpt_opts, "minphr-memory", + // "Load phrase table in minphr format into memory"); + //AddParam(cpt_opts, "minlexr-memory", + // "Load lexical reordering table in minlexr format into memory"); po::options_description spe_opts("Simulated Post-editing Options"); - AddParam(spe_opts, "spe-src", "Simulated post-editing. Source filename"); - AddParam(spe_opts, "spe-trg", "Simulated post-editing. Target filename"); - AddParam(spe_opts, "spe-aln", "Simulated post-editing. Alignment filename"); + //AddParam(spe_opts, "spe-src", "Simulated post-editing. Source filename"); + //AddParam(spe_opts, "spe-trg", "Simulated post-editing. Target filename"); + //AddParam(spe_opts, "spe-aln", "Simulated post-editing. Alignment filename"); /////////////////////////////////////////////////////////////////////////////////////// // DEPRECATED options @@ -455,16 +455,16 @@ Parameter::Parameter() //AddParam(zombie_opts, "distortion-file", // "source factors (0 if table independent of source), target factors, location of the factorized/lexicalized reordering tables"); - mbr_opts.add(lmbr_opts); + //mbr_opts.add(lmbr_opts); search_opts.add(cube_opts); - search_opts.add(mbr_opts); + //search_opts.add(mbr_opts); search_opts.add(disto_opts); search_opts.add(chart_opts); - input_opts.add(spe_opts); + //input_opts.add(spe_opts); output_opts.add(nbest_opts); - output_opts.add(osg_opts); + //output_opts.add(osg_opts); m_options.add(main_opts); m_options.add(server_opts); @@ -473,12 +473,12 @@ Parameter::Parameter() m_options.add(output_opts); m_options.add(oov_opts); m_options.add(factor_opts); - m_options.add(cpt_opts); - m_options.add(irstlm_opts); + //m_options.add(cpt_opts); + //m_options.add(irstlm_opts); m_options.add(tune_opts); m_options.add(misc_opts); - m_options.add(deprec_opts); - m_options.add(zombie_opts); + //m_options.add(deprec_opts); + //m_options.add(zombie_opts); } -- cgit v1.2.3 From 81fac338b1bfbdb0b2e4fd999300d31c2c136a03 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Wed, 9 Nov 2016 04:03:28 +0000 Subject: add back [non-termninals]. Unimplemented but used by regressions tests, and probably by any SCFG model --- contrib/moses2/legacy/Parameter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/moses2/legacy/Parameter.cpp b/contrib/moses2/legacy/Parameter.cpp index 44e7cd56a..9bb5b2066 100644 --- a/contrib/moses2/legacy/Parameter.cpp +++ b/contrib/moses2/legacy/Parameter.cpp @@ -314,8 +314,8 @@ Parameter::Parameter() po::options_description chart_opts("Chart Decoding Options"); AddParam(chart_opts, "max-chart-span", "maximum num. of source word chart rules can consume (default 10)"); - //AddParam(chart_opts, "non-terminals", - // "list of non-term symbols, space separated"); + AddParam(chart_opts, "non-terminals", + "list of non-term symbols, space separated"); //AddParam(chart_opts, "rule-limit", // "a little like table limit. But for chart decoding rules. Default is DEFAULT_MAX_TRANS_OPT_SIZE"); //AddParam(chart_opts, "source-label-overlap", -- cgit v1.2.3 From d428a75c1e1a944cfcbfc1b9220305f5795f8dee Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Wed, 9 Nov 2016 04:18:25 +0000 Subject: touch --- BUILD-INSTRUCTIONS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD-INSTRUCTIONS.txt b/BUILD-INSTRUCTIONS.txt index 7b9bc3a8a..a41582bfa 100644 --- a/BUILD-INSTRUCTIONS.txt +++ b/BUILD-INSTRUCTIONS.txt @@ -7,3 +7,4 @@ into the source tree from elsewhere: * "bjam-files" is taken from Boost. * "util" and "lm" are taken from KenLM: https://github.com/kpu/kenlm + -- cgit v1.2.3