[BUG FIXING] - TF & IDF calculation

Now, the calculation of TF and IDF is checking if the term frequency is
0.

The calculation of these values were extracted to methods.