
Term frequency is a count of how often a word appears in one document. A word that appears ten times in that document has a higher count than a word that appears once. The count is about this document alone.
On its own, the count treats a common word the same as a rare one. Multiplying by Inverse Document Frequency (IDF) reduces the words that appear in almost every document. The combined score is Term Frequency – Inverse Document Frequency (TF-IDF).
What the Count Includes
- This document only. Appearances in other documents do not raise the count.
- Repeated words. Each additional appearance in the same document raises the count.
- No rarity yet. A word used in every document can still have a high count here.
Count in One Document and Weight Across the Set
| Compared | Count in One Document | Weight Across the Set |
| What it measures | How often the word appears here | How few documents contain the word at all |
| A word in every document | Can still be high | Falls toward zero |
| Used alone | Ranks documents by raw repetition | Ranks words by rarity |