IMPLEMENTATION OF HIDDEN SEMI-MARKOV MODELS