initiated tf-idf calculation