From f219bab21c07d02e7e54d557e23387bd93c9ce5f Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Sat, 19 Jul 2014 08:30:43 +0200 Subject: hg io --- util/cdec2json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/cdec2json.py') 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" -- cgit v1.2.3