Ruby HMM training and analysis prototype.