return a mapping of `MatchResult`s to their index among all matches, sorted by the start position of the `MatchResult`
(self)
| 926 | self.groups[0].results.sort(key=lambda mr: mr.start) |
| 927 | |
| 928 | def _result_index(self): |
| 929 | """return a mapping of `MatchResult`s to their index among all |
| 930 | matches, sorted by the start position of the `MatchResult`""" |
| 931 | d = {} |
| 932 | i = 0 |
| 933 | for result in sorted(self.all_matches, key=lambda mr: mr.start): |
| 934 | d[result] = i |
| 935 | i += 1 |
| 936 | return d |
| 937 | |
| 938 | def _merge_adjacent(self, matches): |
| 939 | merged = [] |