Component-based discriminative classification for Hidden Markov Models