Compute Term Frequency