Compute IDF.