code: public void train()
      {
          double tl1 = 0.0;
          double tl2 = 0.0;
          double tl3 = 0.0;
          for (String key : tf.d.keySet())
          {
              if (key.length() != 6) continue;    // tri samples
              char[][] now = new char[][]
                      {
                              {key.charAt(0), key.charAt(1)},
                              {key.charAt(2), key.charAt(3)},
                              {key.charAt(4), key.charAt(5)},
                      };
              double c3 = div(tf.get(now) - 1, tf.get(now[0], now[1]) - 1);
              double c2 = div(tf.get(now[1], now[2]) - 1, tf.get(now[1]) - 1);
              double c1 = div(tf.get(now[2]) - 1, tf.getsum() - 1);
              if (c3 >= c1 && c3 >= c2)
                  tl3 += tf.get(key.toCharArray());
              else if (c2 >= c1 && c2 >= c3)
                  tl2 += tf.get(key.toCharArray());
              else if (c1 >= c2 && c1 >= c3)
                  tl1 += tf.get(key.toCharArray());
          }
  
          l1 = div(tl1, tl1 + tl2 + tl3);
          l2 = div(tl2, tl1 + tl2 + tl3);
          l3 = div(tl3, tl1 + tl2 + tl3);
      }
docs: 观测结束，开始训练