summaryrefslogtreecommitdiff
path: root/realtime
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2014-05-08 20:23:42 -0400
committerChris Dyer <redpony@gmail.com>2014-05-08 20:23:42 -0400
commit6d3490279cace80e202f277f9f3214edd09da8ad (patch)
tree7ada55543a45ea3b52b3dc3405db12b64555fc03 /realtime
parentaa9d5d402c01e45835878c02777442950a0f6c0a (diff)
parent3cec93d6df6190c486fc57dfe25661b24d9fa75e (diff)
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'realtime')
-rwxr-xr-xrealtime/mkconfig.py11
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()