Implementation of Hidden Markov Model and Viterbi algorithm for PHP