I am trying to build an anomaly detection algorithm for log files content. The main feature I need is to build some sort of state machine or Markov chain which will define t