summaryrefslogtreecommitdiff
path: root/util/cdec2json.py
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-07-19 08:30:43 +0200
committerPatrick Simianer <p@simianer.de>2014-07-19 08:30:43 +0200
commitf219bab21c07d02e7e54d557e23387bd93c9ce5f (patch)
tree14a6e2b647a3b1ab11391c154fbcf7c63841f8db /util/cdec2json.py
parent6208c48407c359819945730006edf4c402b7ff77 (diff)
hg io
Diffstat (limited to 'util/cdec2json.py')
-rwxr-xr-xutil/cdec2json.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cdec2json.py b/util/cdec2json.py
index ac468ca..606caa4 100755
--- a/util/cdec2json.py
+++ b/util/cdec2json.py
@@ -25,7 +25,7 @@ def hg2json(hg, weights):
a = []
a.append( '{ "id":0, "cat":"root", "span":[-1,-1] }' )
for i in hg.nodes:
- a.append('{ "id":%d, "cat":"%s", "span":[%d,%d] }'%(i.id, i.cat, i.span[0], i.span[1]))
+ a.append('{ "id":%d, "cat":"%s", "span":[%d,%d] }'%(i.id+1, i.cat, i.span[0], i.span[1]))
res += ",\n".join(a)+"\n"
res += "],\n"
res += '"edges":'+"\n"