From 7eba58b942e7da32f523d900b4cafc1eee1cd3de Mon Sep 17 00:00:00 2001 From: Phil Williams Date: Tue, 10 Mar 2015 10:20:19 +0000 Subject: [PATCH] EMS: add TRAINING:dont-tune-glue-grammar option Adds -dont-tune-glue-grammar to train-model.perl command during config file generation step. This is preferable to manually adding -dont-tune-glue-grammar to TRAINING:training-options because changing its value won't trigger a re-run of dependent steps that don't really need re-running (like word alignment). --- scripts/ems/experiment.meta | 8 ++++---- scripts/ems/experiment.perl | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/ems/experiment.meta b/scripts/ems/experiment.meta index 6ee4de082..44c265ba0 100644 --- a/scripts/ems/experiment.meta +++ b/scripts/ems/experiment.meta @@ -654,7 +654,7 @@ create-config in: sigtest-filter-reordering-table sigtest-filter-phrase-translation-table transliteration-table generation-table sparse corpus-mml-prefilter=OR=corpus-mml-postfilter=OR=domains osm-model INTERPOLATED-LM:binlm LM:binlm out: config ignore-if: use-hiero thot - rerun-on-change: decoding-steps alignment-factors translation-factors reordering-factors generation-factors lexicalized-reordering training-options script decoding-graph-backoff score-settings additional-ini mmsapt no-glue-grammar + rerun-on-change: decoding-steps alignment-factors translation-factors reordering-factors generation-factors lexicalized-reordering training-options script decoding-graph-backoff score-settings additional-ini mmsapt no-glue-grammar dont-tune-glue-grammar default-name: model/moses.ini error: Unknown option final-model: yes @@ -956,14 +956,14 @@ filter in: input TRAINING:sigtest-filter-phrase-translation-table TRAINING:sigtest-filter-reordering-table TRAINING:corpus-mml-prefilter=OR=TRAINING:corpus-mml-postfilter=OR=TRAINING:domains TRAINING:transliteration-table out: filtered-dir default-name: tuning/filtered - rerun-on-change: filter-settings ttable-binarizer TRAINING:no-glue-grammar + rerun-on-change: filter-settings ttable-binarizer TRAINING:no-glue-grammar TRAINING:dont-tune-glue-grammar ignore-if: TRAINING:binarize-all error: already exists. Please delete filter-devtest in: input-devtest TRAINING:sigtest-filter-phrase-translation-table TRAINING:sigtest-filter-reordering-table out: filtered-dir-devtest default-name: tuning/filtered.devtest - rerun-on-change: filter-settings ttable-binarizer TRAINING:no-glue-grammar + rerun-on-change: filter-settings ttable-binarizer TRAINING:no-glue-grammar TRAINING:dont-tune-glue-grammar ignore-if: TRAINING:binarize-all ignore-unless: use-mira error: already exists. Please delete @@ -1099,7 +1099,7 @@ filter in: input TRAINING:sigtest-filter-phrase-translation-table TRAINING:sigtest-filter-reordering-table TRAINING:corpus-mml-prefilter=OR=TRAINING:corpus-mml-postfilter=OR=TRAINING:domains TRAINING:transliteration-table out: filtered-dir default-name: evaluation/filtered - rerun-on-change: filter-settings report-precision-by-coverage ttable-binarizer TRAINING:no-glue-grammar + rerun-on-change: filter-settings report-precision-by-coverage ttable-binarizer TRAINING:no-glue-grammar TRAINING:dont-tune-glue-grammar pass-if: TRAINING:binarize-all ignore-if: use-hiero error: already exists. Please delete diff --git a/scripts/ems/experiment.perl b/scripts/ems/experiment.perl index 247cd9ca1..f768bca33 100755 --- a/scripts/ems/experiment.perl +++ b/scripts/ems/experiment.perl @@ -2449,6 +2449,9 @@ sub get_config_tables { unless $glue_grammar_file; $cmd .= "-glue-grammar-file $glue_grammar_file "; } + if (&get("TRAINING:dont-tune-glue-grammar")) { + $cmd .= "-dont-tune-glue-grammar "; + } } # additional settings for syntax models