An expectation-maximization algorithm for training hidden Markov models when latent states are unobserved.