add the class realted tf idf tools and test case