Text this: Finding the optimal way to build an information security system based on Markov chains