TF-IDF is short for term frequency–inverse document frequency. TF-IDF is a way to measure how important a word is to a document. The TF measures how frequently a term appears in a documentThe IDF measures how important a term is.
The TF-IDF value increases in relation to the number of times a word appears in the document and is offset by the number of existing documents that contain the word. It’s often used in text-mining and information retrieval.