use pig to calculate idf