Added tf-idf calculation to the mapper.