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

Method PrefixTreeMatch

logparser/Spell/Spell.py:109–122  ·  view source on GitHub ↗
(self, parentn, seq, idx)

Source from the content-addressed store, hash-verified

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

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected