From de3137d5dbb2dadd799312e1d2b3cb6ddce4a23d Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Sun, 1 Jun 2014 23:19:59 +0200 Subject: hg2json.py: add rule and span to json output --- hg2json.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hg2json.py b/hg2json.py index 5bd5c2c..fc9ba2b 100755 --- a/hg2json.py +++ b/hg2json.py @@ -30,6 +30,9 @@ def hg2json(hg, weights): for i in hg.edges: s = "{" s += '"head":"%s"'%(i.head_node.id) + s += ', "rule":"%s"'%(i.trule) + s += ', "left":%d'%(i.span[0]) + s += ', "right":%d'%(i.span[1]) xs = ' "f":{' b = [] for j in i.feature_values: -- cgit v1.2.3