A Hidden Markov Model implementation in Javascript