It calculates TF by considering three basics. First is the raw count of instances of a keyword. Second is the raw frequency of the most common word. Finally, third is the raw count adjusted for document length.