Implement the Idf measure