The weight to each term t in the document d. The simplest approach is the number of occurrences of term t in document d. However, I implemented it with this formula:
The number of documents in a collection that contains the term t.
A rare term t is assigned a heavy weight, whereas a frequent term is assigned a light weight.