diff options
author | Michael Denkowski <mdenkows@cs.cmu.edu> | 2014-05-02 12:08:52 -0700 |
---|---|---|
committer | Michael Denkowski <mdenkows@cs.cmu.edu> | 2014-05-02 12:08:52 -0700 |
commit | 584e9ccb9cd306626b450962b391c1e521ce206d (patch) | |
tree | 20c83897f71368ff1dbcd2fe2c3261f28105cb1c /realtime/mkconfig.py | |
parent | 1400adb9f5e8ebf8ea1658d658893f0731b6fc22 (diff) |
Automatically generate some rt.ini options
Diffstat (limited to 'realtime/mkconfig.py')
-rwxr-xr-x | realtime/mkconfig.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/realtime/mkconfig.py b/realtime/mkconfig.py index 71944080..f9938051 100755 --- a/realtime/mkconfig.py +++ b/realtime/mkconfig.py @@ -59,9 +59,14 @@ def main(): shutil.copy(weights_final, os.path.join(output_d, 'weights.final')) # other options - # TODO: automatically set some things here - with open(os.path.join(output_d, 'rt.ini'), 'w') as rt_ini: - pass + rt_ini = os.path.join(output_d, 'rt.ini') + with open(rt_ini, 'w') as out: + if libcdec_ff_hpyplm_so and corpus_hpyplm: + out.write('hpyplm=true\n') + else: + out.write('hpyplm=false\n') + out.write('metric=ibm_bleu\n') + sys.stderr.write('IMPORTANT: add any additional options such as metric=meteor to {}\n'.format(rt_ini)) if __name__ == '__main__': main() |