Navigation Menu

Skip to content

Commit

Permalink
[python] Fix some details in cdec.sa tools
Browse files Browse the repository at this point in the history
  • Loading branch information
vchahun committed Aug 3, 2012
1 parent be1ab0a commit 6115014
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions python/pkg/cdec/sa/compile.py
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion python/pkg/cdec/sa/extract.py
Expand Up @@ -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()

0 comments on commit 6115014

Please sign in to comment.