SMS dit: Inference in hidden Markov models