| 107 | return None |
| 108 | |
| 109 | def PrefixTreeMatch(self, parentn, seq, idx): |
| 110 | retLogClust = None |
| 111 | length = len(seq) |
| 112 | for i in range(idx, length): |
| 113 | if seq[i] in parentn.childD: |
| 114 | childn = parentn.childD[seq[i]] |
| 115 | if childn.logClust is not None: |
| 116 | constLM = [w for w in childn.logClust.logTemplate if w != "<*>"] |
| 117 | if float(len(constLM)) >= self.tau * length: |
| 118 | return childn.logClust |
| 119 | else: |
| 120 | return self.PrefixTreeMatch(childn, seq, i + 1) |
| 121 | |
| 122 | return retLogClust |
| 123 | |
| 124 | def LCSMatch(self, logClustL, seq): |
| 125 | retLogClust = None |