| 187 | parentn.logClust = newCluster |
| 188 | |
| 189 | def removeSeqFromPrefixTree(self, rootn, newCluster): |
| 190 | parentn = rootn |
| 191 | seq = newCluster.logTemplate |
| 192 | seq = [w for w in seq if w != "<*>"] |
| 193 | |
| 194 | for tokenInSeq in seq: |
| 195 | if tokenInSeq in parentn.childD: |
| 196 | matchedNode = parentn.childD[tokenInSeq] |
| 197 | if matchedNode.templateNo == 1: |
| 198 | del parentn.childD[tokenInSeq] |
| 199 | break |
| 200 | else: |
| 201 | matchedNode.templateNo -= 1 |
| 202 | parentn = matchedNode |
| 203 | |
| 204 | def outputResult(self, logClustL): |
| 205 | templates = [0] * self.df_log.shape[0] |