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);
    }
@Test
    public void testRank() {
        System.out.println("rank");
        int freq = 3;
        int maxFreq = 10;
        int N = 10000000;
        int n = 1000;
        TFIDF instance = new TFIDF();
        double expResult = 5.341997;
        double result = instance.rank(freq, maxFreq, N, n);
        assertEquals(expResult, result, 1E-6);
    }