Similarity-based classification of sequences using Hidden Markov Models