Semantic feature extraction with multidimensional hidden Markov model