code: private void init()
      {
          int index = 0;
          for (List<String> sentence : docs)
          {
              Map<String, Integer> tf = new TreeMap<String, Integer>();
              for (String word : sentence)
              {
                  Integer freq = tf.get(word);
                  freq = (freq == null ? 0 : freq) + 1;
                  tf.put(word, freq);
              }
              f[index] = tf;
              for (Map.Entry<String, Integer> entry : tf.entrySet())
              {
                  String word = entry.getKey();
                  Integer freq = df.get(word);
                  freq = (freq == null ? 0 : freq) + 1;
                  df.put(word, freq);
              }
              ++index;
          }
          for (Map.Entry<String, Integer> entry : df.entrySet())
          {
              String word = entry.getKey();
              Integer freq = entry.getValue();
              idf.put(word, Math.log(D - freq + 0.5) - Math.log(freq + 0.5));
          }
      }
docs: 在构造时初始化自己的所有参数