MCPcopy Create free account
hub / github.com/logpai/logparser / removeSeqFromPrefixTree

Method removeSeqFromPrefixTree

logparser/Spell/Spell.py:189–202  ·  view source on GitHub ↗
(self, rootn, newCluster)

Source from the content-addressed store, hash-verified

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]

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected