| 78 | return result |
| 79 | |
| 80 | def SimpleLoopMatch(self, logClustL, seq): |
| 81 | for logClust in logClustL: |
| 82 | if float(len(logClust.logTemplate)) < 0.5 * len(seq): |
| 83 | continue |
| 84 | # Check the template is a subsequence of seq (we use set checking as a proxy here for speedup since |
| 85 | # incorrect-ordering bad cases rarely occur in logs) |
| 86 | token_set = set(seq) |
| 87 | if all(token in token_set or token == '<*>' for token in logClust.logTemplate): |
| 88 | return logClust |
| 89 | return None |
| 90 | |
| 91 | def PrefixTreeMatch(self, parentn, seq, idx): |
| 92 | retLogClust = None |