goodmami / penman

PENMAN notation (e.g. AMR) in Python
https://penman.readthedocs.io/
MIT License
139 stars 27 forks source link

Make sorting functions work on roles instead of branches #53

Closed goodmami closed 4 years ago

goodmami commented 4 years ago

The sorting functions in penman.model.Model accept a Branch and return a sort key. This is because they are used to rearrange trees. But so far they only use the role of a branch and not the target. While having the target available is more powerful, it may be unnecessary, and if we want to be able to sort triples during reconfiguration (see #52), it would be more useful to work only on the role as both branches and triples have roles.

There are some differences between branch roles and triple roles: