Made function to calculate TF IDF
merged