Implementations of spectral learning algorithms for hidden Markov models