Text this: Dynamic risk management with Markov decision processes