Implemented TF-IDF prediction engine