static void generate_hypotheses(final int order, final Hypothesis h,
      final ArrayList<ME_Model> vme,
      List<Hypothesis> vh)
  {
    int n = h.sentence.size();
    int pred_position = -1;
    double min_ent = 999999;
    String pred = "";
    double pred_prob = 0;
    for (int j = 0; j < n; j++) {
      if (!h.sentence.get(j).chunk.equals("")) continue;
      double ent = h.entropies.get(j);
      if (ent < min_ent) {
        // pred = h.vvp[j].begin()->first;
        // pred_prob = h.vvp[j].begin()->second;
        min_ent = ent;
        pred_position = j;
      }
    }
    assert (pred_position >= 0 && pred_position < n);

    for (Tuple2<String, Double> k : h.vvp.get(pred_position)) {
      Hypothesis newh = h.copy();

      newh.sentence.get(pred_position).chunk = k._1;
      newh.order.set(pred_position, order + 1);
      newh.prob = h.prob * k._2;

      // if (newh.IsErroneous()) {
      // cout << "*errorneous" << endl;
      // newh.Print();
      // continue;
      // }

      // update the neighboring predictions
      for (int j = pred_position - TAG_WINDOW_SIZE; j <= pred_position + TAG_WINDOW_SIZE; j++) {
        if (j < 0 || j > n - 1) continue;
        if (newh.sentence.get(j).chunk.equals("")) newh.Update(j, vme);
      }
      vh.add(newh);
    }

  }