TF-IDF measures how frequently words appear in documents and the relative frequency across the set of documents. This information can be used in building classifiers and predictive models. The examples are spam classification, chat conversations, and so on.