code: public static double idf(double totalDocs, double numTimesWordAppearedInADocument) {
          //return totalDocs > 0 ? Math.log10(totalDocs/numTimesWordAppearedInADocument) : 0;
          if (totalDocs == 0)
              return 0;
          double idf = Math.log10(totalDocs / numTimesWordAppearedInADocument);
          return idf;
      }
docs: Inverse document frequency: the total docs divided by the number of times the word
  appeared in a document
  @param totalDocs the total documents for the data applyTransformToDestination
  @param numTimesWordAppearedInADocument the number of times the word occurred in a document
  @return log(10) (totalDocs/numTImesWordAppearedInADocument)