cort
cort copied to clipboard
Collins head finder iterator should be a list instead?
I noticed some discrepancies between the 2 different traversal orders.
reversed() on line 108 returns an iterator and if it gets exhausted in the first iteration of the loop on 111, the subsequent result is incorrect.
https://github.com/smartschat/cort/blob/2349f0308a4115acb89d442fe945533bdb3b70e2/cort/core/head_finders.py#L107-L112
Suggest to change from
to_traverse = reversed(tree)
to
to_traverse = list(reversed(tree) )