static void generate_hypotheses(final int order, final Hypothesis h,
      // final multimap<String, String> tag_dictionary,
      final ArrayList<ME_Model> vme,
      List<Hypothesis> vh)
  {
    int n = h.sentence.size();
    int pred_position = -1;
    double min_ent = 999999;
    // String pred = ""; //jenia
    // double pred_prob = 0; //jenia
    for (int j = 0; j < n; j++) {
      if (!h.sentence.get(j).pos.isEmpty()) 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).pos = k._1;
      newh.order.set(pred_position, order + 1);
      newh.prob = h.prob * k._2;

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