Simple HMM implementation with binning to unknown words model