This (horrid) hack reads cdec's "--show_derivations" and "--extract_rules" into data structures and tries to align "groups" in source and target sides of rules in a smart, presentable way. The result resembles a phrase-based system, given that the word alignment gives enough hints. To run: ./derivation_to_json.rb <