summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2013-11-10 01:23:56 -0500
committerChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2013-11-10 01:23:56 -0500
commitda179c9cbe92d93c5e7bfb1dbe1b3bec2c7791b9 (patch)
tree3b2c2cb1af9e59c6d352801f92190bae737e7b63 /python
parent3abb2f590940e05be345446a10e5f247f0046c2a (diff)
small fixes
Diffstat (limited to 'python')
-rw-r--r--python/cdec/sa/compile.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/python/cdec/sa/compile.py b/python/cdec/sa/compile.py
index d4cd8387..caa93f8b 100644
--- a/python/cdec/sa/compile.py
+++ b/python/cdec/sa/compile.py
@@ -75,6 +75,13 @@ def main():
a_bin = os.path.join(args.output, 'a.bin')
lex_bin = os.path.join(args.output, 'lex.bin')
+ config = cdec.configobj.ConfigObj(args.config, unrepr=True)
+ config['f_sa_file'] = os.path.abspath(f_sa_bin)
+ config['e_file'] = os.path.abspath(e_bin)
+ config['a_file'] = os.path.abspath(a_bin)
+ config['lex_file'] = os.path.abspath(lex_bin)
+ config['precompute_file'] = os.path.abspath(precomp_bin)
+
start_time = monitor_cpu()
logger.info('Compiling source suffix array')
if args.bitext:
@@ -116,12 +123,6 @@ def main():
logger.info('Compiling bilexical dictionary took %f seconds', stop_time - start_time)
# Write configuration
- config = cdec.configobj.ConfigObj(args.config, unrepr=True)
- config['f_sa_file'] = os.path.abspath(f_sa_bin)
- config['e_file'] = os.path.abspath(e_bin)
- config['a_file'] = os.path.abspath(a_bin)
- config['lex_file'] = os.path.abspath(lex_bin)
- config['precompute_file'] = os.path.abspath(precomp_bin)
for name, value in zip(param_names, params):
config[name] = value
config.write()