summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhg2json.py3
1 files changed, 3 insertions, 0 deletions
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: