diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-08-07 15:34:48 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-08-07 15:34:48 +0200 |
commit | 4dd5216d3afa9ab72b150e250a3c30a5f223ce53 (patch) | |
tree | 440656fdee4da004aff430628fba74f581dd317c /python/pkg/cdec/sa | |
parent | b6d085d66decb602e88f32fb5cef27b10e83e69e (diff) | |
parent | 805213bdb54474e2d3c67d2ac647b9365ff21415 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/pkg/cdec/sa')
-rw-r--r-- | python/pkg/cdec/sa/compile.py | 10 | ||||
-rw-r--r-- | python/pkg/cdec/sa/extract.py | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/python/pkg/cdec/sa/compile.py b/python/pkg/cdec/sa/compile.py index 2a89243b..393c72a4 100644 --- a/python/pkg/cdec/sa/compile.py +++ b/python/pkg/cdec/sa/compile.py @@ -93,11 +93,11 @@ def main(): # Write configuration config = cdec.configobj.ConfigObj(args.config, unrepr=True) - config['f_sa_file'] = f_sa_bin - config['e_file'] = e_bin - config['a_file'] = a_bin - config['lex_file'] = lex_bin - config['precompute_file'] = precomp_bin + 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() diff --git a/python/pkg/cdec/sa/extract.py b/python/pkg/cdec/sa/extract.py index 918aa3bb..875bf42e 100644 --- a/python/pkg/cdec/sa/extract.py +++ b/python/pkg/cdec/sa/extract.py @@ -25,7 +25,7 @@ def main(): for rule in extractor.grammar(sentence): output.write(str(rule)+'\n') grammar_file = os.path.abspath(grammar_file) - print('<seg grammar="{0}">{1}</seg>'.format(grammar_file, sentence)) + print('<seg grammar="{0}" id="{1}">{2}</seg>'.format(grammar_file, i, sentence)) if __name__ == '__main__': main() |