Added template for tf idf problem.