Yield tuples of matched positions as (qstart, [(rule_length, rule_id), ...). Match `tokens` sequence of token ids starting at the `qbegin` absolute query start position position using the `automaton`.
(tokens, qbegin, automaton, len_start=SMALL_RULE)
| 315 | |
| 316 | |
| 317 | def get_matched_starts(tokens, qbegin, automaton, len_start=SMALL_RULE): |
| 318 | """ |
| 319 | Yield tuples of matched positions as (qstart, [(rule_length, rule_id), ...). |
| 320 | Match `tokens` sequence of token ids starting at the `qbegin` absolute query |
| 321 | start position position using the `automaton`. |
| 322 | """ |
| 323 | for qend, values in get_matches(tokens, qbegin, automaton): |
| 324 | qstart = qend - len_start |
| 325 | yield qstart, values |
no test coverage detected