code: public double rank(int tf, int maxtf, long N, long n) {
          if (tf == 0) return 0.0;
  
          return (a + (1-a) * tf / maxtf) * Math.log((double) N / n);
      }
docs: Returns a relevance score between a term and a document based on a corpus.
  @param tf the frequency of searching term in the document to rank.
  @param maxtf the maximum frequency over all terms in the document.
  @param N the number of documents in the corpus.
  @param n the number of documents containing the given term in the corpus;