Hidden Markov Models, or HMMs for short, have been recently used in Bioinformatics for the classification of DNA or protein chains, giving rise to what is known as Profile Hidden Markov Models. In this paper, we show that these models can also be adapted to the problem of classifying misspelled words by identifying its primary structure through statistical tools. This process leads to a new learning algorithm which is based in the parametrization of the set of recognizable words in order to detect any misspelled form of these words. As an application, a method to classify spam mails by means of the detection of the adulterated words, from a blacklist of words frequently used by spammers, is described. Ó 2006 Elsevier Ltd. All rights reserved.