diff options
author | Jacob <andqso@gmail.com> | 2013-07-28 09:54:54 +0100 |
---|---|---|
committer | Jacob <andqso@gmail.com> | 2013-07-28 09:54:54 +0100 |
commit | f343459d6198352964dbb6779f15c352fe2d5794 (patch) | |
tree | 07d50c9a8269e3892ccea8f5680b3e2bac984fce /src/smt_semparse_config.py |
init
Diffstat (limited to 'src/smt_semparse_config.py')
-rw-r--r-- | src/smt_semparse_config.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/smt_semparse_config.py b/src/smt_semparse_config.py new file mode 100644 index 0000000..71eaf24 --- /dev/null +++ b/src/smt_semparse_config.py @@ -0,0 +1,31 @@ +from config import Config + +class SMTSemparseConfig(Config): + + def __init__(self, settings_path, dependencies_path): + Config.__init__(self, settings_path, dependencies_path) + + self.put('data_dir', '%s/data/%s' % (self.smt_semparse, self.corpus)) + + if self.np: + self.train_name = 'train.np' + else: + self.train_name = 'train' + + self.put('srilm_ngram_count', '%s/bin/%s/ngram-count' % \ + (self.srilm, self.srilm_arch)) + + self.put('moses_train', '%s/scripts/training/train-model.perl' % self.moses) + self.put('moses_tune', '%s/scripts/training/mert-moses.pl' % self.moses) + self.put('moses_decode_phrase', '%s/dist/bin/moses' % self.moses) + self.put('moses_decode_hier', '%s/dist/bin/moses_chart' % self.moses) + self.put('bleu_eval', '%s/scripts/generic/multi-bleu.perl' % self.moses) + + self.put('wasp_eval', '%s/data/geo-funql/eval/eval.pl' % self.wasp) + + if self.nlg: + self.put('src', 'mrl') + self.put('tgt', 'nl') + else: + self.put('src', 'nl') + self.put('tgt', 'mrl') |