summaryrefslogtreecommitdiff
path: root/python/pkg/cdec/sa/extract.py
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-08-03 14:55:18 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-08-03 14:55:18 -0400
commit611501431a53e507cdc15bb091d3bcc94ca7f39d (patch)
treeba558701bf07148a45a092a362e9ff1367f4e11e /python/pkg/cdec/sa/extract.py
parentbe1ab0a8937f9c5668ea5e6c31b798e87672e55e (diff)
[python] Fix some details in cdec.sa tools
Diffstat (limited to 'python/pkg/cdec/sa/extract.py')
-rw-r--r--python/pkg/cdec/sa/extract.py2
1 files changed, 1 insertions, 1 deletions
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()