(self)
| 545 | print() |
| 546 | |
| 547 | def refine_runs(self): |
| 548 | # TODO: move me to the approximate matching loop so that this is done |
| 549 | # only if neeed rebreak query runs based on potential rule boundaries |
| 550 | query_runs = list(chain.from_iterable( |
| 551 | break_on_boundaries(qr) for qr in self.query_runs)) |
| 552 | |
| 553 | if TRACE_QR_BREAK: |
| 554 | logger_debug( |
| 555 | 'Initial # query runs:', len(self.query_runs), |
| 556 | 'after breaking:', len(query_runs), |
| 557 | ) |
| 558 | |
| 559 | self.query_runs = query_runs |
| 560 | |
| 561 | if TRACE_QR: |
| 562 | print() |
| 563 | logger_debug('FINAL Query runs for query:', self.location) |
| 564 | for qr in self.query_runs: |
| 565 | print(' ' , repr(qr)) |
| 566 | print() |
| 567 | |
| 568 | def _tokenize_and_build_runs(self, tokens_by_line, line_threshold=4): |
| 569 | len_legalese = self.idx.len_legalese |
no test coverage detected