Return the ispan density of this match as a ratio of its rule-side matched length to its rule side magnitude. This is a float between 0 and 1. A dense match has all its matched rule tokens contiguous and a maximum idensity of one. A sparse low idensity match has some
(self)
| 579 | return mlen / qmagnitude |
| 580 | |
| 581 | def idensity(self): |
| 582 | """ |
| 583 | Return the ispan density of this match as a ratio of its rule-side |
| 584 | matched length to its rule side magnitude. This is a float between 0 and |
| 585 | 1. A dense match has all its matched rule tokens contiguous and a |
| 586 | maximum idensity of one. A sparse low idensity match has some non- |
| 587 | contiguous matched rule tokens interspersed between matched rule tokens. |
| 588 | An empty match has a zero qdensity. |
| 589 | """ |
| 590 | return self.ispan.density() |
| 591 | |
| 592 | def score(self): |
| 593 | """ |
no test coverage detected