diff options
author | Patrick Simianer <p@simianer.de> | 2014-06-01 23:19:59 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-06-01 23:19:59 +0200 |
commit | de3137d5dbb2dadd799312e1d2b3cb6ddce4a23d (patch) | |
tree | 5fa987e9fd56a432e8e113c7468df271dfeef2f0 | |
parent | 4921f3e8938b5c219b0481870e1b33b291659bd5 (diff) |
hg2json.py: add rule and span to json output
-rwxr-xr-x | hg2json.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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: |